From f18add1bfa4bf058dc1abd5765b335652dbff9e9 Mon Sep 17 00:00:00 2001 From: zhangyh Date: Fri, 7 Nov 2025 15:28:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=B9=E6=8D=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E6=98=AFdesign/=E6=98=AF=E5=90=A6=E5=8D=95=E5=93=81/=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=88=90=E5=B9=B4=E5=B1=95=E7=A4=BA=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/home/tools/toProduct/index.vue | 74 ++++++++++++++++---- 1 file changed, 59 insertions(+), 15 deletions(-) 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; } } }