修复完成todo引起的bug

This commit is contained in:
unanmed 2023-08-06 22:52:56 +08:00
parent 1854389966
commit 93fad2f637
4 changed files with 12 additions and 20 deletions

View File

@ -3,9 +3,9 @@
<Start v-if="startOpened"></Start>
<StatusBar v-if="showStatusBar"></StatusBar>
<MarkedEnemy v-if="showMarkedEnemy && showStatusBar"></MarkedEnemy>
<Studied
<!-- <Studied
v-if="showStudiedSkill && showStatusBar && showStudied"
></Studied>
></Studied> -->
<Fixed v-if="showStatusBar && useFixed"></Fixed>
<Chapter v-if="chapterShowed" :chapter="chapterContent"></Chapter>
<CompleteAchievement
@ -17,22 +17,23 @@
<script lang="ts" setup>
import { ref } from 'vue';
import {
showStatusBar,
showStudiedSkill,
startOpened
} from './plugin/uiController';
import { showStatusBar, startOpened } from './plugin/uiController';
import { chapterContent, chapterShowed } from './plugin/ui/chapter';
import { showMarkedEnemy } from './plugin/mark';
import { showStudied, useFixed } from './plugin/settings';
import { showComplete, completeAchi } from './plugin/ui/achievement';
import MarkedEnemy from './ui/markedEnemy.vue';
import StatusBar from './ui/statusBar.vue';
import Chapter from './ui/chapter.vue';
import Studied from './ui/studied.vue';
import Fixed from './ui/fixed.vue';
import Start from './ui/start.vue';
import CompleteAchievement from './ui/completeAchievement.vue';
import { mainSetting } from './core/main/setting';
const useFixed = ref(true);
mainSetting.on('valueChange', (key, n, o) => {
if (key === 'action.fixed') useFixed.value = n as boolean;
});
</script>
<style lang="less" scoped>

View File

@ -292,8 +292,6 @@ function handleScreenSetting<T extends number | boolean>(
n: T,
o: T
) {
if (n === o) return;
if (key === 'fullscreen') {
// 全屏
triggerFullscreen(n as boolean);
@ -336,8 +334,6 @@ function handleActionSetting<T extends number | boolean>(
n: T,
o: T
) {
if (n === o) return;
if (key === 'autoSkill') {
// 自动切换技能
flags.autoSkill = n;
@ -354,8 +350,6 @@ function handleUtilsSetting<T extends number | boolean>(
n: T,
o: T
) {
if (n === o) return;
if (key === 'betterLoad') {
// 加载优化
core.setLocalStorage('betterLoad', n);

View File

@ -1,8 +1,6 @@
/**
*
* @param name
* @param x
* @param y
* @param floorId
*/
export function getHeroStatusOn(name: 'all', floorId?: FloorIds): HeroStatus;
@ -26,8 +24,6 @@ export function getHeroStatusOn(
*
* @param status
* @param name
* @param x
* @param y
* @param floorId
*/
export function getHeroStatusOf(

View File

@ -178,8 +178,9 @@ watch(status, update);
* 更新显示内容
*/
function update() {
if (!core?.plugin?.hero?.getHeroStatusOn) return;
toShow.forEach(v => {
hero[v] = core.plugin.getHeroStatusOn(v);
hero[v] = core.plugin.hero.getHeroStatusOn(v);
});
keys[0] = core.itemCount('yellowKey');
keys[1] = core.itemCount('blueKey');