소스 검색

默认翻译为中文

zq 1 일 전
부모
커밋
b55ae3ef35
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/components/TranslateDialog.vue

+ 2 - 2
src/components/TranslateDialog.vue

@@ -137,11 +137,11 @@ export default {
       };
       Texttrans(params)
         .then((res) => {
-          if (res.status == 1) {
+          if (res.status === 1) {
             this.translateResultList = res.trans_list || [];
           }
         })
-        .catch((err) => {
+        .catch(() => {
           this.$message.error('翻译失败');
         });
     },