Files
xsh-assistant-next/composables/useHistory.ts

22 lines
418 B
TypeScript

import {string} from 'yup';
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
}
})