设置store
This commit is contained in:
@@ -23,7 +23,18 @@ export const useGenerateStore = defineStore({
|
||||
photoInfo: {
|
||||
id: "",
|
||||
url: "",
|
||||
}
|
||||
file: null,
|
||||
},
|
||||
/** AI魔改信息 */
|
||||
customizeInfo: {
|
||||
inputText:"",
|
||||
|
||||
tryOnId: "",
|
||||
tryOnUrl: "",
|
||||
styleUrl: "",
|
||||
isRegenerated: "",
|
||||
isFavorite: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
@@ -65,6 +76,16 @@ export const useGenerateStore = defineStore({
|
||||
updatePhotoInfo(data: any) {
|
||||
this.photoInfo.id = data.visitRecordId || ""
|
||||
this.photoInfo.url = data.defaultImageUrl || ""
|
||||
this.photoInfo.file = null
|
||||
},
|
||||
/** 更新AI魔改信息 */
|
||||
clearCustomizeInfo(data: any) {
|
||||
this.customizeInfo.inputText = data.inputText || ""
|
||||
this.customizeInfo.tryOnId = data.tryOnId || ""
|
||||
this.customizeInfo.tryOnUrl = data.tryOnUrl || ""
|
||||
this.customizeInfo.styleUrl = data.styleUrl || ""
|
||||
this.customizeInfo.isRegenerated = data.isRegenerated || ""
|
||||
this.customizeInfo.isFavorite = data.isFavorite || ""
|
||||
},
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user