From 09b3477b4d4146a1e44165c28e0438ca2f0af1c3 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Sun, 26 Sep 2021 17:55:31 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E8=B0=83=E6=95=B4=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E6=9D=BFtabs=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/components/Editor/SettingMenu.vue | 14 ++++++------- .../src/components/widget/DeWidget/DeTabs.vue | 12 ++++++++--- frontend/src/lang/en.js | 1 + frontend/src/lang/tw.js | 1 + frontend/src/lang/zh.js | 1 + frontend/src/views/panel/ViewSelect/index.vue | 20 ++++++++++++++++--- 6 files changed, 36 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/canvas/components/Editor/SettingMenu.vue b/frontend/src/components/canvas/components/Editor/SettingMenu.vue index f06f8c256f..b15258661d 100644 --- a/frontend/src/components/canvas/components/Editor/SettingMenu.vue +++ b/frontend/src/components/canvas/components/Editor/SettingMenu.vue @@ -12,7 +12,7 @@ {{ $t('panel.upComponent') }} {{ $t('panel.downComponent') }} {{ $t('panel.linkage_setting') }} - 新增Tab + {{ $t('panel.add_tab') }} @@ -87,13 +87,13 @@ export default { paste() { this.$store.commit('paste', true) - this.$store.commit('recordSnapshot','paste') + this.$store.commit('recordSnapshot', 'paste') }, deleteComponent() { this.deleteCurCondition() this.$store.commit('deleteComponent') - this.$store.commit('recordSnapshot','deleteComponent') + this.$store.commit('recordSnapshot', 'deleteComponent') this.$store.commit('setCurComponent', { component: null, index: null }) }, @@ -106,22 +106,22 @@ export default { upComponent() { this.$store.commit('upComponent') - this.$store.commit('recordSnapshot','upComponent') + this.$store.commit('recordSnapshot', 'upComponent') }, downComponent() { this.$store.commit('downComponent') - this.$store.commit('recordSnapshot','downComponent') + this.$store.commit('recordSnapshot', 'downComponent') }, topComponent() { this.$store.commit('topComponent') - this.$store.commit('recordSnapshot','topComponent') + this.$store.commit('recordSnapshot', 'topComponent') }, bottomComponent() { this.$store.commit('bottomComponent') - this.$store.commit('recordSnapshot','bottomComponent') + this.$store.commit('recordSnapshot', 'bottomComponent') }, linkageSetting() { debugger diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index fb5adf25c0..26ffb9a7b2 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -46,12 +46,16 @@ :append-to-body="true" :visible.sync="dialogVisible" width="30%" + :show-close="false" + :close-on-click-modal="false" center > @@ -66,6 +70,8 @@ :visible.sync="viewDialogVisible" width="20%" height="400px" + :show-close="false" + :close-on-click-modal="false" center >
@@ -251,8 +257,8 @@ export default { } } } - .de-tab-i { - transition: 0.3s; + /* .de-tab-i { + transition: 0.1s; opacity: 0; transform: translateY(100%); } @@ -260,7 +266,7 @@ export default { .de-tab-drop:hover .de-tab-i { opacity: 1; transform: translateY(0); - } + } */ .de-tab-content { width: 100%; height: 100%; diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index cd37a4b8c3..fee7e203df 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1257,6 +1257,7 @@ export default { upComponent: 'Up One Level', downComponent: 'Down One Level', linkage_setting: 'Linkage Setting', + add_tab: 'Add Tab', open_aided_design: 'Open Component Aided Design', close_aided_design: 'Close Component Aided Design', open_style_design: 'Open Style Design', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index eb23430481..36c6a44c81 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1260,6 +1260,7 @@ export default { upComponent: '上移', downComponent: '下移', linkage_setting: '聯動設置', + add_tab: '新增Tab', open_aided_design: '打開組件輔助設計', close_aided_design: '關閉組件輔助設計', open_style_design: '打開樣式設計', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index e9a66cf889..a06788ef86 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1265,6 +1265,7 @@ export default { upComponent: '上移', downComponent: '下移', linkage_setting: '联动设置', + add_tab: '新增Tab', open_aided_design: '打开组件辅助设计', close_aided_design: '关闭组件辅助设计', open_style_design: '打开样式设计', diff --git a/frontend/src/views/panel/ViewSelect/index.vue b/frontend/src/views/panel/ViewSelect/index.vue index 3d2a959cba..e19213c975 100644 --- a/frontend/src/views/panel/ViewSelect/index.vue +++ b/frontend/src/views/panel/ViewSelect/index.vue @@ -36,7 +36,6 @@ @check="checkChanged" @node-drag-end="dragEnd" - > @@ -84,7 +83,8 @@ export default { defaultExpandedKeys: [], defaultProps: { children: 'children', - label: 'name' + label: 'name', + disabled: 'disabled' }, data: [], showdetail: false, @@ -114,7 +114,11 @@ export default { const param = {} this.loading = true tree(param).then(res => { - this.data = res.data + const nodeDatas = res.data + if (this.selectModel) { + this.setParentDisable(nodeDatas) + } + this.data = nodeDatas this.loading = false }) }, @@ -156,6 +160,16 @@ export default { const nodes = this.$refs.templateTree.getCheckedNodes(true, false) return nodes }, + setParentDisable(nodes) { + nodes.forEach(node => { + if (node.type === 'group') { + node.disabled = true + } + if (node.children && node.children.length > 0) { + this.setParentDisable(node.children) + } + }) + }, viewComponentInfo() { let component // 用户视图设置 复制一个模板