Fix refresh application for mj (#24)
This commit is contained in:
1 parent
ab0605c616
commit
c923b1493b
5 files changed
+32
-7
No files matched your search
@@ -38,7 +38,7 @@ export default defineComponent({
|
||||
ElSkeleton,
|
||||
ElSkeletonItem
|
||||
},
|
||||
emits: ['update:modelValue', 'custom'],
|
||||
emits: ['update:modelValue', 'custom', 'refresh'],
|
||||
data() {
|
||||
return {
|
||||
job: 0
|
||||
@@ -55,6 +55,16 @@ export default defineComponent({
|
||||
return this.$store.state.midjourney.application;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tasks: {
|
||||
handler(val, oldVal) {
|
||||
if (val && oldVal && JSON.stringify(val) !== JSON.stringify(oldVal)) {
|
||||
this.$emit('refresh', val);
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
await this.$store.dispatch('midjourney/setImagineTasks', undefined);
|
||||
this.getImagineTasks();
|
||||
|
||||
@@ -39,7 +39,7 @@ export default defineComponent({
|
||||
ElSkeletonItem,
|
||||
ElCard
|
||||
},
|
||||
emits: ['update:modelValue', 'custom'],
|
||||
emits: ['update:modelValue', 'custom', 'refresh'],
|
||||
data(): IData {
|
||||
return {
|
||||
job: undefined
|
||||
@@ -74,6 +74,14 @@ export default defineComponent({
|
||||
await this.$store.dispatch('midjourney/setImagineTasks', undefined);
|
||||
this.getImagineTasks();
|
||||
}
|
||||
},
|
||||
tasks: {
|
||||
handler(val, oldVal) {
|
||||
if (val && oldVal && JSON.stringify(val) !== JSON.stringify(oldVal)) {
|
||||
this.$emit('refresh', val);
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
|
||||
Reference in new issue
Block a user