mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-04 19:04:32 +08:00
完善ui
This commit is contained in:
1 parent
e275669489
commit
64a4fa05a8
7 files changed
+14
-19
No files matched your search
@@ -133,6 +133,9 @@ function generateChart(ele: HTMLCanvasElement, data: [number, number][]) {
|
||||
point: {
|
||||
radius: 5,
|
||||
hoverRadius: 7
|
||||
},
|
||||
line: {
|
||||
borderJoinStyle: 'round'
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
|
||||
@@ -78,10 +78,6 @@ export function getDefDamage(
|
||||
res.push([ratio * i + addDef, dam.damage]);
|
||||
}
|
||||
|
||||
if ((res.at(-1)?.[1] ?? 1) <= 0) {
|
||||
res.push([res.at(-1)![0] + 1, 0]);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -122,9 +118,5 @@ export function getCriticalDamage(
|
||||
res.push([ratio * i + addAtk, dam.damage]);
|
||||
}
|
||||
|
||||
if ((res.at(-1)?.[1] ?? 1) <= 0) {
|
||||
res.push([res.at(-1)![0] + 1, 0]);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -33,10 +33,14 @@
|
||||
<span id="skill-level">当前等级:{{ level }}</span>
|
||||
<a-divider dashed class="upgrade-divider"></a-divider>
|
||||
<span
|
||||
v-if="level < skill.max"
|
||||
id="skill-consume"
|
||||
:style="{ color: consume <= mdef ? '#fff' : '#f44' }"
|
||||
>升级花费:{{ consume }}</span
|
||||
>
|
||||
<span v-else id="skill-consume" style="color: gold"
|
||||
>已满级</span
|
||||
>
|
||||
<a-divider dashed class="upgrade-divider"></a-divider>
|
||||
<Scroll id="front-scroll" :no-scroll="true"
|
||||
><div id="skill-front">
|
||||
@@ -246,7 +250,8 @@ function upgrade(index: number) {
|
||||
|
||||
function key(e: KeyboardEvent) {
|
||||
const c = keycode(e.keyCode);
|
||||
if (c === KeyCode.Escape || c === KeyCode.KeyX) exit();
|
||||
if (c === KeyCode.Escape || c === KeyCode.KeyX || c === KeyCode.KeyJ)
|
||||
exit();
|
||||
if (c === KeyCode.Space || c === KeyCode.Enter || c === KeyCode.KeyC) {
|
||||
upgrade(selected.value);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user