mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-01 23:55:59 +08:00
完善部分ui
This commit is contained in:
1 parent
db5ff1b183
commit
190201b386
15 files changed
+70
-49
No files matched your search
+1
-3
@@ -202,9 +202,8 @@ function keydown(e: KeyboardEvent) {
|
||||
|
||||
onMounted(async () => {
|
||||
const div = document.getElementById('book') as HTMLDivElement;
|
||||
div.style.opacity = '1';
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
else await sleep(100);
|
||||
else await sleep(50);
|
||||
document.addEventListener('keyup', keyup);
|
||||
document.addEventListener('keydown', keydown);
|
||||
});
|
||||
@@ -217,7 +216,6 @@ onUnmounted(async () => {
|
||||
|
||||
<style lang="less" scoped>
|
||||
#book {
|
||||
opacity: 0;
|
||||
user-select: none;
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
|
||||
+14
-2
@@ -183,9 +183,10 @@ import { computed, onMounted, onUnmounted, reactive, ref, watch } from 'vue';
|
||||
import Scroll from '../components/scroll.vue';
|
||||
import { getAddStatus, getEquips, getNowStatus } from '../plugin/ui/equipbox';
|
||||
import BoxAnimate from '../components/boxAnimate.vue';
|
||||
import { has, tip, type } from '../plugin/utils';
|
||||
import { has, keycode, tip, type } from '../plugin/utils';
|
||||
import { cancelGlobalDrag, isMobile, useDrag } from '../plugin/use';
|
||||
import { hyper, sleep } from 'mutate-animate';
|
||||
import { KeyCode } from '../plugin/keyCodes';
|
||||
|
||||
const equips = ref(getEquips());
|
||||
const col = ref('all');
|
||||
@@ -425,16 +426,27 @@ async function toTool() {
|
||||
core.plugin.transition.value = before;
|
||||
}
|
||||
|
||||
function keyup(e: KeyboardEvent) {
|
||||
const c = keycode(e.keyCode);
|
||||
if (c === KeyCode.KeyQ || c === KeyCode.KeyX || c === KeyCode.Escape) {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
watch(toShow, n => {
|
||||
bind();
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
bind();
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
else await sleep(50);
|
||||
document.addEventListener('keyup', keyup);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
cancelGlobalDrag(dragEquip);
|
||||
document.removeEventListener('keyup', keyup);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -75,10 +75,10 @@
|
||||
keys[2]?.toString().padStart(2, '0')
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="status-item">
|
||||
<div v-if="skillOpened" class="status-item">
|
||||
<span id="skill-tree" class="button-text">技能树</span>
|
||||
</div>
|
||||
<div class="status-item">
|
||||
<div v-if="skillOpened" class="status-item">
|
||||
<span id="status-skill" class="button-text"
|
||||
>查看技能</span
|
||||
>
|
||||
@@ -112,6 +112,7 @@ const lvName = ref<string>();
|
||||
const skill = ref<string>('无');
|
||||
const up = ref(0);
|
||||
const spring = ref<number>();
|
||||
const skillOpened = ref(core.getFlag('chapter', 0) > 0);
|
||||
/**
|
||||
* 要展示的勇士属性
|
||||
*/
|
||||
@@ -148,6 +149,7 @@ function update() {
|
||||
if (core.hasFlag('spring')) {
|
||||
spring.value = 50 - flags.springCount;
|
||||
}
|
||||
skillOpened.value = core.getFlag('chapter', 0) > 0;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
+3
-2
@@ -197,7 +197,7 @@ async function toEquip() {
|
||||
|
||||
function keyup(e: KeyboardEvent) {
|
||||
const c = keycode(e.keyCode);
|
||||
if (c === KeyCode.Escape || c === KeyCode.KeyX) {
|
||||
if (c === KeyCode.Escape || c === KeyCode.KeyX || c === KeyCode.KeyT) {
|
||||
exit();
|
||||
}
|
||||
if (c === KeyCode.Enter || c === KeyCode.KeyC) {
|
||||
@@ -239,7 +239,8 @@ function keydown(e: KeyboardEvent) {
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await sleep(600);
|
||||
if (core.plugin.transition.value) await sleep(600);
|
||||
else await sleep(50);
|
||||
document.addEventListener('keyup', keyup);
|
||||
document.addEventListener('keydown', keydown);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user