From 1b733e198297c4495d47c08fb2bd4c30ca49263c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Tue, 27 Aug 2024 15:57:13 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/home.vue | 8 ++++++-- src/store/modules/position.js | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/layouts/home.vue b/src/layouts/home.vue index 82a2d96..083d3b4 100644 --- a/src/layouts/home.vue +++ b/src/layouts/home.vue @@ -8,7 +8,7 @@
- +
@@ -137,6 +137,9 @@ export default { store.commit('SET_OPERATETIME') } const selectPostion = ref('') + const SET_SELECTED_POSITION = () => { + store.commit('SET_SELECTED_POSITION', selectPostion.value) + } return { isCollapsed: computed(() => store.state.app.isCollapsed), basePath: computed(() => store.state.app.basePath), @@ -149,7 +152,8 @@ export default { thirdMenuData, toggleCollapsed, setTime, - selectPostion + selectPostion, + SET_SELECTED_POSITION } }, methods: { diff --git a/src/store/modules/position.js b/src/store/modules/position.js index 071330b..d4c703c 100644 --- a/src/store/modules/position.js +++ b/src/store/modules/position.js @@ -7,9 +7,13 @@ const state = { positionList: [ { name: '主阵地', id: 1 }, { name: '子阵地 1', id: 2 } - ] + ], + selectedPostion: '' } const mutations = { + SET_SELECTED_POSITION(state, value) { + state.selectedPostion = value + }, SET_IS_MAIN_POSITION(state, value) { state.isMainPosition = value },