From 0e366427a58cf2b317d355a762f04652ea4ae767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E6=B1=89?= <5725748+qin_and_han_dynasties@user.noreply.gitee.com> Date: Fri, 27 Mar 2026 17:26:09 +0800 Subject: [PATCH] =?UTF-8?q?character=E8=A7=92=E8=89=B2=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/GlitchText/GlitchText.vue | 203 ++++++++++++++++++ Build_God_Game/src/views/CharacterView.vue | 120 ++++++----- 2 files changed, 270 insertions(+), 53 deletions(-) create mode 100644 Build_God_Game/src/components/GlitchText/GlitchText.vue diff --git a/Build_God_Game/src/components/GlitchText/GlitchText.vue b/Build_God_Game/src/components/GlitchText/GlitchText.vue new file mode 100644 index 0000000..2527f25 --- /dev/null +++ b/Build_God_Game/src/components/GlitchText/GlitchText.vue @@ -0,0 +1,203 @@ + + + + + diff --git a/Build_God_Game/src/views/CharacterView.vue b/Build_God_Game/src/views/CharacterView.vue index c294d64..9c5a1da 100644 --- a/Build_God_Game/src/views/CharacterView.vue +++ b/Build_God_Game/src/views/CharacterView.vue @@ -7,6 +7,7 @@ import { ElProgress } from 'element-plus' import Particles from '@/components/Particles/Particles.vue' import GlareHover from '@/components/GlareHover/GlareHover.vue' import ElectricBorder from '@/components/ElectricBorder/ElectricBorder.vue' +import GlitchText from '@/components/GlitchText/GlitchText.vue' const router = useRouter() const characterStore = useCharacterStore() @@ -104,6 +105,10 @@ const getExpProgress = (currentExp: number, nextLevelMinExp?: number) => { if (!nextLevelMinExp) return 0 return Math.min(100, (currentExp / nextLevelMinExp) * 100) } + +const formatNumber = (num: number) => { + return Math.floor(num).toLocaleString('zh-CN') +}