bugfix: promptInput提示词内容不会变化

This commit is contained in:
zhangyh
2025-11-19 17:17:20 +08:00
parent 90d3a95ff4
commit 843d92b4aa
2 changed files with 82 additions and 65 deletions

View File

@@ -169,7 +169,7 @@
</div>
<div class="prompt-input-container" v-show="!showMotion">
<div class="title">{{ $t('ProductImg.Prompt') }}</div>
<promptInput :content="prompt" ref="promptInput" />
<promptInput :content="inputPrompt" ref="promptInput" />
</div>
<div class="poses" v-show="showMotion">
<div class="head">
@@ -371,15 +371,7 @@ export default defineComponent({
removeGenerate: false,
generateTime: null as any,
poseList: [],
selectPose: null as any,
prompt: computed(() => {
if (videoType.value === 2) {
return getFirstFrame(t)
}
if (videoType.value === 3) {
return getFirstAndLastFrame(t)
}
})
selectPose: null as any
})
let speed = reactive({
speedList: [
@@ -977,6 +969,14 @@ export default defineComponent({
const videoType = ref(2)
const showMotion = computed(() => videoType.value === 1)
const inputPrompt = computed(() => {
if (videoType.value === 2) {
return getFirstFrame(t)
}
if (videoType.value === 3) {
return getFirstAndLastFrame(t)
}
})
const options = ref([
{ vlaue: 2, label: t('poseTransfer.FirstFrame') },
{ value: 3, label: t('poseTransfer.FirstAndLastFrames') },
@@ -1265,7 +1265,8 @@ export default defineComponent({
handleConfirmProduct,
productFrameList,
showFirstFrameUpload,
showLastFrameUpload
showLastFrameUpload,
inputPrompt
}
},
directives: {