PrinceLee 5 年之前
父节点
当前提交
381e707a39

+ 6 - 4
package.json

@@ -23,7 +23,7 @@
     "@fullcalendar/list": "^4.4.0",
     "@fullcalendar/timegrid": "^4.4.0",
     "@fullcalendar/vue": "^4.4.0",
-    "@tinymce/tinymce-vue": "^3.2.0",
+    "@tinymce/tinymce-vue": "^3.2.2",
     "animate.css": "^3.7.2",
     "axios": "0.18.0",
     "core-js": "^2.6.11",
@@ -37,6 +37,8 @@
     "html2canvas": "^1.0.0-rc.3",
     "js-cookie": "2.2.0",
     "jspdf": "^1.5.3",
+    "less": "^2.7.3",
+    "less-loader": "^6.1.0",
     "lodash": "^4.17.15",
     "moment": "^2.25.3",
     "normalize.css": "7.0.0",
@@ -46,7 +48,7 @@
     "simditor": "^2.3.26",
     "sortablejs": "^1.10.2",
     "swiper": "^5.3.6",
-    "tinymce": "^5.2.2",
+    "tinymce": "^5.3.1",
     "tinymce-vue": "^1.0.0",
     "v-jsoneditor": "^1.2.2",
     "vue": "2.6.10",
@@ -82,9 +84,9 @@
     "less": "^2.7.2",
     "less-loader": "^6.1.0",
     "mockjs": "1.0.1-beta3",
-    "node-sass": "^4.9.0",
+    "node-sass": "^4.14.1",
     "runjs": "^4.3.2",
-    "sass-loader": "^7.1.0",
+    "sass-loader": "^7.3.1",
     "script-ext-html-webpack-plugin": "2.1.3",
     "script-loader": "^0.7.2",
     "serve-static": "^1.13.2",

+ 8 - 12
src/components/input/textArea.vue

@@ -6,16 +6,7 @@
     </div>
     <div v-show="edit">
       <el-tooltip effect="dark" content="单击‘编辑’,失去焦点 ‘保存’" placement="bottom">
-        <el-input
-          ref="textarea"
-          v-model="inputValue"
-          rows="10"
-          type="textarea"
-          placeholder="请输入内容"
-          show-word-limit
-          style="margin: 3% 0;"
-          @blur="blur_textarea(inputValue)"
-        />
+        <my-tinymce ref="myTinymce" :tinymce-html="value" :tinymce-height="setHeight" />
       </el-tooltip>
     </div>
     <div v-show="!isEmpty && !edit">
@@ -24,7 +15,11 @@
   </div>
 </template>
 <script>
+import myTinymce from '@/views/Platform/MyTinymce/MyTinymce.vue'
 export default {
+  components: {
+    myTinymce
+  },
   props: {
     value: {
       type: String,
@@ -50,7 +45,8 @@ export default {
   data() {
     return {
       inputValue: '',
-      edit: false
+      edit: false,
+      setHeight: 200
     }
   },
   computed: {
@@ -69,8 +65,8 @@ export default {
   methods: {
     ImmediateAddition() {
       // 立即添加(编辑)
-      this.$refs.textarea.focus()
       this.edit = true
+      // this.$refs.textarea.focus()
     },
     blur_textarea() {
       this.edit = false

+ 2 - 2
src/views/Platform/MyTinymce/MyTinymce.vue

@@ -37,9 +37,9 @@ export default {
       value: this.tinymceHtml, // 父组件通过ref拿到该组件的值
       init: {
         selector: '#tinymce',
-        language_url: '/tinymce/langs/zh_CN.js',
+        language_url: 'public/tinymce/langs/zh_CN.js',
         language: 'zh_CN',
-        skin_url: '/tinymce/skins/ui/oxide', // 编辑器需要一个skin才能正常工作,所以要设置一个skin_url指向之前复制出来的skin文件
+        skin_url: 'public/tinymce/skins/ui/oxide', // 编辑器需要一个skin才能正常工作,所以要设置一个skin_url指向之前复制出来的skin文件
         height: this.tinymceHeight,
         browser_spellcheck: true, // 拼写检查
         branding: false, // 去水印

+ 1 - 1
src/views/projectManage/projectList/projectViewDetails.vue

@@ -225,7 +225,7 @@ export default {
   },
   data() {
     return {
-      activeName: '3', // 顶部tab切换
+      activeName: '1', // 顶部tab切换
       num: '',
       image_url: image_url,
       display: false,