From ff94e12ff5039faeb0a5e997da50a9347410ebc8 Mon Sep 17 00:00:00 2001 From: BTMuli Date: Wed, 19 Nov 2025 00:07:13 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20=E8=B0=83=E6=95=B4=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/userGacha/ugo-uid.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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) {