|
|
@@ -6,7 +6,7 @@
|
|
|
<div class="page-add flex_1">
|
|
|
<div class="flex-center-between">
|
|
|
<el-input v-model="comments" placeholder="请输入" maxlength="500" style="width: 100%;flex:1"/>
|
|
|
- <el-button type="primary" size="large" @click="handleSend" style="height:44px" class="gradient">发送</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="handleSend" style="height:44px" class="gradient">{{$t('common.send')}}</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -38,6 +38,8 @@ import DGTMessage from '@/utils/message'
|
|
|
import Pagination from '@/components/Pagination.vue'
|
|
|
import { getCommentList,commentAdd } from '@/api/comment.js'
|
|
|
import { ref, onMounted,reactive,watch } from 'vue'
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
+const { t } = useI18n()
|
|
|
import { useAppStore } from '@/pinia/appStore'
|
|
|
const appStore = useAppStore()
|
|
|
const props = defineProps({
|
|
|
@@ -88,7 +90,7 @@ const getList = async (type) => {
|
|
|
// 发送评论
|
|
|
const handleSend = async () => {
|
|
|
if(!comments.value){
|
|
|
- DGTMessage.warning('请输入评论内容')
|
|
|
+ DGTMessage.warning(t('common.pleaseInputCommentContent'))
|
|
|
return
|
|
|
}
|
|
|
const res = await commentAdd({
|
|
|
@@ -96,7 +98,7 @@ const handleSend = async () => {
|
|
|
content: comments.value
|
|
|
})
|
|
|
if(res.code === 200){
|
|
|
- DGTMessage.success('评论成功')
|
|
|
+ DGTMessage.success(t('common.commentSuccess'))
|
|
|
comments.value = ''
|
|
|
getList();
|
|
|
}
|