Ver código fonte

修改显示逻辑

lex-xin 5 anos atrás
pai
commit
095f78afc7

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/index.html


+ 0 - 1
dist/static/css/chunk-3e376684.2a094942.css

@@ -1 +0,0 @@
-.m-container[data-v-40e95af8]{min-width:100%}.el-input[data-v-40e95af8]{width:400px}[data-v-40e95af8] .ql-editor{min-height:300px}.el-button--primary[data-v-40e95af8],.el-button--primary[data-v-40e95af8]:active,.el-button--primary[data-v-40e95af8]:focus,.el-button--primary[data-v-40e95af8]:hover{background:#14928a;border-color:#14928a;color:#fff}.el-row[data-v-40e95af8]{margin-top:40px}.el-col[data-v-40e95af8]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-right:50%}.el-input-group[data-v-40e95af8]{width:200px;margin:0 20px}[data-v-40e95af8] .el-tree-node__content{height:40px!important}[data-v-40e95af8] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-40e95af8]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-40e95af8]{font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar[data-v-40e95af8]{width:120px;height:120px;display:block}.ivu-upload[data-v-40e95af8]{display:none}

+ 1 - 0
dist/static/css/chunk-908573a6.b0c0baf2.css

@@ -0,0 +1 @@
+.m-container[data-v-d0f1b364]{min-width:100%}.el-input[data-v-d0f1b364]{width:400px}[data-v-d0f1b364] .ql-editor{min-height:300px}.el-button--primary[data-v-d0f1b364],.el-button--primary[data-v-d0f1b364]:active,.el-button--primary[data-v-d0f1b364]:focus,.el-button--primary[data-v-d0f1b364]:hover{background:#14928a;border-color:#14928a;color:#fff}.el-row[data-v-d0f1b364]{margin-top:40px}.el-col[data-v-d0f1b364]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-right:50%}.el-input-group[data-v-d0f1b364]{width:200px;margin:0 20px}[data-v-d0f1b364] .el-tree-node__content{height:40px!important}[data-v-d0f1b364] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-d0f1b364]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-d0f1b364]{font-size:28px;color:#8c939d;width:120px;height:120px;line-height:120px;text-align:center}.avatar[data-v-d0f1b364]{width:120px;height:120px;display:block}.ivu-upload[data-v-d0f1b364]{display:none}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.4241ec80.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-3e376684.0193c6ef.js


+ 0 - 0
dist/static/js/chunk-6c979a3e.459df882.js → dist/static/js/chunk-6c979a3e.020d37ea.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/chunk-908573a6.bd6cf740.js


+ 23 - 20
src/views/contentManager/contentOperation.vue

@@ -44,7 +44,8 @@
         <el-form-item label="内容" prop="content">
           <!-- bidirectional data binding(双向数据绑定) -->
           <quill-editor
-            v-model.trim="form.content"
+            class="ql-editor"
+            v-model="form.content"
             ref="myQuillEditor"
             :options="editorOption"
             @change="onEditorChange($event)"
@@ -99,7 +100,7 @@ import { vaildStudentUrl } from "@/utils/validate";
 import "quill/dist/quill.core.css";
 import "quill/dist/quill.snow.css";
 import "quill/dist/quill.bubble.css";
-import Quill from 'quill'
+import Quill from "quill";
 import { quillEditor } from "vue-quill-editor";
 // 工具栏配置
 const toolbarOptions = [
@@ -140,22 +141,22 @@ const titleConfig = {
   "ql-direction": "文本方向",
   "ql-code-block": "代码块",
   "ql-formula": "公式",
-  'ql-image': '图片',
+  "ql-image": "图片",
   "ql-video": "视频",
   "ql-clean": "清除字体样式",
   "ql-upload": "文件"
 };
 
 // 这里引入修改过的video模块并注册
-import Video from '../quill/video.js'
-Quill.register(Video, true)
+import Video from "../quill/video.js";
+Quill.register(Video, true);
 export default {
   name: "contentOperation",
   components: {
     quillEditor
   },
   data() {
-    let that = this
+    let that = this;
     return {
       categoryList: [],
       type: this.$route.query.type,
@@ -183,10 +184,10 @@ export default {
               },
               video: function(value) {
                 if (value) {
-                  that.dialogFormVisible = true
-                  let editor = that.$refs.myQuillEditor.quill
+                  that.dialogFormVisible = true;
+                  let editor = that.$refs.myQuillEditor.quill;
                   // 光标所在位置
-                  that.editorIndex = editor.getSelection().index
+                  that.editorIndex = editor.getSelection().index;
                 } else {
                   this.quill.format("image", false);
                 }
@@ -200,7 +201,9 @@ export default {
         url: null
       },
       dialogFormRules: {
-        poster: [{ required: true, message: "请输入封面地址", trigger: "blur" }],
+        poster: [
+          { required: true, message: "请输入封面地址", trigger: "blur" }
+        ],
         url: [{ required: true, message: "请输入视屏地址", trigger: "blur" }]
       },
       form: {
@@ -266,19 +269,19 @@ export default {
     onVideoComfirm(formName) {
       this.$refs[formName].validate(valid => {
         if (valid) {
-          let dialogForm = this.dialogForm
+          let dialogForm = this.dialogForm;
           // 获取富文本组件实例
           let quill = this.editor;
           // 插入图片,res为服务器返回的图片链接地址
           quill.insertEmbed(this.editorIndex, "video", dialogForm);
           // 调整光标到最后
           quill.setSelection(this.editorIndex + 1);
-          
-          this.dialogFormVisible = false
+
+          this.dialogFormVisible = false;
           this.dialogForm = {
             poster: null,
             url: null
-          }
+          };
         } else {
           return false;
         }
@@ -411,20 +414,20 @@ export default {
       let tempTitle = {
         1: "精彩活动",
         2: "热门资讯",
-        3: "活动列表",
         4: "专项训练",
         5: "闪页管理",
+        3: "BANNER管理",
         6: "APP按钮管理"
       };
       return tempTitle[type];
     },
     typeIndex(type) {
       let tempTitle = {
-        3: 0,
-        1: 1,
-        2: 2,
-        4: 3,
-        5: 4,
+        1: 0,
+        2: 1,
+        3: 4,
+        4: 2,
+        5: 3,
         6: 5
       };
       return tempTitle[type];

+ 6 - 0
src/views/contentManager/index.vue

@@ -43,6 +43,12 @@ import training from './components/training'
 import flashPage from './components/flashPage'
 import appPage from './components/appPage'
 import { permission } from '@/utils/directivePage'
+// 精彩活动 1 0
+// 热门资讯 2 1
+// 专项训练 4 2
+// 闪页管理 5  3
+// BANNER管理 3 4
+// APP按钮管理 6 5
 export default {
   components: { banner, activity, information, training, flashPage, appPage},
   name: 'contentManager',

+ 1 - 1
src/views/quill/video.js

@@ -4,7 +4,7 @@ import { Quill } from 'vue-quill-editor'
 const BlockEmbed = Quill.import('blots/block/embed')
 const Link = Quill.import('formats/link')
 
-const ATTRIBUTES = ['height', 'width']
+const ATTRIBUTES = ['height', 'width', 'src', 'poster']
 
 class Video extends BlockEmbed {
   static create (value) {

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff