Skip to content

Commit

Permalink
fix: 修复切换名单后导出的仍是之前的名单的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
typed-sigterm committed Nov 3, 2024
1 parent af7a160 commit fc03e3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/settings/namelist/operations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
import IconExcel from '~icons/vscode-icons/file-type-excel';
const names = defineModel<RollCallOption[]>('names', { required: true });
const currentNamelist = useConfigStore().namelist;
const currentNamelist = computed(() => useConfigStore().namelist);
const { t } = useI18n({ useScope: 'local' });
const limited = computed(
() => useNamelistStore().namelist.length >= MAX_NAMELIST_COUNT,
);
const showBatchInput = ref(false);
const showImportExcel = ref(false);
function handleImportDone(items: string[]) {
names.value.push(...items);
}
const exporting = ref(false);
async function handleExport() {
exporting.value = true;
await exportNamelistToText(currentNamelist).catch((e) => {
await exportNamelistToText(currentNamelist.value).catch((e) => {
console.error(e);
alertError(e);
});
Expand Down

0 comments on commit fc03e3b

Please sign in to comment.