From 71d0b343ed651a1a7a05e823ee0ed56e6b2e949d Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 31 May 2022 23:15:16 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E5=8D=A1=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/widget/DeWidget/DeTabs.vue | 8 ++++++-- frontend/src/lang/en.js | 3 ++- frontend/src/lang/tw.js | 3 ++- frontend/src/lang/zh.js | 3 ++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 3aef14dd72..4fff2799ea 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -333,13 +333,17 @@ export default { this.styleChange() } }) + this.otherComponentDialogVisible = false + return } - this.otherComponentDialogVisible = false + this.$warning(this.$t('detabs.please') + this.$t('detabs.selectOthers')) + }, sureViewSelector() { const nodes = this.$refs.viewSelect.getCurrentSelected() if (!nodes || nodes.length === 0) { - this.viewDialogVisible = false + this.$warning(this.$t('detabs.please') + this.$t('detabs.selectview')) + return } const node = nodes[0] diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index 8e627521c0..9398ba7623 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -416,7 +416,8 @@ export default { eidttitle: 'Edit Title', selectview: 'Select View', selectOthers: 'Select Others', - availableComponents: 'Available Components' + availableComponents: 'Available Components', + please: 'Please' }, example: { warning: 'Creating and editing pages cannot be cached by keep-alive because keep-alive include does not currently support caching based on routes, so it is currently cached based on component name. If you want to achieve a similar caching effect, you can use a browser caching scheme such as localStorage. Or do not use keep-alive include to cache all pages directly. See details' diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index fd8c401e24..98289a8e2e 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -416,7 +416,8 @@ export default { eidttitle: '編輯標題', selectview: '選擇視圖', selectOthers: '選擇組件', - availableComponents: '可選組件' + availableComponents: '可選組件', + please: '未' }, example: { warning: '創建和編輯頁面是不能被 keep-alive 緩存的,因爲keep-alive 的 include 目前不支持根據路由來緩存,所以目前都是基於 component name 來進行緩存的。如果妳想類似的實現緩存效果,可以使用 localStorage 等瀏覽器緩存方案。或者不要使用 keep-alive 的 include,直接緩存所有頁面。詳情見' diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index cef09bc9d5..2d9678c76b 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -417,7 +417,8 @@ export default { eidttitle: '编辑标题', selectview: '选择视图', selectOthers: '选择组件', - availableComponents: '可选组件' + availableComponents: '可选组件', + please: '未' }, example: { warning: '创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见'