fix mini position restore and typo (#981)

This commit is contained in:
Harvey Zhao authored and GitHub committed 2025-06-20 10:19:28 +08:00
1 parent 7e7bd8c0ad
commit 1374d530a4
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ export default function miniMix(art) {
const $mini = createMini(); const $mini = createMini();
const top = storage.get('top'); const top = storage.get('top');
const left = storage.get('left'); const left = storage.get('left');
if (top && left) { if (typeof top === 'number' && typeof left === 'number') {
setStyle($mini, 'top', `${top}px`); setStyle($mini, 'top', `${top}px`);
setStyle($mini, 'left', `${left}px`); setStyle($mini, 'left', `${left}px`);
if (!isInViewport($mini)) { if (!isInViewport($mini)) {
+1 -1
View File
@@ -110,7 +110,7 @@ export default class Setting extends Component {
const item = option[index]; const item = option[index];
if (item?.name) { if (item?.name) {
errorHandle(!names.includes(item.name), `The [${item.name}] is already exist in [setting]`); errorHandle(!names.includes(item.name), `The [${item.name}] already exists in [setting]`);
names.push(item.name); names.push(item.name);
} else { } else {
item.name = `setting-${this.id++}`; item.name = `setting-${this.id++}`;