This commit is contained in:
2026-02-10 19:24:46 +08:00
parent d59e4c0bb9
commit bef5c2f437
6 changed files with 94 additions and 5 deletions

View File

@@ -118,8 +118,13 @@
<div class="flex items-center gap-2 text-slate-500">
<span>{{ $t('workbenchesSetup.network') }}:</span>
<span class="text-blue-600 font-bold">{{ locale == 'zh' ? countryData : countryDataEN }}</span>
<button @click="refreshCountry" :disabled="isRefreshingCountry"
<button @click="editCountry" :disabled="isRefreshingCountry"
class="ml-1 p-1 rounded-md hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
:title="$t('workbenchesSetup.editCountry') || '编辑国家'">
<span class="material-icons-round text-slate-500 text-base">edit</span>
</button>
<button @click="refreshCountry" :disabled="isRefreshingCountry"
class="p-1 rounded-md hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
:title="$t('workbenchesSetup.refreshCountry') || '刷新国家'">
<span class="material-icons-round text-slate-500 text-base" :class="{ 'animate-spin': isRefreshingCountry }">refresh</span>
</button>
@@ -431,6 +436,11 @@ onMounted(async () => {
}, 1000 * 20)
})
// 编辑国家信息 - 使用共享 store
const editCountry = () => {
countryStore.showEditCountryDialog(t);
};
// 刷新国家信息 - 使用共享 store
const refreshCountry = async () => {
await countryStore.refreshCountry(t);