From 06640f8f41c02b39b2051213862c9526d1e963dd Mon Sep 17 00:00:00 2001 From: chenwenchang <479999519@qq.com> Date: Tue, 22 Oct 2024 15:53:11 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=20=E5=AF=86=E7=A0=81=E8=A7=84?= =?UTF-8?q?=E5=88=99=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=20#7031?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/components/db-tab/Index.vue | 10 +++- dbm-ui/frontend/src/locales/zh-cn.json | 5 ++ .../views/password-manage/policy/Index.vue | 6 ++- .../policy/components/Content.vue | 53 +++++++++++++++---- 4 files changed, 61 insertions(+), 13 deletions(-) diff --git a/dbm-ui/frontend/src/components/db-tab/Index.vue b/dbm-ui/frontend/src/components/db-tab/Index.vue index ea75e61a53..7ad49c1b87 100644 --- a/dbm-ui/frontend/src/components/db-tab/Index.vue +++ b/dbm-ui/frontend/src/components/db-tab/Index.vue @@ -29,11 +29,19 @@ import { DBTypeInfos, DBTypes } from '@common/const'; + interface Props { + exclude?: DBTypes[]; + } + interface TabItem { id: DBTypes; name: string; } + const props = withDefaults(defineProps(), { + exclude: () => [], + }); + const funControllerStore = useFunController(); const moduleValue = defineModel({ @@ -43,7 +51,7 @@ const renderTabs = Object.values(DBTypeInfos).reduce((result, item) => { const { id, name, moduleId } = item; const data = funControllerStore.funControllerData.getFlatData(moduleId); - if (data[id]) { + if (data[id] && !props.exclude.includes(id)) { result.push({ id, name }); } return result; diff --git a/dbm-ui/frontend/src/locales/zh-cn.json b/dbm-ui/frontend/src/locales/zh-cn.json index f0e27c8768..440b1479e2 100644 --- a/dbm-ui/frontend/src/locales/zh-cn.json +++ b/dbm-ui/frontend/src/locales/zh-cn.json @@ -3491,5 +3491,10 @@ "如忽略,有连接的情况下也会执行强制升级": "如忽略,有连接的情况下也会执行强制升级", "库表名支持数字、字母、中划线、下划线,最大64字符": "库表名支持数字、字母、中划线、下划线,最大64字符", "暂不支持 use 语句,请使用 db.table 指定 database": "暂不支持 use 语句,请使用 db.table 指定 database", + "请添加账号规则": "请添加账号规则", + "请指定特殊字符": "请指定特殊字符", + "特殊字符不允许包含空格": "特殊字符不允许包含空格", + "请输入除大小写字母、数字外的英文半角字符": "请输入除大小写字母、数字外的英文半角字符", + "请输入英文半角字符,重复字符将去重": "请输入英文半角字符,重复字符将去重", "这行勿动!新增翻译请在上一行添加!": "" } diff --git a/dbm-ui/frontend/src/views/password-manage/policy/Index.vue b/dbm-ui/frontend/src/views/password-manage/policy/Index.vue index 2d8bf2621f..18f49ae9f5 100644 --- a/dbm-ui/frontend/src/views/password-manage/policy/Index.vue +++ b/dbm-ui/frontend/src/views/password-manage/policy/Index.vue @@ -12,14 +12,16 @@ -->