diff --git a/src/apps/coc-card/sections/ControlSection.vue b/src/apps/coc-card/sections/ControlSection.vue index 8914880..9209dd2 100644 --- a/src/apps/coc-card/sections/ControlSection.vue +++ b/src/apps/coc-card/sections/ControlSection.vue @@ -36,6 +36,7 @@ import LA, { LAEventID, FeatureNames } from '@/plugins/51la'; import { usePC, useViewData, usePageData } from '../hooks/useProviders'; import usePrintPaper from '../hooks/usePrintPaper'; +import useAppLs from '../hooks/useAppLs'; import { downloadFile } from '@/utils/file'; import type { COCCardViewData } from '../types/viewData'; @@ -56,6 +57,7 @@ interface Emits { } const emit = defineEmits(); +const ls = useAppLs(); const pc = usePC(); const viewData = useViewData(); const pageData = usePageData(); @@ -172,6 +174,10 @@ function actResetCard() { pc.value = reactive(createPC()); // reset viewData resetViewData(viewData); + // remove auto saved + nextTick(() => { + ls.removeItem('autoSaved'); + }); ElMessage.info('已重置人物卡'); morePanelVisible.value = false; diff --git a/src/apps/kp-ads/AppView.vue b/src/apps/kp-ads/AppView.vue index 0c5adb3..0aa7a7f 100644 --- a/src/apps/kp-ads/AppView.vue +++ b/src/apps/kp-ads/AppView.vue @@ -1,16 +1,47 @@ diff --git a/src/apps/kp-ads/models/keeperGroup.ts b/src/apps/kp-ads/models/keeperGroup.ts index e389eca..109a498 100644 --- a/src/apps/kp-ads/models/keeperGroup.ts +++ b/src/apps/kp-ads/models/keeperGroup.ts @@ -1,16 +1,11 @@ -import type { Story } from '../types/story'; -import type { KeeperGroupTableRow } from '../types/keeperGroup'; +import type { KeeperGroupTableRow, KeeperGroupField_List } from '../types/keeperGroup'; import StoryModel from './story'; export default class KeeperGroupModel { key?: string; type?: string; name?: string; - lists?: { - key: string; - title: string; - stories: Story[]; - }[]; + lists?: KeeperGroupField_List[]; constructor(row: KeeperGroupTableRow) { this.key = row.key; diff --git a/src/apps/kp-ads/types/keeperGroup.ts b/src/apps/kp-ads/types/keeperGroup.ts index 40c8853..b256762 100644 --- a/src/apps/kp-ads/types/keeperGroup.ts +++ b/src/apps/kp-ads/types/keeperGroup.ts @@ -1,11 +1,21 @@ +import type { Story } from './story'; + export interface KeeperGroupTableRow { key: string; type: 'personal' | 'group'; name: string; - lists: { - key: string; - title: string; - // [id, title], 任选一个即可 - stories: [string?, string?][]; - }[]; + lists: KeeperGroupTableField_List[]; +} + +export interface KeeperGroupTableField_List { + key: string; + title: string; + // [id, title], 任选一个即可 + stories: [string?, string?][]; +} + +export interface KeeperGroupField_List { + key: string; + title: string; + stories: Story[]; }