From c40e9437492f6973e631f42d8859d50182f777df Mon Sep 17 00:00:00 2001
From: long <515897141@qq.com>
Date: 星期一, 24 一月 2022 10:01:36 +0800
Subject: [PATCH] 删除富文本组件多余代码

---
 /dev/null |  129 -------------------------------------------
 1 files changed, 0 insertions(+), 129 deletions(-)

diff --git a/src/components/WangEnduit/index_new.vue b/src/components/WangEnduit/index_new.vue
deleted file mode 100644
index ad304ca..0000000
--- a/src/components/WangEnduit/index_new.vue
+++ /dev/null
@@ -1,129 +0,0 @@
-<template>
-  <div id="wangeditor">
-    <div ref="editorElem" style="text-align:left;" />
-  </div>
-</template>
-<script>
-import E from 'wangeditor'
-let self
-export default {
-  name: 'EditorElem',
-  props: {
-    catchdata: {
-      type: Function,
-      default() {}
-    },
-    content: {
-      type: String,
-      default: ''
-    },
-    rangenum: {
-      type: Range,
-      default: null
-    }
-  },
-  data() {
-    return {
-      editor: null,
-      editorContent: ''
-    }
-  }, // 鎺ユ敹鐖剁粍浠剁殑鏂规硶
-  watch: {
-    content(value) {
-      console.log('content**', value)
-      // console.log("娌℃湁鍏夋爣鍒欐墽琛岋紝鏈夊厜鏍囦笉鎵ц锛屽洖鏄�--瑙e喅杈撳叆鏃跺厜鏍囪�佽烦鍒版渶搴曢儴", this.content, this.rangenum)
-      if (this.rangenum == null) {
-        // this.content.setRange(this.rangenum)
-        this.editor.txt.html(value)
-      }
-    }
-  },
-  mounted() {
-    self = this
-    this.editor = new E(this.$refs.editorElem)
-    this.editor.config.focus = false
-    this.editor.config.onchange = (html) => {
-      this.editorContent = html
-      this.catchdata(this.editorContent) // 鎶婅繖涓猦tml閫氳繃catchData鐨勬柟娉曚紶鍏ョ埗缁勪欢
-    }
-    // 鍘绘帀鎻掑叆缃戠粶鍥剧墖
-    this.editor.config.showLinkImg = false
-    // 绮樿创鏉ョ殑鍐呭杩囨护鍥剧墖
-    this.editor.config.pasteIgnoreImg = true
-    this.editor.config.menus = [ // 鑿滃崟閰嶇疆
-      'head', // 鏍囬
-      'bold', // 绮椾綋
-      'fontSize', // 瀛楀彿
-      'fontName', // 瀛椾綋
-      'italic', // 鏂滀綋
-      'underline', // 涓嬪垝绾�
-      'strikeThrough', // 鍒犻櫎绾�
-      'foreColor', // 鏂囧瓧棰滆壊
-      'backColor', // 鑳屾櫙棰滆壊
-      'link', // 鎻掑叆閾炬帴
-      'list', // 鍒楄〃
-      'justify', // 瀵归綈鏂瑰紡
-      'quote', // 寮曠敤
-      // 'emoticon',  // 琛ㄦ儏
-      'image', // 鎻掑叆鍥剧墖
-      // 'table',  // 琛ㄦ牸
-      // 'code',  // 鎻掑叆浠g爜
-      'undo', // 鎾ら攢
-      'redo' // 閲嶅
-    ]
-    // 涓嬮潰鏄渶閲嶈鐨勭殑鏂规硶
-    // this.editor.config.withCredentials = true
-    // 灏嗗浘鐗囧ぇ灏忛檺鍒朵负 5M
-    this.editor.config.uploadImgMaxSize = 5 * 1024 * 1024
-    // 闄愬埗涓�娆℃渶澶氫笂浼� 1 寮犲浘鐗�
-    this.editor.config.uploadImgMaxLength = 1
-    // 涓嶅拷鐣ョ矘璐村唴瀹逛腑鐨勫浘鐗�
-    this.editor.config.pasteIgnoreImg = false
-    this.editor.config.customUploadImg = function(files, insert) {
-      // files 鏄� input 涓�変腑鐨勬枃浠跺垪琛�
-      // insert 鏄幏鍙栧浘鐗� url 鍚庯紝鎻掑叆鍒扮紪杈戝櫒鐨勬柟娉�
-      // 鍥犱负file鏄釜FormData鏍煎紡鐨勫璞℃墍浠ュ彲浠ョ洿鎺ラ�氳繃鎺ュ彛寮�濮嬩笂浼狅紝涓嶉渶瑕佸仛澶氫綑鎿嶄綔
-      // 铏界劧鏂囨。璇存槸FormData鏍煎紡锛屼絾鏄垜瀹為檯浣跨敤闇�瑕佷互涓嬫搷浣�
-      const formData = new FormData()
-      formData.append('file', files[0])
-      self.postFN(
-        {
-          url: 'admin/image/upload',
-          header: { 'Content-Type': 'multipart/form-data' },
-          params: formData,
-          mockData: {
-            code: 100,
-            msg: '',
-            data: {
-              imgUrl: 'xxxx'
-            }
-          }
-        },
-        inf => {
-          insert(inf.imgUrl)
-        }
-      )
-    }
-    // 鑷畾涔夐敊璇彁绀�
-    this.editor.config.customAlert = function(info) {
-      // info 鏄渶瑕佹彁绀虹殑鍐呭
-      self.$messagewarn(info)
-    }
-    this.editor.create() // 鍒涘缓瀵屾枃鏈疄渚�
-    // if (!this.content) {
-    //     // this.editor.txt.html('璇风紪杈戝唴瀹�1')
-    // }
-  }
-}
-</script>
-<style lang="scss" scoped>
-#wangeditor {
-    position: sticky;
-    /*璁剧疆瀵屾枃鏈楂樺害*/
-    .w-e-text-container{
-        height: 500px !important;
-    }
-
-}
-</style>
-

--
Gitblit v1.8.0