From 031f0f18ed46c3d56e66469a792f52fbda59ca1b Mon Sep 17 00:00:00 2001 From: lb Date: Wed, 9 Nov 2022 15:30:00 +0800 Subject: [PATCH] update Navbar & beilv --- src/App.vue | 15 ++++- src/icons/svg/alarm-old.svg | 1 + src/icons/svg/alarm.svg | 15 ++++- src/icons/svg/alarmb.svg | 14 ++++ src/icons/svg/chrome-old.svg | 2 + src/icons/svg/chrome.svg | 12 +++- src/icons/svg/chromeb.svg | 10 +++ src/icons/svg/home-old.svg | 1 + src/icons/svg/home.svg | 11 ++- src/icons/svg/homeb.svg | 10 +++ src/layout/components/Navbar.vue | 112 +++++++++++++++++-------------- src/views/ChoicePart/index.vue | 42 ++++++------ 12 files changed, 168 insertions(+), 77 deletions(-) create mode 100644 src/icons/svg/alarm-old.svg create mode 100644 src/icons/svg/alarmb.svg create mode 100644 src/icons/svg/chrome-old.svg create mode 100644 src/icons/svg/chromeb.svg create mode 100644 src/icons/svg/home-old.svg create mode 100644 src/icons/svg/homeb.svg diff --git a/src/App.vue b/src/App.vue index 13bde7b..4d0df89 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,12 +8,21 @@ export default { name: 'App', mounted() { + this.beilv = document.body.offsetWidth / 1920 + document.documentElement.style.setProperty('--beilv', this.beilv) + window.addEventListener('resize', () => { + this.beilv = document.body.offsetWidth / 1920 + document.documentElement.style.setProperty('--beilv', this.beilv) + }) + }, + data() { + beilv: 1 } } diff --git a/src/icons/svg/alarm-old.svg b/src/icons/svg/alarm-old.svg new file mode 100644 index 0000000..2cd3ac9 --- /dev/null +++ b/src/icons/svg/alarm-old.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/alarm.svg b/src/icons/svg/alarm.svg index 2cd3ac9..d5b848b 100644 --- a/src/icons/svg/alarm.svg +++ b/src/icons/svg/alarm.svg @@ -1 +1,14 @@ - \ No newline at end of file + + + 2 + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/svg/alarmb.svg b/src/icons/svg/alarmb.svg new file mode 100644 index 0000000..56883ab --- /dev/null +++ b/src/icons/svg/alarmb.svg @@ -0,0 +1,14 @@ + + + 2 + + + + + + + + + + + \ No newline at end of file diff --git a/src/icons/svg/chrome-old.svg b/src/icons/svg/chrome-old.svg new file mode 100644 index 0000000..17fcca4 --- /dev/null +++ b/src/icons/svg/chrome-old.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/icons/svg/chrome.svg b/src/icons/svg/chrome.svg index 17fcca4..2777d04 100644 --- a/src/icons/svg/chrome.svg +++ b/src/icons/svg/chrome.svg @@ -1,2 +1,10 @@ - \ No newline at end of file + + + 3 + + + + + + + \ No newline at end of file diff --git a/src/icons/svg/chromeb.svg b/src/icons/svg/chromeb.svg new file mode 100644 index 0000000..c975528 --- /dev/null +++ b/src/icons/svg/chromeb.svg @@ -0,0 +1,10 @@ + + + 3 + + + + + + + \ No newline at end of file diff --git a/src/icons/svg/home-old.svg b/src/icons/svg/home-old.svg new file mode 100644 index 0000000..4e97c20 --- /dev/null +++ b/src/icons/svg/home-old.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/icons/svg/home.svg b/src/icons/svg/home.svg index 4e97c20..4a9ac68 100644 --- a/src/icons/svg/home.svg +++ b/src/icons/svg/home.svg @@ -1 +1,10 @@ - \ No newline at end of file + + + 1 + + + + + + + \ No newline at end of file diff --git a/src/icons/svg/homeb.svg b/src/icons/svg/homeb.svg new file mode 100644 index 0000000..c6d1237 --- /dev/null +++ b/src/icons/svg/homeb.svg @@ -0,0 +1,10 @@ + + + 1 + + + + + + + \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 81cb597..a52ce72 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -19,13 +19,15 @@
-
+
- {{ 'navbar.homepage' | i18nFilter }} + + {{ 'navbar.homepage' | i18nFilter }} +
- + 暂无数据 @@ -73,7 +75,7 @@
@@ -291,8 +293,12 @@ export default { clearInterval(logoutInterval) }, async toHome() { - this.$store.dispatch('app/setChoicepart') - this.$router.push('/') + if (this.showhome) { + this.$store.dispatch('app/setChoicepart') + this.$router.push('/') + } else { + this.goToRootPage() + } }, handleAlarm() {}, getAlarm() { @@ -324,13 +330,15 @@ export default {