Skip to content

Commit 3f1c3bc

Browse files
committed
fix: wrap model_change logic in nextTick for improved reactivity
--bug=1058686 --user=刘瑞斌 【应用编排】在图片生成节点切换模型,会带上一个模型的参数 https://www.tapd.cn/62980211/s/1730547
1 parent df9b7f2 commit 3f1c3bc

File tree

1 file changed

+8
-6
lines changed
  • ui/src/workflow/nodes/image-generate

1 file changed

+8
-6
lines changed

ui/src/workflow/nodes/image-generate/index.vue

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153

154154
<script setup lang="ts">
155155
import NodeContainer from '@/workflow/common/NodeContainer.vue'
156-
import { computed, onMounted, ref } from 'vue'
156+
import {computed, nextTick, onMounted, ref} from 'vue'
157157
import { groupBy, set } from 'lodash'
158158
import applicationApi from '@/api/application/application'
159159
import useStore from '@/stores'
@@ -225,11 +225,13 @@ function getSelectModel() {
225225
}
226226
227227
const model_change = () => {
228-
if (form_data.value.model_id) {
229-
AIModeParamSettingDialogRef.value?.reset_default(form_data.value.model_id, id)
230-
} else {
231-
refreshParam({})
232-
}
228+
nextTick(()=>{
229+
if (form_data.value.model_id) {
230+
AIModeParamSettingDialogRef.value?.reset_default(form_data.value.model_id, id)
231+
} else {
232+
refreshParam({})
233+
}
234+
})
233235
}
234236
235237
const openAIParamSettingDialog = (modelId: string) => {

0 commit comments

Comments
 (0)