diff --git a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/RenderDbName.vue b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/RenderDbName.vue index 6c71446a04..4f186b48dc 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/RenderDbName.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/RenderDbName.vue @@ -31,6 +31,7 @@ import { makeMap, random } from '@utils'; interface Props { + allowEmpty?: boolean; checkDuplicate?: boolean; } @@ -39,6 +40,7 @@ } const props = withDefaults(defineProps(), { + allowEmpty: false, checkDuplicate: false, }); @@ -57,7 +59,13 @@ const rules = [ { - validator: (value: string[]) => value && value.length > 0, + validator: (value: string[]) => { + if (props.allowEmpty) { + return true; + } + + return value && value.length > 0; + }, message: t('DB 名不能为空'), }, { diff --git a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/Row.vue b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/Row.vue index 6936ec1317..a579b7672a 100644 --- a/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/Row.vue +++ b/dbm-ui/frontend/src/views/db-manage/common/sql-execute/execute-objects/RenderData/Row.vue @@ -23,7 +23,8 @@ + v-model="localIgnoreDbnames" + allow-empty /> + :model-value="data.ignoreTables" + :required="false" /> {{ name }} @@ -72,7 +73,7 @@ import RenderDbName from '@views/mysql/common/edit-field/DbName.vue'; - export type DbsType = Omit + export type DbsType = Omit; interface Props { data: { @@ -147,38 +148,40 @@ }); diff --git a/dbm-ui/frontend/src/views/mysql/db-clear/pages/page1/components/RenderData/Row.vue b/dbm-ui/frontend/src/views/mysql/db-clear/pages/page1/components/RenderData/Row.vue index 7b82892e62..08bdcc0a2f 100644 --- a/dbm-ui/frontend/src/views/mysql/db-clear/pages/page1/components/RenderData/Row.vue +++ b/dbm-ui/frontend/src/views/mysql/db-clear/pages/page1/components/RenderData/Row.vue @@ -163,11 +163,10 @@ }; const handleIgnoreDbsChange = (value: string[]) => { - if (isDropDatabase.value && value.length > 0) { - ignoreTables.value = ['*']; - return; - } - + // if (isDropDatabase.value && value.length > 0) { + // ignoreTables.value = ['*']; + // return; + // } ignoreTables.value = []; }; diff --git a/dbm-ui/frontend/src/views/spider-manage/checksum/pages/page1/components/RenderData/Row.vue b/dbm-ui/frontend/src/views/spider-manage/checksum/pages/page1/components/RenderData/Row.vue index e5a855024d..6df094ff8c 100644 --- a/dbm-ui/frontend/src/views/spider-manage/checksum/pages/page1/components/RenderData/Row.vue +++ b/dbm-ui/frontend/src/views/spider-manage/checksum/pages/page1/components/RenderData/Row.vue @@ -82,7 +82,8 @@ ref="ignoreTablesRefs" :allow-asterisk="false" :cluster-id="localClusterId" - :model-value="backupInfoItem.ignoreTables" /> + :model-value="backupInfoItem.ignoreTables" + :required="false" /> { - if (isDropDatabase.value && value.length > 0) { - ignoreTables.value = ['*']; - return; - } - + // if (isDropDatabase.value && value.length > 0) { + // ignoreTables.value = ['*']; + // return; + // } ignoreTables.value = []; };