feat: 绘画页面对接腾讯混元文生图
This commit is contained in:
22
composables/useHistory.ts
Normal file
22
composables/useHistory.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user