From 13f3a040a4e80e9dfa2711f9990ad8754ec9b21c Mon Sep 17 00:00:00 2001 From: "liu.shiyi" Date: Mon, 3 Jul 2023 16:00:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E5=A4=A7=E5=B1=8F?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RightSetting/G2CustomSetting.vue | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue b/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue index deb80f90..728142ee 100644 --- a/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue +++ b/data-room-ui/packages/BigScreenDesign/RightSetting/G2CustomSetting.vue @@ -167,6 +167,7 @@ import ColorSelect from 'packages/ColorMultipleSelect/index.vue' import PaddingSetting from 'packages/BigScreenDesign/RightSetting/PaddingSetting/index.vue' import GradualSetting from 'packages/BigScreenDesign/RightSetting/GradualSetting/index.vue' import PosWhSetting from 'packages/BigScreenDesign/RightSetting/PosWhSetting.vue' +import _ from 'lodash' export default { name: 'CustomComponentSetting', components: { @@ -207,7 +208,7 @@ export default { return this.$store.state.bigScreen.activeItemConfig }, set (val) { - this.$store.state.bigScreen.activeItemConfig = val + this.$store.commit('bigScreen/changeActiveItemConfig', val) } }, appCode: { @@ -219,8 +220,17 @@ export default { return this.$route.query.code } }, - watch: {}, + watch: { + groupList: { + handler (val) { + const setList = [].concat(...val.map(item => item.list)) + this.$store.commit('bigScreen/changeActiveItemConfig', { ...this.config, setting: [...this.config.setting, ...setList] }) + }, + deep: true + } + }, mounted () { + this.init() const groupNameList = [] this.config.setting.filter( (item) => item.tabName === 'custom' @@ -254,7 +264,11 @@ export default { } } }, - methods: {} + methods: { + init () { + this.config = this.$store.state.bigScreen.activeItemConfig + } + } }