diff --git a/src/component/home/tools/toProduct/index.vue b/src/component/home/tools/toProduct/index.vue index af22021f..baa5dcb5 100644 --- a/src/component/home/tools/toProduct/index.vue +++ b/src/component/home/tools/toProduct/index.vue @@ -197,17 +197,23 @@ class="selectText" v-show="productimgMenu.value == 'ToProductImage' && speedData.value" > -
- {{ $t('poseTransfer.hint') }} -
+ +
+ {{ promptText }} +
+
@@ -789,10 +795,10 @@ export default defineComponent({ // 设置默认prompt if (!productImgData.searchName[props.productimgMenu.value]) { - const isFromDesignPage = props.source == 'design' || props.isDesignPage + const isFromDesignPage = props.source == 'design' || props.isDesignPage const { ageGroup, httpType } = store.state.Workspace.probjects const isSingleDesign = httpType === 'SINGLE_DESIGN' - + if (!isFromDesignPage) { data.prompt = t('poseTransfer.UploadWithModel') } else if (ageGroup === 'Adult') { @@ -1136,6 +1142,42 @@ export default defineComponent({ ifMaximumLength() console.log('来源:---', props.source, props.isDesignPage) }) + + // 计算属性:根据条件生成提示词列表 + const promptTextList = computed(() => { + const isFromDesignPage = props.source === 'design' || props.isDesignPage + const { ageGroup, httpType } = store.state.Workspace.probjects + const isSingleDesign = httpType === 'SINGLE_DESIGN' + const isAdult = ageGroup === 'Adult' + + if (!isFromDesignPage) { + // 如果不是从design来的,返回两个提示词 + return [ + t('poseTransfer.UploadWithModel'), + t('poseTransfer.UploadWithoutModel') + ] + } else { + // 如果是从design来的 + if (isSingleDesign) { + // SINGLE_DESIGN: 两个提示词 + const secondPrompt = isAdult + ? t('poseTransfer.SingleAdultTryOn') + : t('poseTransfer.SingleChildTryOn') + return [ + t('poseTransfer.SingleGarment'), + secondPrompt + ] + } else { + // SERIES_DESIGN: 一个提示词 + return [ + isAdult + ? t('poseTransfer.SeriesAdultTryOn') + : t('poseTransfer.SeriesChildTryOn') + ] + } + } + }) + return { upload, driver__, @@ -1146,6 +1188,7 @@ export default defineComponent({ productimgMenuList, RelightDirectionList, RelightDirection, + promptTextList, setproduct, fileUploadChange, @@ -1494,12 +1537,13 @@ export default defineComponent({ .selectText { margin-bottom: 2rem; display: flex; + flex-direction: column; width: 100%; > div { background: #efeff1; width: 100%; font-size: 1.6rem; - margin-right: 1.2rem; + margin-bottom: 1.2rem; border-radius: 1.6rem; cursor: pointer; padding: 1.2rem; @@ -1509,8 +1553,8 @@ export default defineComponent({ &:hover { background: #f9fafa; } - &:first-child { - margin-right: 0; + &:last-child { + margin-bottom: 0; } } }