Sfoglia il codice sorgente

自动翻译提示

dsy 1 mese fa
parent
commit
4757ebf58d
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      src/views/book/components/MultilingualFill.vue

+ 4 - 0
src/views/book/components/MultilingualFill.vue

@@ -158,6 +158,10 @@ export default {
       ];
     },
     textTrans() {
+      if (this.langList.find((item) => item.type === this.curLang).is_can_translation === 'false') {
+        this.$message.warning('该语言不支持自动翻译');
+        return;
+      }
       TextTrans({
         text: this.text.replace(/<[^>]+>/g, ''),
         from: 'zh',