mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 03:51:25 -08:00
fix mini position restore and typo (#981)
This commit is contained in:
1 parent
7e7bd8c0ad
commit
1374d530a4
2 files changed
+2
-2
No files matched your search
@@ -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)) {
|
||||||
|
|||||||
@@ -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++}`;
|
||||||
|
|||||||
Reference in new issue
Block a user