From 932fbf90156557de61186db7a28cb095b3b5401a Mon Sep 17 00:00:00 2001 From: YuanFeng <770153798@qq.com> Date: Wed, 9 Oct 2024 10:15:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E7=A8=BF=E4=BB=B6?= =?UTF-8?q?=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DraftDesign/components/DesignPropEdit.vue | 9 ++++++++- .../components/DraftDesign/components/DesignPropEdit.vue | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue index d67f4c6..4bf1430 100644 --- a/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue +++ b/hangtag-ui/hangtag-ui-admin/src/components/DraftDesign/components/DesignPropEdit.vue @@ -394,7 +394,14 @@ const changeData = (index: number, key: string) => { for (let i = 0; i < that.propInfo[key].dataInfo.length; i++) { for (let j = 0; j < mapping.length; j++) { if (that.propInfo[key].dataInfo[i].locale === mapping[j].locale) { - that.propInfo[key].dataInfo[i].label = mapping[j].value + + let str = that.propInfo[key].dataInfo[0].ratio; + if (str === null || str === undefined || str === -1) { + str = '' + } + const value = `${mapping[j].value}`.replaceAll('${r}', str) + console.log("value",value) + that.propInfo[key].dataInfo[i].label = value break; } } diff --git a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue index d67f4c6..4bf1430 100644 --- a/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue +++ b/hangtag-ui/hangtag-ui-front/src/components/DraftDesign/components/DesignPropEdit.vue @@ -394,7 +394,14 @@ const changeData = (index: number, key: string) => { for (let i = 0; i < that.propInfo[key].dataInfo.length; i++) { for (let j = 0; j < mapping.length; j++) { if (that.propInfo[key].dataInfo[i].locale === mapping[j].locale) { - that.propInfo[key].dataInfo[i].label = mapping[j].value + + let str = that.propInfo[key].dataInfo[0].ratio; + if (str === null || str === undefined || str === -1) { + str = '' + } + const value = `${mapping[j].value}`.replaceAll('${r}', str) + console.log("value",value) + that.propInfo[key].dataInfo[i].label = value break; } }