Quellcode durchsuchen

fix: 内联撤销/重做按钮的 SVG 图标

Developer vor 2 Wochen
Ursprung
Commit
68c2cb30fa
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. BIN
      dist.zip
  2. 4 4
      src/components/editor/index.vue

BIN
dist.zip


+ 4 - 4
src/components/editor/index.vue

@@ -13,11 +13,11 @@ import 'quill/dist/quill.core.css'
 import 'quill/dist/quill.snow.css'
 import 'quill/dist/quill.bubble.css'
 import {
-    quillEditor,
-    Quill
+    quillEditor
 } from 'vue-quill-editor'
-const undoIcon = Quill.import('ui/icons')['undo']
-const redoIcon = Quill.import('ui/icons')['redo']
+// Quill 1.3.6 的 ui/icons.js 不含 undo/redo,需手动注入 SVG
+const undoIcon = '<svg viewBox="0 0 18 18"><polygon class="ql-fill ql-stroke" points="6 10 4 12 2 10 2 14 6 14 4 12 6 10 8 7 14 7 14 11 16 11 16 4 8 4 6 7"></polygon></svg>'
+const redoIcon = '<svg viewBox="0 0 18 18"><polygon class="ql-fill ql-stroke" points="12 10 14 12 16 10 16 14 12 14 14 12 12 10 10 7 4 7 4 11 2 11 2 4 10 4 12 7"></polygon></svg>'
 const toolbarOptions = [
     [{
         'undo': undoIcon