diff --git a/assets/images/fileIcon2.png b/assets/images/fileIcon2.png
new file mode 100644
index 0000000..c7c7e55
Binary files /dev/null and b/assets/images/fileIcon2.png differ
diff --git a/assets/images/fileIcon3.png b/assets/images/fileIcon3.png
new file mode 100644
index 0000000..32f90ed
Binary files /dev/null and b/assets/images/fileIcon3.png differ
diff --git a/assets/images/fileIcon4.png b/assets/images/fileIcon4.png
new file mode 100644
index 0000000..265762e
Binary files /dev/null and b/assets/images/fileIcon4.png differ
diff --git a/assets/images/fileIcon5.png b/assets/images/fileIcon5.png
new file mode 100644
index 0000000..395e337
Binary files /dev/null and b/assets/images/fileIcon5.png differ
diff --git a/pages/translate.vue b/pages/translate.vue
index 9d3c3be..1eb8ec9 100644
--- a/pages/translate.vue
+++ b/pages/translate.vue
@@ -29,7 +29,7 @@
识别
+ @input="inputChange">
@@ -43,7 +43,7 @@
+ @input="inputChange2">
@@ -77,14 +77,37 @@
:on-change="uploadChange"
:on-success="uploadSuccess"
:on-error="uploadError"
- accept=".docx,.xls,.xlsx,.ppt,.pptx,.pdf"
+ accept=".doc,.docx,.xls,.xlsx,.txt,.pdf"
action="/api/common/upload">
-
+
+
+

+
pdf
+
+
+
+
+

+
txt
+
+
+

+
xls/xlsx
+
+
+

+
doc/docx
+
+
点击文件上传
- 支持扩展名:docx、xls、xlsx、ppt、pptx、pdf格式
+ 支持扩展名:doc、docx、xls、xlsx、txt、pdf格式
-
+
+
+

+
pdf
+
+
+
+

+
jpg/jpeg/png/bmp
+
+
+
+
点击文件上传
@@ -149,7 +195,7 @@
-
@@ -239,6 +285,8 @@ const upload = ref()
const fileUrl = ref('')
const uid = ref('')
const timer2 = ref(1)
+const timer3 = ref(1)
+const timer4 = ref(1)
const socket = ref(null)
watch(currentLangModalStatus, (val) => {
@@ -283,13 +331,19 @@ watchEffect(() => {
async function inputChange() {
- const {data: data} = await translateApi.getAllLanguage({keyword: searchLanguage.value})
- language.value = data
+ clearTimeout(timer3.value)
+ timer3.value = setTimeout(async()=>{
+ const {data: data} = await translateApi.getAllLanguage({keyword: searchLanguage.value})
+ language.value = data
+ },1000)
}
async function inputChange2() {
- const {data: data} = await translateApi.getAllLanguage({keyword: searchLanguage2.value})
- language2.value = data
+ clearTimeout(timer4.value)
+ timer4.value = setTimeout(async()=>{
+ const {data: data} = await translateApi.getAllLanguage({keyword: searchLanguage2.value})
+ language2.value = data
+ },1000)
}
function changeTranslate(val: any) {
@@ -316,10 +370,10 @@ function beforeUpload(file: any) {
console.log(typeof fileExtName)
if(
fileExtName === 'docx' ||
+ fileExtName === 'doc' ||
fileExtName === 'xls' ||
fileExtName === 'xlsx' ||
- fileExtName === 'ppt' ||
- fileExtName === 'pptx' ||
+ fileExtName === 'txt' ||
fileExtName === 'pdf'
){
//进行上传成功的一些操作;
@@ -332,7 +386,7 @@ function beforeUpload(file: any) {
}
}else{
// 提醒只能上传的文件类型
- ElMessage.warning('只能上传.docx,.xls,.xlsx,.ppt,.pptx,.pdf类型的文件!');
+ ElMessage.warning('只能上传.docx,.xls,.xlsx,.txt,.pdf类型的文件!');
return false;
}
}
@@ -812,7 +866,7 @@ allLanguage()
font-weight: 600;
color: #333333;
line-height: 22px;
- margin-bottom: 49px;
+ margin-bottom: 30px;
display: flex;
justify-content: center;
align-items: center;
@@ -907,4 +961,37 @@ allLanguage()
border-radius: 16px;
background-color: #fff;
}
+.mt-32{
+ height: 140px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding-top: 40px;
+ background-color: #fff;
+ margin: 0;
+}
+.fileIcon{
+ display: flex;
+ // justify-content: center;
+ align-items: center;
+ margin-top: -10px;
+ margin-bottom: 15px;
+ .fileIconItem{
+ margin-left: 45px;
+ img{
+ width: 64px;
+ height: 64px;
+ }
+ }
+ .fileIcon_text{
+ font-size: 12px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #999999;
+ line-height: 17px;
+ }
+ .fileIcon_text2{
+ margin-top: -10px;
+ }
+}