diff --git a/index.html b/index.html index 872d882..3ffbbd7 100644 --- a/index.html +++ b/index.html @@ -159,7 +159,6 @@
-
diff --git a/src/core/main/setting.ts b/src/core/main/setting.ts index 56f4d79..f9f2a74 100644 --- a/src/core/main/setting.ts +++ b/src/core/main/setting.ts @@ -276,7 +276,6 @@ mainSetting.on('valueChange', (key, n, o) => { }); const root = document.getElementById('root') as HTMLDivElement; -const root2 = document.getElementById('root2') as HTMLDivElement; function handleScreenSetting( key: string, @@ -318,7 +317,7 @@ function handleScreenSetting( } else if (key === 'fontSize') { // 字体大小 core.setLocalStorage('fontSize', n); - root.style.fontSize = root2.style.fontSize = `${n}px`; + root.style.fontSize = `${n}px`; } else if (key === 'smoothView') { core.setLocalStorage('smoothView', n); } else if (key === 'criticalGem') { diff --git a/src/plugin/ui/achievement.ts b/src/plugin/ui/achievement.ts index 4a60369..c55981a 100644 --- a/src/plugin/ui/achievement.ts +++ b/src/plugin/ui/achievement.ts @@ -21,9 +21,6 @@ export default function init() { return { completeAchievement, hasCompletedAchievement, addMountSign }; } -export const showComplete = ref(false); -export const completeAchi = ref('explore,1'); - export const totalPoint = Object.values(list) .map((v: Achievement[]) => v.reduce((prev, curr) => { @@ -54,8 +51,7 @@ export function completeAchievement(type: AchievementType, index: number) { if (type === 'explore' && !Object.values(achiDict).includes(index)) { checkCompletionAchievement(); } - completeAchi.value = `${type},${index}`; - showComplete.value = true; + mota.ui.fixed.open('completeAchi', { complete: `${type},${index}` }); } /** diff --git a/src/ui/completeAchievement.vue b/src/ui/completeAchievement.vue index 9251dcd..1d61ffe 100644 --- a/src/ui/completeAchievement.vue +++ b/src/ui/completeAchievement.vue @@ -25,13 +25,15 @@ import list from '../data/achievement.json'; import { AchievementType, getNowPoint, - showComplete, totalPoint } from '../plugin/ui/achievement'; +import { GameUi } from '@/core/main/custom/ui'; const height = window.innerHeight; const props = defineProps<{ + num: number; + ui: GameUi; complete: string; }>(); @@ -60,7 +62,7 @@ onMounted(async () => { now.value = Math.floor(nowPoint + point * ratio); }); await sleep(4600); - showComplete.value = false; + mota.ui.fixed.close(props.num); });