diff --git a/src/components/userGacha/ugo-uid.vue b/src/components/userGacha/ugo-uid.vue index 6ecbf3cc..985ad152 100644 --- a/src/components/userGacha/ugo-uid.vue +++ b/src/components/userGacha/ugo-uid.vue @@ -62,9 +62,11 @@ import { computed, onMounted, ref, shallowRef, watch } from "vue"; type UgoUidProps = { mode: "import" | "export" }; type UgoUidItem = { uid: string; length: number; time: string }; +const fpEmptyText = "点击选择文件路径"; + const props = defineProps(); const visible = defineModel(); -const fp = ref("未选择"); +const fp = ref(fpEmptyText); const dataRaw = shallowRef(); const data = shallowRef>([]); const selectedData = shallowRef>([]); @@ -91,7 +93,7 @@ async function refreshData(): Promise { data.value = []; dataRaw.value = undefined; if (props.mode === "import") { - fp.value = "未选择"; + fp.value = fpEmptyText; await handleImportData(); } else { fp.value = await getDefaultSavePath(); @@ -118,7 +120,7 @@ async function selectFile(): Promise { } async function handleImportData(): Promise { - if (fp.value === "未选择") return; + if (fp.value === fpEmptyText) return; try { await showLoading.start("正在导入数据...", "正在验证数据..."); const check = await verifyUigfData(fp.value, true); @@ -178,7 +180,7 @@ async function handleSelected(): Promise { async function handleImport(): Promise { if (!dataRaw.value) { showSnackbar.error("未获取到数据!"); - fp.value = "未选择"; + fp.value = fpEmptyText; return; } if (selectedData.value.length === 0) {