From 280387fba53d950d316a1f36d87f7b6c52a0ee6a Mon Sep 17 00:00:00 2001 From: hi2hi Date: Mon, 7 Apr 2025 13:33:20 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=96=B0=E5=A2=9E=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E7=9A=84=E4=BD=8D=E7=BD=AE=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/config.js | 2 ++ src/views/detail.vue | 24 +++++++++++++++++++----- src/views/home.vue | 24 ++++++++++++++++++++++-- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/public/config.js b/public/config.js index cdbedcd..796b24f 100644 --- a/public/config.js +++ b/public/config.js @@ -21,6 +21,8 @@ window.$$nazhuaConfig = { // hideWorldMap: false, // 隐藏地图 // hideHomeWorldMap: false, // 隐藏首页地图 // hideDetailWorldMap: false, // 隐藏详情地图 + // homeWorldMapPosition: 'top', // 首页地图位置 top/bottom + // detailWorldMapPosition: 'top', // 详情页地图位置 top/bottom // hideNavbarServerCount: false, // 隐藏服务器数量 // hideNavbarServerStat: false, // 隐藏服务器统计 // hideListItemStatusDonut: false, // 隐藏列表项的饼图 diff --git a/src/views/detail.vue b/src/views/detail.vue index 7e189f9..cb42e78 100644 --- a/src/views/detail.vue +++ b/src/views/detail.vue @@ -6,11 +6,12 @@ 'server--offline': info?.online !== 1, }" > - + + @@ -119,6 +126,13 @@ const showWorldMap = computed(() => { return true; }); +const worldMapPosition = computed(() => { + if (Object.keys(config.nazhua).includes('detailWorldMapPosition')) { + return config.nazhua.detailWorldMapPosition; + } + return 'bottom'; +}); + function handleWorldMapWidth() { worldMapWidth.value = Math.max( Math.min( diff --git a/src/views/home.vue b/src/views/home.vue index 6e3e6be..8d1b3f7 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -2,10 +2,10 @@
@@ -62,6 +62,15 @@ :info="item" /> +
+ +
@@ -310,6 +319,13 @@ const showWorldMap = computed(() => { return true; }); +const worldMapPosition = computed(() => { + if (Object.keys(config.nazhua).includes('homeWorldMapPosition')) { + return config.nazhua.homeWorldMapPosition; + } + return 'top'; +}); + /** * 处理窗口大小变化 */ @@ -365,6 +381,10 @@ onActivated(() => { align-items: center; justify-content: center; } + + .bottom-world-map { + margin-top: 30px; + } } .fitler-group {