🚸 统一UIGF导出交互,导出前选择导出路径

This commit is contained in:
BTMuli
2026-03-22 00:40:41 +08:00
parent f9b64c5c6a
commit 2807ce48a6
3 changed files with 32 additions and 6 deletions

View File

@@ -70,8 +70,10 @@ import { computed, onMounted, ref, shallowRef, watch } from "vue";
type UgoUidProps = {
/** 导入/导出 */
mode: "import" | "export";
/** filePathImport路径 */
/** filePathImport路径 */
fpi?: string;
/** filePathExport导出路径 */
fpe?: string;
};
/**
* UID项
@@ -107,7 +109,7 @@ onMounted(async () => {
});
watch(
() => [visible.value, props.mode, props.fpi],
() => [visible.value, props.mode, props.fpi, props.fpe],
async () => {
if (visible.value) await refreshData();
},
@@ -127,7 +129,7 @@ async function refreshData(): Promise<void> {
fp.value = props.fpi ?? fpEmptyText;
await refreshImport();
} else {
fp.value = await getDefaultSavePath();
fp.value = props.fpe ?? (await getDefaultSavePath());
await refreshExport();
}
}