From c77ca32e5f2d00cb20bf3288481b837fa940f595 Mon Sep 17 00:00:00 2001 From: Fuynkio Date: Wed, 20 Sep 2023 20:56:14 +0800 Subject: [PATCH 1/2] Changes to be committed: --- ui/src/App.vue | 29 ++++++++++++++++---------- ui/src/components/BasementSettings.vue | 4 ++-- ui/src/components/MowerSettings.vue | 4 ++-- ui/src/pages/AdvancedLeft.vue | 21 ++++++++++++++++++- ui/src/pages/Doc.vue | 3 ++- 5 files changed, 44 insertions(+), 17 deletions(-) diff --git a/ui/src/App.vue b/ui/src/App.vue index e85295dea..766842fc4 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -1,14 +1,9 @@ @@ -52,13 +50,14 @@ import { Flash } from '@vicons/ionicons5' import { DiceD20 } from '@vicons/fa' -const collapsed = ref(true) +const collapsed = ref(false); +const mobilemode = ref(true); function renderIcon(icon) { return () => h(NIcon, null, { default: () => h(icon) }) } import { RouterLink } from 'vue-router' -const menuOptions = ref([ +const menuOptions = computed(() => [ { label: () => h(RouterLink, { to: { path: '/' } }, { default: () => '运行日志' }), icon: renderIcon(BookOutline), @@ -73,6 +72,7 @@ const menuOptions = ref([ label: () => '设置', key: 'go-to-settings', icon: renderIcon(Settings), + show: !mobilemode.value, children: [ { label: () => 'Mower设置', @@ -167,6 +167,13 @@ const menuOptions = ref([ //{ label: () => h(RouterLink, { to: { path: "/advancedleft/sk-land" } }, { default: () => "森空岛签到" }), key: "go-to-skland" }, ] }, + { + label: () => + h(RouterLink, { to: { path: '/advancedleft' } }, { default: () => '全部设置' }), + icon: renderIcon(Settings), + show: mobilemode.value, + key: 'go-to-allsetting' + }, { label: () => '基建报表', key: 'building-report', @@ -238,7 +245,7 @@ onMounted(async () => { }) if (window.innerWidth > 570) { - collapsed.value = false + mobilemode.value = false } const params = new URLSearchParams(document.location.search) diff --git a/ui/src/components/BasementSettings.vue b/ui/src/components/BasementSettings.vue index 8a8a014e2..6dbf9715f 100644 --- a/ui/src/components/BasementSettings.vue +++ b/ui/src/components/BasementSettings.vue @@ -28,7 +28,7 @@ const facility_with_empty = computed(() => {