From 84d0c96a13168db603fb6e89f116bb96cf78a009 Mon Sep 17 00:00:00 2001
From: yangxiaolu3 <962468124@qq.com>
Date: Mon, 18 Apr 2022 15:51:54 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20comment=20=E5=9B=BD=E9=99=85=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/packages/__VUE/comment/components/CmtBottom.vue | 10 +++++-----
src/packages/__VUE/comment/index.vue | 8 ++++----
src/packages/locale/lang/baseLang.ts | 5 +++++
src/packages/locale/lang/en-US.ts | 5 +++++
src/packages/locale/lang/zh-CN.ts | 5 +++++
5 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/src/packages/__VUE/comment/components/CmtBottom.vue b/src/packages/__VUE/comment/components/CmtBottom.vue
index 9c7228035f..c43a8a3b75 100644
--- a/src/packages/__VUE/comment/components/CmtBottom.vue
+++ b/src/packages/__VUE/comment/components/CmtBottom.vue
@@ -13,9 +13,9 @@
-
+
@@ -26,7 +26,7 @@
import { ref, watch, onMounted } from 'vue';
import { createComponent } from '../../../utils/create';
-const { componentName, create } = createComponent('comment-bottom');
+const { componentName, create, translate } = createComponent('comment-bottom');
export default create({
props: {
@@ -76,7 +76,7 @@ export default create({
emit('handleClick');
};
- return { showPopver, operate, mergeOp, handleClick };
+ return { showPopver, operate, mergeOp, handleClick, translate };
}
});
diff --git a/src/packages/__VUE/comment/index.vue b/src/packages/__VUE/comment/index.vue
index bdb6d1ecc3..fc4bd17829 100644
--- a/src/packages/__VUE/comment/index.vue
+++ b/src/packages/__VUE/comment/index.vue
@@ -20,11 +20,11 @@
@@ -42,7 +42,7 @@
diff --git a/src/packages/locale/lang/baseLang.ts b/src/packages/locale/lang/baseLang.ts
index 290be46b08..33b5fa508e 100644
--- a/src/packages/locale/lang/baseLang.ts
+++ b/src/packages/locale/lang/baseLang.ts
@@ -50,4 +50,9 @@ export interface BaseLang {
deliveryTo: string;
chooseAnotherAddress: string;
};
+ comment: {
+ complaintsText: string;
+ additionalReview: Function;
+ additionalImages: Function;
+ };
}
diff --git a/src/packages/locale/lang/en-US.ts b/src/packages/locale/lang/en-US.ts
index 56860926e6..c0203f253d 100644
--- a/src/packages/locale/lang/en-US.ts
+++ b/src/packages/locale/lang/en-US.ts
@@ -50,6 +50,11 @@ const lang: BaseLang = {
selectRegion: 'Select Region',
deliveryTo: 'Delivery To',
chooseAnotherAddress: 'Choose Another Address'
+ },
+ comment: {
+ complaintsText: 'I have a complaint',
+ additionalReview: (day: number) => `Review after ${day} days of purchase`,
+ additionalImages: (length: number) => `There are ${length} follow-up comments`
}
};
export default lang;
diff --git a/src/packages/locale/lang/zh-CN.ts b/src/packages/locale/lang/zh-CN.ts
index f86f5c1e5f..879e2a05b5 100644
--- a/src/packages/locale/lang/zh-CN.ts
+++ b/src/packages/locale/lang/zh-CN.ts
@@ -50,6 +50,11 @@ const lang: BaseLang = {
selectRegion: '请选择所在地区',
deliveryTo: '配送至',
chooseAnotherAddress: '选择其他地址'
+ },
+ comment: {
+ complaintsText: '我要投诉',
+ additionalReview: (day: number) => `购买${day}天后追评`,
+ additionalImages: (length: number) => `${length}张追评图片`
}
};
export default lang;