修改部分ui

This commit is contained in:
unanmed 2023-01-01 11:56:02 +08:00
parent 5f8762d158
commit 71a4551004
3 changed files with 11 additions and 5 deletions

View File

@ -8,6 +8,7 @@ import status from './plugin/ui/statusBar';
import mark from './plugin/mark'; import mark from './plugin/mark';
import setting from './plugin/settings'; import setting from './plugin/settings';
import chapter from './plugin/ui/chapter'; import chapter from './plugin/ui/chapter';
import fly from './plugin/ui/fly';
function forward() { function forward() {
// 每个引入的插件都要在这里执行,否则不会被转发 // 每个引入的插件都要在这里执行,否则不会被转发
@ -20,7 +21,8 @@ function forward() {
status(), status(),
mark(), mark(),
setting(), setting(),
chapter() chapter(),
fly()
]; ];
// 初始化所有插件并转发到core上 // 初始化所有插件并转发到core上

View File

@ -33,10 +33,13 @@ export function getItems(cls: 'all'): AllItem;
export function getItems(cls: keyof ClsMap): [string, number][]; export function getItems(cls: keyof ClsMap): [string, number][];
export function getItems(cls: keyof ClsMap | 'all') { export function getItems(cls: keyof ClsMap | 'all') {
const i = core.status.hero.items; const i = core.status.hero.items;
const ignore = ['book'];
if (cls === 'all') { if (cls === 'all') {
return { return {
tools: Object.entries(i.tools), tools: Object.entries(i.tools).filter(v => !ignore.includes(v[0])),
constants: Object.entries(i.constants) constants: Object.entries(i.constants).filter(
v => !ignore.includes(v[0])
)
}; };
} }
const items = i[cls]; const items = i[cls];

View File

@ -2,6 +2,7 @@
<div id="marked-enemy"> <div id="marked-enemy">
<div v-for="v of all"> <div v-for="v of all">
<Box <Box
:key="v"
v-if="!getBoxPos(v).hidden" v-if="!getBoxPos(v).hidden"
v-model:left="getBoxPos(v).left" v-model:left="getBoxPos(v).left"
v-model:top="getBoxPos(v).top" v-model:top="getBoxPos(v).top"
@ -36,12 +37,12 @@
<div class="marked-button"> <div class="marked-button">
<span <span
class="marked-hide button-text" class="marked-hide button-text"
@click="getBoxPos(v).hidden = true" @click.stop="getBoxPos(v).hidden = true"
>隐藏盒子</span >隐藏盒子</span
> >
<span <span
class="marked-cancel button-text" class="marked-cancel button-text"
@click="unmarkEnemy(v)" @click.stop="unmarkEnemy(v)"
>取消标记</span >取消标记</span
> >
</div> </div>