From 80c7aa1c7398ad4d1a1e6fc40fb0cd892be200f1 Mon Sep 17 00:00:00 2001 From: "weijie.g@qq.com" Date: Thu, 16 Sep 2021 11:17:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B0=8F=E5=B7=A5=E5=85=B7=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E6=90=AD=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/taskbar.js | 10 +++++- src/styles/index.scss | 17 ++++++++- src/utils/index.js | 0 src/views/desktop/Home.vue | 67 ++++++++++++++++++++++++++++++++++-- src/views/taskbar/index.vue | 29 ++++++++++++---- 5 files changed, 112 insertions(+), 11 deletions(-) create mode 100644 src/utils/index.js diff --git a/src/store/modules/taskbar.js b/src/store/modules/taskbar.js index 36daf83..a8d36c1 100644 --- a/src/store/modules/taskbar.js +++ b/src/store/modules/taskbar.js @@ -1,6 +1,7 @@ const state = { startMapShow: false, - currentPag: 'start' + currentPag: 'start', + widgetShow: false } const mutations = { @@ -23,12 +24,19 @@ const mutations = { } if (val === 'taskbar') return state.startMapShow = false + }, + // 小工具显示/隐藏 + WIDGET_SHOW(state,val){ + state.widgetShow = val } } const actions = { changeStartMapShow({ commit }, val) { commit('STARTMAP_SHOW', val) + }, + changeWidgetShow({commit},val){ + commit('WIDGET_SHOW',val) } } diff --git a/src/styles/index.scss b/src/styles/index.scss index 00290ce..355798d 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1 +1,16 @@ -@import './animation.scss' \ No newline at end of file +@import './animation.scss'; + +// 小工具遮罩层背景色 +.widget{ + width: 610px; + height: 94%; + top: calc( calc( 6% - 40px) / 2) !important; + left: 5px !important; + .el-drawer{ + width: 100% !important; + background-color: rgba(255, 255, 255, 0.25); + backdrop-filter:blur(40px); + box-shadow: none; + border-radius: 8px; + } +} \ No newline at end of file diff --git a/src/utils/index.js b/src/utils/index.js new file mode 100644 index 0000000..e69de29 diff --git a/src/views/desktop/Home.vue b/src/views/desktop/Home.vue index f3f1b84..43aa6b2 100644 --- a/src/views/desktop/Home.vue +++ b/src/views/desktop/Home.vue @@ -1,17 +1,42 @@ + \ No newline at end of file diff --git a/src/components/Widget/index.vue b/src/components/Widget/index.vue new file mode 100644 index 0000000..49d6f53 --- /dev/null +++ b/src/components/Widget/index.vue @@ -0,0 +1,61 @@ + + + \ No newline at end of file diff --git a/src/store/modules/taskbar.js b/src/store/modules/taskbar.js index a8d36c1..b0eadf4 100644 --- a/src/store/modules/taskbar.js +++ b/src/store/modules/taskbar.js @@ -1,7 +1,8 @@ const state = { startMapShow: false, currentPag: 'start', - widgetShow: false + widgetShow: false, + widgetOrNotice: true // true -> widget false -> notice } const mutations = { @@ -28,6 +29,10 @@ const mutations = { // 小工具显示/隐藏 WIDGET_SHOW(state,val){ state.widgetShow = val + }, + // 小工具 还是 通知中心 + WIDGETORNOTICE(state,val){ + state.widgetOrNotice = val } } @@ -37,6 +42,9 @@ const actions = { }, changeWidgetShow({commit},val){ commit('WIDGET_SHOW',val) + }, + changeWidgetOrNotice({commit},val){ + commit('WIDGETORNOTICE',val) } } diff --git a/src/styles/index.scss b/src/styles/index.scss index 355798d..79f8bc5 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -1,6 +1,6 @@ @import './animation.scss'; -// 小工具遮罩层背景色 +// 小工具样式 .widget{ width: 610px; height: 94%; @@ -13,4 +13,21 @@ box-shadow: none; border-radius: 8px; } +} +// 通知样式 +.notice{ + width: 320px; + height: calc(100% - 40px); + left: auto; + right: 0 !important; + background: transparent; + .el-drawer{ + width: 100% !important; + box-shadow: none; + background-color: rgba(255, 255, 255, 0.88); + backdrop-filter: blur(20px); + } + .el-drawer__close-btn{ + display: none; + } } \ No newline at end of file diff --git a/src/views/desktop/Home.vue b/src/views/desktop/Home.vue index 43aa6b2..9f1eb18 100644 --- a/src/views/desktop/Home.vue +++ b/src/views/desktop/Home.vue @@ -5,38 +5,52 @@

{{item.name}}

- -
- -
-
- {{drawerTime}} -
-
- 123456 -
+ +