mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-10 15:34:30 +08:00
refactor: 怪物标记
This commit is contained in:
1 parent
d178908649
commit
8a8dee3176
13 files changed
+1710
-280
No files matched your search
@@ -29,15 +29,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import Scroll from '../components/scroll.vue';
|
||||
import { hasMarkedEnemy, markEnemy, unmarkEnemy } from '../plugin/mark';
|
||||
import { detailInfo } from '../plugin/ui/book';
|
||||
import { hasMarkedEnemy, markEnemy } from '@/plugin/mark';
|
||||
|
||||
const enemy = detailInfo.enemy!;
|
||||
const marked = ref(hasMarkedEnemy(enemy.enemy.id));
|
||||
|
||||
function mark() {
|
||||
if (marked.value) unmarkEnemy(enemy.enemy.id);
|
||||
if (!marked.value) markEnemy(enemy.enemy.id);
|
||||
markEnemy(enemy.enemy.id);
|
||||
marked.value = hasMarkedEnemy(enemy.enemy.id);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in new issue
Block a user