From 33d79d8f920d5382d625223e1d23234afd67b9e2 Mon Sep 17 00:00:00 2001 From: lovezhangchuangxin <2911331070@qq.com> Date: Sun, 17 Nov 2024 11:21:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/game/components.d.ts | 6 ++++++ packages/game/src/components/navbar/NavSide.vue | 2 +- packages/game/src/views/planet/PlanetPage.vue | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/game/components.d.ts b/packages/game/components.d.ts index d37ef92..3dc2abf 100644 --- a/packages/game/components.d.ts +++ b/packages/game/components.d.ts @@ -8,13 +8,19 @@ export {} declare module 'vue' { export interface GlobalComponents { ElButton: typeof import('element-plus/es')['ElButton'] + ElCard: typeof import('element-plus/es')['ElCard'] + ElCol: typeof import('element-plus/es')['ElCol'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElInput: typeof import('element-plus/es')['ElInput'] ElLink: typeof import('element-plus/es')['ElLink'] + ElProgress: typeof import('element-plus/es')['ElProgress'] ElRow: typeof import('element-plus/es')['ElRow'] ElSpace: typeof import('element-plus/es')['ElSpace'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] + ElTag: typeof import('element-plus/es')['ElTag'] ElText: typeof import('element-plus/es')['ElText'] GameMap: typeof import('./src/components/gameMap/index.vue')['default'] MdViewer: typeof import('./src/components/md-viewer/MdViewer.vue')['default'] diff --git a/packages/game/src/components/navbar/NavSide.vue b/packages/game/src/components/navbar/NavSide.vue index c9de532..7d4c793 100644 --- a/packages/game/src/components/navbar/NavSide.vue +++ b/packages/game/src/components/navbar/NavSide.vue @@ -70,7 +70,7 @@ onMounted(() => { color: #e9e9e9; font-size: 16px; overflow-y: auto; - z-index: 1; + z-index: 1000; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); li { diff --git a/packages/game/src/views/planet/PlanetPage.vue b/packages/game/src/views/planet/PlanetPage.vue index 2899bc9..3a4ef8d 100644 --- a/packages/game/src/views/planet/PlanetPage.vue +++ b/packages/game/src/views/planet/PlanetPage.vue @@ -191,7 +191,10 @@ const addIntent = ( const calcCapacityPercentage = ( structure: MetalStorage | EnergyStorage, ): number => { - return (structure.store * 100) / structure.calcCapacity(structure.level) + return +( + (structure.store * 100) / + structure.calcCapacity(structure.level) + ).toFixed(2) } // 储量进度条颜色