修改部分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 setting from './plugin/settings';
import chapter from './plugin/ui/chapter';
import fly from './plugin/ui/fly';
function forward() {
// 每个引入的插件都要在这里执行,否则不会被转发
@ -20,7 +21,8 @@ function forward() {
status(),
mark(),
setting(),
chapter()
chapter(),
fly()
];
// 初始化所有插件并转发到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 | 'all') {
const i = core.status.hero.items;
const ignore = ['book'];
if (cls === 'all') {
return {
tools: Object.entries(i.tools),
constants: Object.entries(i.constants)
tools: Object.entries(i.tools).filter(v => !ignore.includes(v[0])),
constants: Object.entries(i.constants).filter(
v => !ignore.includes(v[0])
)
};
}
const items = i[cls];

View File

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