Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: data export (#10524)

ecmadao2afaa538a703
diff --git a/frontend/src/components/DataExportButton.vue b/frontend/src/components/DataExportButton.vue
index 3005fd146e..daf33cf7a8 100644
--- a/frontend/src/components/DataExportButton.vue
+++ b/frontend/src/components/DataExportButton.vue
@@ -92,9 +92,7 @@
<div class="w-80">
<span class="textinfolabel">{{ $t("export-data.password-info") }}</span>
<BBTextField
- v-model:value="formData.password"
- type="password"
- :input-props="{ autocomplete: 'off' }"
+ v-modal:value="formData.password"
class="my-2"
:focus-on-mount="true"
/>
@@ -265,7 +263,7 @@ const doExport = async () => {
state.isRequesting = true;
try {
- await emit("export", formData.value, doDownload);
+ await emit("export", { ...formData.value }, doDownload);
} catch (error) {
pushNotification({
module: "bytebase",
@@ -318,8 +316,10 @@ const doDownload = (content: BinaryLike | Blob, options: ExportOption) => {
watch(
() => [state.showDrawer, state.showModal],
([showDrawer, showModal]) => {
- if (showDrawer || showModal) {
+ if (showDrawer) {
formData.value = defaultFormData();
+ } else if (showModal) {
+ formData.value.password = "";
}
},
{ immediate: true }
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index be19a9f61c..06ece0e576 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2294,7 +2294,7 @@
"use-tips": "选择需要编辑的数据库或者表",
"preview-issue": "预览工单",
"sync-sql-from-schema-editor": "从 Schema 编辑器中同步 SQL",
- "raw-sql": "SQL 语句",
+ "raw-sql": "粘贴 Schema 文本",
"search-database-and-table": "搜索数据库和表",
"search-table": "搜索表",
"search-column": "搜索列",
@@ -3364,7 +3364,7 @@
},
"change-source": {
"self": "变更来源",
- "raw-sql": "SQL 语句",
+ "raw-sql": "粘贴 Schema 文本",
"change-history": {
"tables": "表"
},