y595705120 3 年之前
父節點
當前提交
c2e012cf73
共有 2 個文件被更改,包括 12 次插入4 次删除
  1. 4 2
      src/components/Tinymce/index.vue
  2. 8 2
      src/components/Upload/uploadFile.vue

+ 4 - 2
src/components/Tinymce/index.vue

@@ -139,7 +139,7 @@ export default {
         toolbar: this.toolbar.length > 0 ? this.toolbar : toolbar,
         menubar: this.menubar,
         plugins: plugins,
-        // content_css : "tinymce.css",
+        content_css : "tinymce.css",
         entity_encoding : "raw",
         remove_linebreaks : false,
         forced_root_block: false,
@@ -153,7 +153,7 @@ export default {
         code_dialog_width: 900,
         advlist_bullet_styles: 'square',
         advlist_number_styles: 'default',
-        imagetools_cors_hosts:  ['account.aliyun.com'],
+        imagetools_cors_hosts:  ['smoa.ndjsxh.cn:8888'],
         default_link_target: '_blank',
         // table_default_styles: {
         // 	width: '80%',
@@ -161,11 +161,13 @@ export default {
         //   cellspacing:"0",
         //   cellpadding:"0"
         // },
+        convert_urls: false,
         automatic_uploads: false,
         remove_linebreaks: false,
         link_title: true,
         relative_urls: false,
         paste_data_images: false,
+        remove_script_host: false,
         nonbreaking_force_tab: true, // inserting nonbreaking space   need Nonbreaking Space Plugin
         init_instance_callback: editor => {
           if (_this.value) {

+ 8 - 2
src/components/Upload/uploadFile.vue

@@ -12,12 +12,15 @@
         :on-change="handleChange"
       >
         <span style="float: left;">
-          <el-button plain type="primary" size="small" icon="el-icon-plus">
+          <el-button v-if="!filename" plain type="primary" size="small" icon="el-icon-plus">
             选择文件
           </el-button>
+          <el-button v-else plain type="primary" size="small" icon="el-icon-plus" @click="handleRemove">
+            重新上传
+          </el-button>
         </span>
 
-        <span style="margin-left: 20px;">
+        <span style="margin-left: 20px;" v-if="filename">
           {{filename||''}}
         </span>
         <br>
@@ -46,6 +49,9 @@ export default {
     uploadFile() {
       this.$refs.upload.submit();
     },
+	handleRemove(e ){
+    this.$refs.upload.clearFiles();
+	},
     uploadBefore(file) {
       const maxSize = file.size / 1024 / 1024 < 10;
       if (!maxSize) {