Ver código fonte

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	QMPlusVuePage/src/view/example/rte/rte.vue
klausY 5 anos atrás
pai
commit
844c63acca

+ 34 - 13
QMPlusVuePage/package-lock.json

@@ -2858,7 +2858,8 @@
       "version": "4.6.0",
       "resolved": "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz",
       "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
-      "dev": true
+      "dev": true,
+      "optional": true
     },
     "coa": {
       "version": "2.0.2",
@@ -5217,7 +5218,8 @@
         "ansi-regex": {
           "version": "2.1.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -5238,12 +5240,14 @@
         "balanced-match": {
           "version": "1.0.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -5258,17 +5262,20 @@
         "code-point-at": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "concat-map": {
           "version": "0.0.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "console-control-strings": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -5385,7 +5392,8 @@
         "inherits": {
           "version": "2.0.3",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "ini": {
           "version": "1.3.5",
@@ -5397,6 +5405,7 @@
           "version": "1.0.0",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -5411,6 +5420,7 @@
           "version": "3.0.4",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
@@ -5418,12 +5428,14 @@
         "minimist": {
           "version": "0.0.8",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "minipass": {
           "version": "2.3.5",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.2",
             "yallist": "^3.0.0"
@@ -5442,6 +5454,7 @@
           "version": "0.5.1",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -5522,7 +5535,8 @@
         "number-is-nan": {
           "version": "1.0.1",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -5534,6 +5548,7 @@
           "version": "1.4.0",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -5619,7 +5634,8 @@
         "safe-buffer": {
           "version": "5.1.2",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "safer-buffer": {
           "version": "2.1.2",
@@ -5655,6 +5671,7 @@
           "version": "1.0.2",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -5674,6 +5691,7 @@
           "version": "3.0.1",
           "bundled": true,
           "dev": true,
+          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
@@ -5717,12 +5735,14 @@
         "wrappy": {
           "version": "1.0.2",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         },
         "yallist": {
           "version": "3.0.3",
           "bundled": true,
-          "dev": true
+          "dev": true,
+          "optional": true
         }
       }
     },
@@ -9831,7 +9851,8 @@
       "version": "4.0.8",
       "resolved": "https://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz",
       "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
-      "dev": true
+      "dev": true,
+      "optional": true
     },
     "rx-lite-aggregates": {
       "version": "4.0.8",

+ 33 - 31
QMPlusVuePage/src/view/example/rte/rte.vue

@@ -1,39 +1,41 @@
 <template>
-    <div class="edit_container">
-        <quill-editor
-                v-model="content"
-                ref="myQuillEditor"
-                :options="editorOption"
-                @blur="onEditorBlur($event)" @focus="onEditorFocus($event)"
-                @change="onEditorChange($event)">
-        </quill-editor>
-        <button v-on:click="saveHtml">保存</button>
-    </div>
+  <div class="edit_container">
+    <quill-editor
+      :options="editorOption"
+      @blur="onEditorBlur($event)"
+      @change="onEditorChange($event)"
+      @focus="onEditorFocus($event)"
+      ref="myQuillEditor"
+      v-model="content"
+    ></quill-editor>
+    <button v-on:click="saveHtml">保存</button>
+  </div>
 </template>
 
 <script>
-    export default {
-        name: 'App',
-        data(){
-            return {
-                content: `<p>hello world</p>`,
-                editorOption: {}
-            }
-        },computed: {
-            editor() {
-                return this.$refs.myQuillEditor.quill;
-            },
-        },methods: {
-            onEditorReady(editor) { // 准备编辑器
-            },
-            onEditorBlur(){}, // 失去焦点事件
-            onEditorFocus(){}, // 获得焦点事件
-            onEditorChange(){}, // 内容改变事件
-            saveHtml:function(event){
-                alert(this.content);
-            }
-        }
+export default {
+  name: 'App',
+  data() {
+    return {
+      content: `<p>hello world</p>`,
+      editorOption: {}
     }
+  },
+  computed: {
+    editor() {
+      return this.$refs.myQuillEditor.quill
+    }
+  },
+  methods: {
+    // onEditorReady(editor) { // 准备编辑器
+
+    // },
+    onEditorBlur() {}, // 失去焦点事件
+    onEditorFocus() {}, // 获得焦点事件
+    onEditorChange() {}, // 内容改变事件
+    saveHtml() {} // 保存方法
+  }
+}
 </script>
 
 <style>

+ 5 - 4
QMPlusVuePage/src/view/example/upload/upload.vue

@@ -91,15 +91,16 @@ export default {
       }
       return (isPng || isJPG) && isLt2M
     },
-    uploadSuccess(res, file) {
-      console.log(res, file)
+    uploadSuccess(res) {
       this.$message({
         type: 'success',
         message: '上传成功'
       })
-      this.getTableData()
+      if(res.success){
+        this.getTableData()
+      }
     },
-    uploadError(err) {
+    uploadError() {
       this.$message({
         type: 'error',
         message: '上传失败'