Files
xsh-assistant-next/composables/useHistory.ts
2024-03-20 18:00:04 +08:00

21 lines
391 B
TypeScript

import type {ResultBlockMeta} from '~/components/aigc/drawing';
export interface HistoryItem {
fid: string
data_id?: string
prompt: string
meta: ResultBlockMeta
images?: string[]
}
export const useHistory = defineStore('aigc_history', () => {
const text2img = ref<HistoryItem[]>([])
return {
text2img
}
}, {
persist: {
storage: persistedState.localStorage
}
})