Browse Source

新增在线编辑组件

ai_dev
zhouhaibin 1 week ago
parent
commit
fd11715900
  1. 23
      package.json
  2. 1
      src/views/CanvasEditor/assets/images/alignment.svg
  3. 1
      src/views/CanvasEditor/assets/images/arrow-left.svg
  4. 1
      src/views/CanvasEditor/assets/images/arrow-right.svg
  5. 1
      src/views/CanvasEditor/assets/images/block.svg
  6. 1
      src/views/CanvasEditor/assets/images/bold.svg
  7. 1
      src/views/CanvasEditor/assets/images/catalog.svg
  8. 1
      src/views/CanvasEditor/assets/images/center.svg
  9. 1
      src/views/CanvasEditor/assets/images/checkbox.svg
  10. 1
      src/views/CanvasEditor/assets/images/close.svg
  11. 1
      src/views/CanvasEditor/assets/images/codeblock.svg
  12. 1
      src/views/CanvasEditor/assets/images/color.svg
  13. 1
      src/views/CanvasEditor/assets/images/control.svg
  14. 1
      src/views/CanvasEditor/assets/images/date.svg
  15. 1
      src/views/CanvasEditor/assets/images/exit-fullscreen.svg
  16. 1
      src/views/CanvasEditor/assets/images/format.svg
  17. 1
      src/views/CanvasEditor/assets/images/highlight.svg
  18. 1
      src/views/CanvasEditor/assets/images/hyperlink.svg
  19. 1
      src/views/CanvasEditor/assets/images/image.svg
  20. 1
      src/views/CanvasEditor/assets/images/italic.svg
  21. 7
      src/views/CanvasEditor/assets/images/justify.svg
  22. 1
      src/views/CanvasEditor/assets/images/latex.svg
  23. 1
      src/views/CanvasEditor/assets/images/left.svg
  24. 1
      src/views/CanvasEditor/assets/images/line-dash-dot-dot.svg
  25. 1
      src/views/CanvasEditor/assets/images/line-dash-dot.svg
  26. 1
      src/views/CanvasEditor/assets/images/line-dash-large-gap.svg
  27. 1
      src/views/CanvasEditor/assets/images/line-dash-small-gap.svg
  28. 1
      src/views/CanvasEditor/assets/images/line-dot.svg
  29. 1
      src/views/CanvasEditor/assets/images/line-double.svg
  30. 1
      src/views/CanvasEditor/assets/images/line-single.svg
  31. 1
      src/views/CanvasEditor/assets/images/line-wavy.svg
  32. 1
      src/views/CanvasEditor/assets/images/list.svg
  33. 1
      src/views/CanvasEditor/assets/images/option.svg
  34. 1
      src/views/CanvasEditor/assets/images/page-break.svg
  35. 1
      src/views/CanvasEditor/assets/images/page-mode.svg
  36. 1
      src/views/CanvasEditor/assets/images/page-scale-add.svg
  37. 1
      src/views/CanvasEditor/assets/images/page-scale-minus.svg
  38. 1
      src/views/CanvasEditor/assets/images/painter.svg
  39. 1
      src/views/CanvasEditor/assets/images/paper-direction.svg
  40. 1
      src/views/CanvasEditor/assets/images/paper-margin.svg
  41. 1
      src/views/CanvasEditor/assets/images/paper-size.svg
  42. 1
      src/views/CanvasEditor/assets/images/print.svg
  43. 4
      src/views/CanvasEditor/assets/images/radio.svg
  44. 1
      src/views/CanvasEditor/assets/images/redo.svg
  45. 1
      src/views/CanvasEditor/assets/images/request-fullscreen.svg
  46. 1
      src/views/CanvasEditor/assets/images/right.svg
  47. 1
      src/views/CanvasEditor/assets/images/row-margin.svg
  48. 1
      src/views/CanvasEditor/assets/images/search.svg
  49. 1
      src/views/CanvasEditor/assets/images/separator.svg
  50. 1
      src/views/CanvasEditor/assets/images/signature-undo.svg
  51. 1
      src/views/CanvasEditor/assets/images/signature.svg
  52. 1
      src/views/CanvasEditor/assets/images/size-add.svg
  53. 1
      src/views/CanvasEditor/assets/images/size-minus.svg
  54. 1
      src/views/CanvasEditor/assets/images/strikeout.svg
  55. 1
      src/views/CanvasEditor/assets/images/subscript.svg
  56. 1
      src/views/CanvasEditor/assets/images/superscript.svg
  57. 1
      src/views/CanvasEditor/assets/images/table.svg
  58. 1
      src/views/CanvasEditor/assets/images/title.svg
  59. 1
      src/views/CanvasEditor/assets/images/trash.svg
  60. 1
      src/views/CanvasEditor/assets/images/underline.svg
  61. 1
      src/views/CanvasEditor/assets/images/undo.svg
  62. 1
      src/views/CanvasEditor/assets/images/watermark.svg
  63. 1
      src/views/CanvasEditor/assets/images/word-tool.svg
  64. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.2.1.png
  65. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.2.2.png
  66. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.3.0.png
  67. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.3.1.png
  68. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.5.0.png
  69. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.5.1.png
  70. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.6.0.png
  71. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.6.1.png
  72. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.7.0.png
  73. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.7.1.png
  74. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.7.2.png
  75. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.7.3.png
  76. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.7.4.png
  77. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.7.6.png
  78. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.7.7.png
  79. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.8.0.png
  80. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.8.5.png
  81. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.8.6.png
  82. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.8.7.png
  83. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.8.8.png
  84. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.0.png
  85. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.1.png
  86. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.2.png
  87. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.23.png
  88. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.28.png
  89. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.29.png
  90. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.3.png
  91. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.30.png
  92. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.32.png
  93. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.35.png
  94. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.4.png
  95. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.5.png
  96. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.6.png
  97. BIN
      src/views/CanvasEditor/assets/snapshots/main_v0.9.8.png
  98. 1876
      src/views/CanvasEditor/canvas.ts
  99. 171
      src/views/CanvasEditor/components/dialog/Dialog.ts
  100. 131
      src/views/CanvasEditor/components/dialog/dialog.css

23
package.json

@ -119,7 +119,27 @@
"vxe-table-plugin-export-xlsx": "4.0.1",
"xe-utils": "3.5.25",
"xlsx": "0.18.5",
"sm-crypto":"0.3.13"
"sm-crypto":"0.3.13",
"@hufe921/canvas-editor":"v0.9.101",
"@hufe921/canvas-editor-plugin-docx": "0.0.5",
"@rollup/plugin-typescript": "^10.0.1",
"@types/node": "16.18.96",
"prismjs": "1.29.0",
"@types/prismjs": "^1.26.0",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@vitejs/plugin-vue": "^2.0.4",
"vite-plugin-vue-setup-extend": "^0.4.0",
"cypress": "13.6.0",
"cypress-file-upload": "^5.0.8",
"eslint": "7.32.0",
"simple-git-hooks": "^2.8.1",
"vite-plugin-css-injected-by-js": "^2.1.1",
"vitepress": "1.0.0-beta.6",
"canvas-editor": "^1.0.0",
"mammoth-plus":"^2.0.2",
"mammoth":"1.9.0"
},
"devDependencies": {
"@commitlint/cli": "19.3.0",
@ -167,6 +187,7 @@
"markdown-it": "^13.0.2",
"markdown-it-anchor": "^8.6.7",
"markdown-it-toc-done-right": "^4.2.0"
},
"engines": {
"node": ">=18.12.0",

1
src/views/CanvasEditor/assets/images/alignment.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 13h12v1H2v-1zm0-3h12v1H2v-1zm0-3h12v1H2V7zm0-6h12v1H2V1zm0 3h12v1H2V4z" fill="#3D4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 209 B

1
src/views/CanvasEditor/assets/images/arrow-left.svg

@ -0,0 +1 @@
<svg width="4" height="7" xmlns="http://www.w3.org/2000/svg"><path fill="#6F6F6F" d="M0 3.5L4 0v7z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 127 B

1
src/views/CanvasEditor/assets/images/arrow-right.svg

@ -0,0 +1 @@
<svg width="4" height="7" xmlns="http://www.w3.org/2000/svg"><path fill="#6F6F6F" d="M4 3.5L0 0v7z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 127 B

1
src/views/CanvasEditor/assets/images/block.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757"><path d="M8.923 11v1h-2A2 2 0 015 10.55c.328-.15.638-.335.923-.55a1 1 0 001 1h2zm0-6h-2a1 1 0 00-1 1A4.997 4.997 0 005 5.45 2 2 0 016.923 4h2v1z"/><path d="M4 10a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zm6-9a1 1 0 00-1 1v3a1 1 0 001 1h3a1 1 0 001-1V3a1 1 0 00-1-1h-3zm0-1h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V3a2 2 0 012-2zm0 10a1 1 0 00-1 1v1a1 1 0 001 1h3a1 1 0 001-1v-1a1 1 0 00-1-1h-3zm0-1h3a2 2 0 012 2v1a2 2 0 01-2 2h-3a2 2 0 01-2-2v-1a2 2 0 012-2z"/></g></svg>

After

Width:  |  Height:  |  Size: 568 B

1
src/views/CanvasEditor/assets/images/bold.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8.131 6.9c2.035 0 2.569-.9 2.569-1.869 0-.968-.64-1.831-2.623-1.831H5.2v3.7h2.931zm.524 5.9c2.045 0 2.545-1.305 2.545-2.3 0-.985-.506-2.4-2.81-2.4H5.2v4.7h3.455zM4 2h4.71c2.367 0 3.19 1.583 3.19 3s-.325 1.852-1.1 2.5c1.2.5 1.569 1.379 1.6 3 .03 1.606-.586 3.5-3.769 3.5H4V2z" fill="#3D4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 411 B

1
src/views/CanvasEditor/assets/images/catalog.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757"><path d="M13 0c.552 0 1 .48 1 1.071V13.93c0 .59-.448 1.07-1 1.07H3c-.552 0-1-.48-1-1.071V1.07C2 .48 2.448 0 3 0h10zm0 1H3v13h10V1z"/><path d="M5 10v1H4v-1h1zm6 0v1H6v-1h5zM5 7v1H4V7h1zm6 0v1H6V7h5zM5 4v1H4V4h1zm6 0v1H6V4h5z"/></g></svg>

After

Width:  |  Height:  |  Size: 337 B

1
src/views/CanvasEditor/assets/images/center.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 13h12v1H2v-1zm2-3h8v1H4v-1zM2 7h12v1H2V7zm0-6h12v1H2V1zm2 3h8v1H4V4z" fill="#3D4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 207 B

1
src/views/CanvasEditor/assets/images/checkbox.svg

@ -0,0 +1 @@
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 16 16" xml:space="preserve"><style>.st0{fill:#3d4757}</style><g id="_x30_1-文字_x2F_01开始_x2F_任务列表-16px"><path id="合并形状" class="st0" d="M10.1 2H2v11h11V8.7l1-1V13c0 .6-.4 1-1 1H2c-.6 0-1-.4-1-1V2c0-.6.4-1 1-1h9.1l-1 1z"/><path id="路径" class="st0" d="M7.7 8.5l5.7-5.8.9.8-6.1 5.9-.5.5-3.9-3.4.8-.7z"/></g></svg>

After

Width:  |  Height:  |  Size: 428 B

1
src/views/CanvasEditor/assets/images/close.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8.9 8.192l4.242 4.243-.707.707L8.192 8.9 3.95 13.142l-.707-.707 4.242-4.243L3.243 3.95l.707-.707 4.242 4.242 4.243-4.242.707.707L8.9 8.192z" fill="#6A6A6A" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 276 B

1
src/views/CanvasEditor/assets/images/codeblock.svg

@ -0,0 +1 @@
<svg width="14" height="14" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path stroke="#525C6F" stroke-linejoin="round" d="M4 4.5L1.5 7 4 9.5M10 4.5L12.5 7 10 9.5"></path><rect fill="#525C6F" transform="scale(1 -1) rotate(70 16.711 0)" x="2.671" y="6.53" width="8" height="1" rx=".2"></rect></g></svg>

After

Width:  |  Height:  |  Size: 326 B

1
src/views/CanvasEditor/assets/images/color.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M7.997 3.429L6.398 8h3.2L7.997 3.429zM8.497 2L12 12h-1L9.949 9h-3.9L5 12H4L7.496 2h1z" fill="#3D4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 221 B

1
src/views/CanvasEditor/assets/images/control.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M9.793 1.5H3a.5.5 0 00-.5.5v12a.5.5 0 00.5.5h9a.5.5 0 00.5-.5V4.207L9.793 1.5z" stroke="#3D4757"/><g fill="#3D4757"><path d="M7 7h1v5H7z"/><path d="M5 7h5v1H5z"/></g><path fill="#3D4757" fill-rule="nonzero" d="M9 2h1v3H9z"/><path fill="#3D4757" fill-rule="nonzero" d="M9 4h3v1H9z"/></g></svg>

After

Width:  |  Height:  |  Size: 399 B

1
src/views/CanvasEditor/assets/images/date.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M7.5 14.154a5.654 5.654 0 100-11.308 5.654 5.654 0 000 11.308zm0 .846a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/><path d="M8 8h4v1H7V4h1v4z"/></g></svg>

After

Width:  |  Height:  |  Size: 276 B

1
src/views/CanvasEditor/assets/images/exit-fullscreen.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M9 9h1v4H9z"/><path d="M9 9h4v1H9zM7 7H6V3h1z"/><path d="M7 7H3V6h4z"/></g></svg>

After

Width:  |  Height:  |  Size: 191 B

1
src/views/CanvasEditor/assets/images/format.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M8.213 13H6.8l6.636-6.636-4.243-4.243-7.07 7.071L5.928 13H4.515L1.06 9.546a.5.5 0 010-.707L8.839 1.06a.5.5 0 01.707 0l4.95 4.95a.5.5 0 010 .707L8.213 13z" fill-rule="nonzero"/><path d="M4.536 6.364l4.95 4.95-.707.707-4.95-4.95zM4.521 13h10.03v1H5.496z"/></g></svg>

After

Width:  |  Height:  |  Size: 394 B

1
src/views/CanvasEditor/assets/images/highlight.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M13.31 5h-1.92a2.203 2.203 0 00-.39-.034c-.135 0-.27.012-.402.034H10v.18c-.578.256-1 .714-1 1.214v1.928c0 .196.117.43.3.658v1.23a3.543 3.543 0 01-.3-.4V11H8V1h1v4.265C9 4.763 10 4 10.942 4c1.19 0 1.92.422 2.367 1zM2 6c-.03-.498-.175-2 2.5-2C7.11 4 7 5 7 6.902V11H5.984v-.993c.38.662-.115.993-1.484.993C2.708 11 2 9.931 2 9c0-1.428.447-2 2.5-2h1.484c0-1 .031-2-1.484-2-1.533 0-1.577.485-1.577 1H2zm2.5 2C3.601 8 3 7.768 3 9c0 1.31.438 1 1.5 1 .617 0 1.484-.665 1.484-1.847V8H4.5z"/><path d="M13.085 6.316l-2.814 3a1 1 0 101.458 1.368l2.815-3a1 1 0 00-1.459-1.368z" fill-rule="nonzero"/></g></svg>

After

Width:  |  Height:  |  Size: 725 B

1
src/views/CanvasEditor/assets/images/hyperlink.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g transform="rotate(45 5.5 13.328)" fill="#3D4757" fill-rule="evenodd"><path d="M7 6H6V3.515a2.5 2.5 0 10-5 0V6H0V3.515a3.5 3.5 0 117 0V6zm0 4v2.5a3.5 3.5 0 01-7 0V10h1v2.5a2.5 2.5 0 105 0V10h1z" fill-rule="nonzero"/><rect x="3.062" y="5.209" width="1" height="5.5" rx=".5"/></g></svg>

After

Width:  |  Height:  |  Size: 349 B

1
src/views/CanvasEditor/assets/images/image.svg

@ -0,0 +1 @@
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 16 16" xml:space="preserve"><style>.st0{fill:#3d4757}</style><g id="_x30_0-公共_x2F_02工具栏_x2F_插入图片-16px-"><g id="Group-19" transform="translate(1 1)"><path id="Combined-Shape" class="st0" d="M1 0h12c.6 0 1 .4 1 1v11c0 .6-.4 1-1 1H1c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1zm0 1v11h12V1H1z"/><circle id="椭圆形" class="st0" cx="10" cy="4" r="1"/><path id="Path" class="st0" d="M8.5 11.2l-4-4.1L1 10.7V9.2c1.7-1.6 2.7-2.5 3-2.8.4-.5.7-.4 1 0L8.5 10 11 7.3c.4-.5.6-.5 1-.1l2 2.8v1.5l-2.5-3.4-3 3.1z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 613 B

1
src/views/CanvasEditor/assets/images/italic.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M10.017 3L8.08 13H9v1H6v-1h1.182L9 3H8V2h3v1h-.983z" fill="#3D4757"/></svg>

After

Width:  |  Height:  |  Size: 167 B

7
src/views/CanvasEditor/assets/images/justify.svg

@ -0,0 +1,7 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<path stroke="#3D4757" fill="#3D4757" d="M2 10.5H14M2 13.5H14" stroke-linecap="round" stroke-linejoin="miter">
</path>
<path stroke="#3D4757" fill="#3D4757" d="M14 3.5L12 1.5M14 3.5L12 5.5M14 3.5L2 3.5M4 1.5L2 3.5M2 3.5L4 5.5"
stroke-linecap="round" stroke-linejoin="miter">
</path>
</svg>

After

Width:  |  Height:  |  Size: 385 B

1
src/views/CanvasEditor/assets/images/latex.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M9 13.5H2.982a.5.5 0 01-.404-.794l3.208-4.412a.5.5 0 000-.588L2.578 3.294a.5.5 0 01.404-.794H9" stroke="#3D4757"/><path d="M14.447 7l.809.588-2.139 2.942 2.139 2.942-.81.588-1.946-2.68-1.947 2.68-.809-.588 2.138-2.942-2.138-2.942.81-.588L12.5 9.679 14.447 7z" fill="#3D4757"/></g></svg>

After

Width:  |  Height:  |  Size: 393 B

1
src/views/CanvasEditor/assets/images/left.svg

@ -0,0 +1 @@
<svg height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M2 13h12v1H2zm0-3h8v1H2zm0-3h12v1H2zm0-6h12v1H2zm0 3h8v1H2z" fill="#3d4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 195 B

1
src/views/CanvasEditor/assets/images/line-dash-dot-dot.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M4 10h5v1H4zm7 0h2v1h-2zm4 0h2v1h-2zm4 0h5v1h-5zm7 0h2v1h-2zm4 0h2v1h-2zm4 0h5v1h-5zm7 0h2v1h-2zm4 0h2v1h-2zm4 0h5v1h-5zm7 0h2v1h-2zm4 0h2v1h-2zm4 0h5v1h-5zm7 0h2v1h-2zm4 0h2v1h-2zm4 0h5v1h-5zm7 0h2v1h-2zm4 0h2v1h-2zm4 0h5v1h-5zm7 0h2v1h-2zm4 0h2v1h-2zm4 0h5v1h-5zm7 0h2v1h-2zm4 0h2v1h-2z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 390 B

1
src/views/CanvasEditor/assets/images/line-dash-dot.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M4 10h6v1H4zm9 0h3v1h-3zm6 0h6v1h-6zm9 0h3v1h-3zm6 0h6v1h-6zm9 0h3v1h-3zm6 0h6v1h-6zm9 0h3v1h-3zm6 0h6v1h-6zm9 0h3v1h-3zm6 0h6v1h-6zm9 0h3v1h-3zm6 0h6v1h-6zm9 0h3v1h-3zm6 0h6v1h-6zm9 0h3v1h-3z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 294 B

1
src/views/CanvasEditor/assets/images/line-dash-large-gap.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M5 10h4v1H5zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4zm8 0h4v1h-4z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 282 B

1
src/views/CanvasEditor/assets/images/line-dash-small-gap.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M4 10h4v1H4zm5 0h4v1H9zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h4v1h-4zm5 0h3v1h-3z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 389 B

1
src/views/CanvasEditor/assets/images/line-dot.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M4 10h1v1H4zm12 0h1v1h-1zM6 10h1v1H6zm12 0h1v1h-1zM8 10h1v1H8zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm2 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm2 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm2 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm2 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1zm12 0h1v1h-1zm-10 0h1v1h-1z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 885 B

1
src/views/CanvasEditor/assets/images/line-double.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M4 10h118v1H4zm0 3h118v1H4z"/></svg>

After

Width:  |  Height:  |  Size: 109 B

1
src/views/CanvasEditor/assets/images/line-single.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M4 10h118v1H4z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 116 B

1
src/views/CanvasEditor/assets/images/line-wavy.svg

@ -0,0 +1 @@
<svg width="126" height="20" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#000000" d="M4 10 Q6 8,8 10 T12 10 T16 10 T20 10 T24 10 T28 10 T32 10 T36 10 T40 10 T44 10 T48 10 T52 10 T56 10 T60 10 T64 10 T68 10 T72 10 T76 10 T80 10 T84 10 T88 10 T92 10 T96 10 T100 10 T104 10 T108 10 T112 10 T116 10 T120 10 T124 10"/></svg>

After

Width:  |  Height:  |  Size: 336 B

1
src/views/CanvasEditor/assets/images/list.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#3D4757" d="M7 12h7v1H7zm0-5h7v1H7zm0-5h7v1H7zM3 4V2H2V1h2v3h1v1H2V4h1z"/><path d="M2 6h3v1H2V6zm0 3h3v1H2V9z" fill="#4F4F4F"/><path fill="#3D4757" fill-rule="nonzero" d="M4.5 6L5 7l-2.5 3L2 9z"/><path d="M4 14l-1-2H2v-1h3v1H4l1 2v1H2v-1h2z" fill="#3D4757"/></g></svg>

After

Width:  |  Height:  |  Size: 398 B

1
src/views/CanvasEditor/assets/images/option.svg

@ -0,0 +1 @@
<svg viewBox="0 0 1084 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M1072.147851 406.226367c-6.331285-33.456782-26.762037-55.073399-52.047135-55.073399-0.323417 0-0.651455 0.003081-0.830105 0.009241l-4.655674 0c-73.124722 0-132.618162-59.491899-132.618162-132.618162 0-23.731152 11.447443-50.336101 11.546009-50.565574 13.104573-29.498767 3.023185-65.672257-23.427755-84.127081l-1.601687-1.127342-134.400039-74.661726-1.700252-0.745401c-8.753836-3.805547-18.334698-5.735272-28.479231-5.735272-20.789593 0-41.235746 8.344174-54.683758 22.306575-14.741683 15.216028-65.622973 58.649474-104.721083 58.649474-39.450789 0-90.633935-44.286652-105.438762-59.784516-13.518857-14.247316-34.128258-22.753199-55.127302-22.753199-9.945862 0-19.354234 1.861961-27.958682 5.531982l-1.746455 0.74078-139.141957 76.431283-1.643269 1.139662c-26.537186 18.437884-36.675557 54.579032-23.584845 84.062398 0.115506 0.264895 11.579891 26.725075 11.579891 50.634877 0 73.126262-59.491899 132.618162-132.618162 132.618162l-4.581749 0c-0.318797-0.00616-0.636055-0.01078-0.951772-0.01078-25.260456 0-45.672728 21.618157-52.002472 55.0811-0.462025 2.453354-11.313456 60.622322-11.313456 106.117939 0 45.494078 10.85143 103.659965 11.314996 106.119479 6.334365 33.458322 26.758957 55.076479 52.036353 55.076479 0.320337 0 0.651455-0.00616 0.842426-0.012321l4.655674 0c73.126262 0 132.618162 59.491899 132.618162 132.616622 0 23.760413-11.444363 50.333021-11.546009 50.565574-13.093793 29.474125-3.041666 65.646075 23.395414 84.151722l1.569346 1.093459 131.838879 73.726895 1.675611 0.7377c8.750757 3.84251 18.305437 5.790715 28.397607 5.790715 21.082208 0 41.676209-8.706094 55.0888-23.290689 18.724339-20.347588 69.527086-62.362616 107.04815-62.362616 40.625872 0 92.72537 47.100385 107.759669 63.583903 13.441852 14.831008 34.176001 23.689571 55.470741 23.695731l0.00616 0c9.895039 0 19.27877-1.883523 27.893999-5.598205l1.711034-0.73924 136.659342-75.531873 1.617088-1.128882c26.492523-18.456365 36.601633-54.600594 23.538642-84.016195-0.115506-0.267974-11.595291-27.082374-11.595291-50.67646 0-73.124722 59.49344-132.616622 132.618162-132.616622l4.517066-0.00154c0.300316 0.00616 0.599092 0.009241 0.899409 0.009241 25.331299-0.00154 45.785153-21.619697 52.107197-55.054918 0.112426-0.589852 11.325776-59.507301 11.325776-106.14104C1083.464388 466.640776 1072.609877 408.67356 1072.147851 406.226367zM377.486862 945.656142l-115.32764-64.487932c5.082277-13.052211 15.437801-43.51815 15.437801-75.017486 0-109.382917-84.176364-199.816642-192.587488-208.134635-2.647404-15.427021-8.873963-54.967133-8.873963-85.667166 0-30.65691 6.223479-70.232445 8.869343-85.671786 108.415744-8.311832 192.592108-98.745557 192.592108-208.134635 0-31.416171-10.300081-61.797405-15.371577-74.854236l122.721583-67.40331c0.003081 0 0.00462 0.00154 0.007701 0.00154 4.423121 4.518606 22.121764 22.080182 46.558275 39.493911 39.929754 28.46229 77.952885 42.894416 113.014434 42.894416 34.716571 0 72.437845-14.151831 112.115025-42.06431 24.282503-17.07953 41.896442-34.302288 46.308782-38.74543 0.009241-0.00154 0.018481-0.00462 0.026182-0.00616l118.301542 65.726159c-5.077657 13.055291-15.416239 43.499669-15.416239 74.958962 0 109.389077 84.174824 199.822802 192.590568 208.134635 2.645865 15.462442 8.872423 55.107281 8.872423 85.671786 0 30.687711-6.223479 70.241685-8.869343 85.673326C890.042174 606.334084 805.86427 696.767809 805.86427 806.158426c0 31.450053 10.317022 61.851309 15.393138 74.903519l-119.783103 66.198965c-5.168521-5.490399-22.603811-23.363073-46.740005-41.288109-40.701336-30.224145-79.662378-45.549521-115.800446-45.549521-35.79155 0-74.458435 15.038919-114.927219 44.694774C400.22004 922.554885 382.666163 940.255068 377.486862 945.656142zM731.271848 511.646647c0-105.803762-86.081448-191.88059-191.888289-191.88059-105.803762 0-191.88059 86.076827-191.88059 191.88059 0 105.803762 86.076827 191.882129 191.88059 191.882129C645.19194 703.528777 731.271848 617.450409 731.271848 511.646647zM539.383558 395.903184c63.825696 0 115.751164 51.922387 115.751164 115.743463 0 63.825696-51.925468 115.751164-115.751164 115.751164-63.821076 0-115.743463-51.925468-115.743463-115.751164C423.640095 447.824031 475.562482 395.903184 539.383558 395.903184z" fill="#000000"></path></svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

1
src/views/CanvasEditor/assets/images/page-break.svg

@ -0,0 +1 @@
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 16 16" xml:space="preserve"><style>.st0{fill:none;stroke:#3d4757}.st1{fill:#3d4757}</style><g id="_x30_1-文字_x2F_02插入_x2F_分页-16px"><path id="矩形" class="st0" d="M5.5 2.5h7c.6 0 1 .4 1 1v3c0 .6-.4 1-1 1h-7c-.6 0-1-.4-1-1v-3c0-.6.4-1 1-1z"/><path id="三角形" class="st1" d="M4 8.5L1 6v5z"/><path id="合并形状" class="st0" d="M10.8 9.5H5c-.3 0-.5.2-.5.5v4c0 .3.2.5.5.5h8c.3 0 .5-.2.5-.5v-1.8l-2.7-2.7z"/><path id="矩形_1_" class="st1" d="M10 10h1v3h-1z"/><path id="矩形-copy-2" class="st1" d="M10 12h3v1h-3z"/></g></svg>

After

Width:  |  Height:  |  Size: 635 B

1
src/views/CanvasEditor/assets/images/page-mode.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g transform="translate(2 1)"><rect stroke="#3D4757" x=".5" y=".5" width="11" height="8" rx="1"/><path fill="#3D4757" fill-rule="nonzero" d="M2 3h4v1H2zm0 2h8v1H2z"/></g><g fill="#3D4757" fill-rule="nonzero"><path d="M14 15h-1v-5H3v5H2V9h12v6z"/><path d="M4 12h4v1H4zm0 2h8v1H4z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 413 B

1
src/views/CanvasEditor/assets/images/page-scale-add.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M7 7V3h2v4h4v2H9v4H7V9H3V7h4z" fill="#636363" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 165 B

1
src/views/CanvasEditor/assets/images/page-scale-minus.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M3 7h10v2H3z" fill="#636363" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 148 B

1
src/views/CanvasEditor/assets/images/painter.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M7.5 2v2.5H4a.5.5 0 00-.5.5v2a.5.5 0 00.5.5h9a.5.5 0 00.5-.5V5a.5.5 0 00-.5-.5H9.5V2a.5.5 0 00-.5-.5H8a.5.5 0 00-.5.5z" stroke="#3D4757"/><path fill="#3D4757" d="M13 7h1v4h-1z"/><path d="M11 13a2 2 0 002-2V8.764A3 3 0 118.764 13H11z" fill="#3D4757"/><path fill="#3D4757" d="M1 13h10v1H1z"/><path d="M1 13a2 2 0 002-2V8.764A3 3 0 011 14v-1z" fill="#3D4757"/><path fill="#3D4757" d="M3 7h1v4H3z"/></g></svg>

After

Width:  |  Height:  |  Size: 532 B

1
src/views/CanvasEditor/assets/images/paper-direction.svg

@ -0,0 +1 @@
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 16 16" xml:space="preserve"><style>.st0{fill:#3d4757}</style><g id="_x30_1-文字_x2F_04页面_x2F_纸张方向-16px"><g id="编组" transform="translate(1 1)"><path id="合并形状" class="st0" d="M14 6v7c0 .6-.4 1-1 1H4c-.6 0-1-.4-1-1V6c0-.6.4-1 1-1h9c.6 0 1 .4 1 1zm-1 0H4v7h9V6z"/><path id="路径" class="st0" d="M9 4H8V1H1v9h1v1H1c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1h7c.6 0 1 .4 1 1v3z"/><path id="矩形" class="st0" d="M11 7h1v5h-1z"/><path id="矩形-copy-2" class="st0" d="M2 2h5v1H2z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 599 B

1
src/views/CanvasEditor/assets/images/paper-margin.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect stroke="#3D4757" x="2.5" y="1.5" width="11" height="13" rx="1"/><path fill="#3D4757" fill-rule="nonzero" d="M3 4h10v1H3zm0 7h10v1H3z"/><path fill="#3D4757" fill-rule="nonzero" d="M5 14V2h1v12zm5 0V2h1v12z"/></g></svg>

After

Width:  |  Height:  |  Size: 321 B

1
src/views/CanvasEditor/assets/images/paper-size.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill-rule="nonzero"><path d="M10.793 1.5L13.5 4.207V14L3 14.5 2.5 2l8.293-.5z" stroke="#3D4757"/><path fill="#3D4757" d="M10 2h1v3h-1z"/><path fill="#3D4757" d="M10 4h3v1h-3z"/></g><path d="M7 3v1H5v2H4V3h3z" fill="#3D4757"/><path fill="#3D4757" d="M5.169 3.43l6.62 8.784-.799.602-6.62-8.785z"/><path d="M9 13v-1h2v-2h1v3H9z" fill="#3D4757"/></g></svg>

After

Width:  |  Height:  |  Size: 453 B

1
src/views/CanvasEditor/assets/images/print.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M12 4h-1V2H5v2H4V2a1 1 0 011-1h6a1 1 0 011 1v2zm0 5v4a1 1 0 01-1 1H5a1 1 0 01-1-1V9h1v4h6V9h1z"/><path d="M12 12v-1h2V5H2v6h2v1H2a1 1 0 01-1-1V5a1 1 0 011-1h12a1 1 0 011 1v6a1 1 0 01-1 1h-2z"/><path d="M3 8h10v1H3zm8-2h2v1h-2z"/></g></svg>

After

Width:  |  Height:  |  Size: 369 B

4
src/views/CanvasEditor/assets/images/radio.svg

@ -0,0 +1,4 @@
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" stroke="#3d4757" stroke-width="1.5" fill="none" />
<circle cx="12" cy="12" r="3.5" fill="#3d4757" />
</svg>

After

Width:  |  Height:  |  Size: 240 B

1
src/views/CanvasEditor/assets/images/redo.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M3 14v-3a4 4 0 014-4h3V6H7a5 5 0 00-5 5v3h1zm7.016-11.282v7.543l4.29-3.73z" fill="#3D4757"/></svg>

After

Width:  |  Height:  |  Size: 190 B

1
src/views/CanvasEditor/assets/images/request-fullscreen.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M3 3h1v4H3z"/><path d="M3 3h4v1H3zm10 10h-1V9h1z"/><path d="M13 13H9v-1h4z"/></g></svg>

After

Width:  |  Height:  |  Size: 217 B

1
src/views/CanvasEditor/assets/images/right.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 13h12v1H2v-1zm4-3h8v1H6v-1zM2 7h12v1H2V7zm0-6h12v1H2V1zm4 3h8v1H6V4z" fill="#3D4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 207 B

1
src/views/CanvasEditor/assets/images/row-margin.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M2 14h12v1H2v-1zm7-5h5v1H9V9zm0-3h5v1H9V6zM2 1h12v1H2V1zm2.5 3L7 7H2zm0 8L7 9H2z" fill="#3D4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 216 B

1
src/views/CanvasEditor/assets/images/search.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><circle stroke="#3D4757" cx="6" cy="6" r="4.5"/><path d="M10.061 10.968L8.707 9.414l.707-.707 1.514 1.457.435-.404 2.632 2.462a1.154 1.154 0 01.05 1.635 1.184 1.184 0 01-1.655.064l-2.788-2.527.46-.426z" fill="#3D4757" fill-rule="nonzero"/></g></svg>

After

Width:  |  Height:  |  Size: 367 B

1
src/views/CanvasEditor/assets/images/separator.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M3.9 2.8l2.01 2.506c.2.25.58.25.78 0L8.7 2.799l2.01 2.507c.2.25.58.25.78 0l2.4-2.993-.78-.626-2.01 2.507-2.01-2.507a.5.5 0 00-.78 0L6.3 4.194 4.29 1.687a.5.5 0 00-.78 0l-2.4 3 .78.625L3.9 2.8zM1 8h13v1H1zm0 4h3v1H1zm5 0h3v1H6zm5 0h3v1h-3z" fill="#3D4757"/></svg>

After

Width:  |  Height:  |  Size: 334 B

1
src/views/CanvasEditor/assets/images/signature-undo.svg

@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><path d="M8 6h5.5a7 7 0 010 14v-2a5 5 0 000-10H8v3L4 7l4-4v3z" fill="#3d4757" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 168 B

1
src/views/CanvasEditor/assets/images/signature.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#3D4757" d="M2 13h12v1H2z"/><path fill="#4B5463" fill-rule="nonzero" d="M5.26 8.458l2.23 1.28L6 12H3z"/><path d="M5.666 6.149L4.31 8.168l4.045 2.48 1.503-2.159-4.192-2.34zm1.106-4.156l-1.986 3.44 6.3 3.648 2.037-2.943-6.351-4.145z" stroke="#4B5463"/></g></svg>

After

Width:  |  Height:  |  Size: 370 B

1
src/views/CanvasEditor/assets/images/size-add.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M6.215 3.29H7.64L11.855 14H10.52l-1.14-3H4.46l-1.14 3H2L6.215 3.29zM4.85 9.965h4.14L6.965 4.61h-.06L4.85 9.965z"/><path d="M12 4V2h1v2h2v1h-2v2h-1V5h-2V4h2z" fill-rule="nonzero"/></g></svg>

After

Width:  |  Height:  |  Size: 319 B

1
src/views/CanvasEditor/assets/images/size-minus.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path fill-rule="nonzero" d="M11 4h4v1h-4z"/><path d="M6.215 3.29H7.64L11.855 14H10.52l-1.14-3H4.46l-1.14 3H2L6.215 3.29zM4.85 9.965h4.14L6.965 4.61h-.06L4.85 9.965z"/></g></svg>

After

Width:  |  Height:  |  Size: 299 B

1
src/views/CanvasEditor/assets/images/strikeout.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M10.42 7.903H6.692a9.182 9.182 0 01-.41-.172 5.54 5.54 0 01-.814-.447 2.955 2.955 0 01-.655-.595 2.728 2.728 0 01-.44-.777 2.877 2.877 0 01-.162-1.006c0-.472.094-.888.282-1.25.188-.36.453-.663.793-.907s.747-.43 1.22-.558A5.97 5.97 0 018.063 2c.504 0 .95.049 1.337.147.387.097.725.23 1.013.398.287.169.53.365.73.59a3.337 3.337 0 01.772 1.486c.03.13.054.255.073.379h-1.276a2.393 2.393 0 00-.22-.615 2.315 2.315 0 00-.59-.724 2.467 2.467 0 00-.834-.44 3.376 3.376 0 00-1.005-.146 4.69 4.69 0 00-.958.097 2.77 2.77 0 00-.839.314 1.765 1.765 0 00-.597.566c-.152.233-.229.518-.229.854 0 .348.086.642.258.884.171.241.401.449.689.622.287.174.615.323.983.448s.749.247 1.142.367c.31.097.62.196.934.297a8.439 8.439 0 01.973.38zm1.376 1c.175.217.315.466.418.746.105.285.158.612.158.98 0 .554-.104 1.041-.312 1.462-.207.42-.496.772-.867 1.054-.37.282-.81.495-1.32.64A6.12 6.12 0 018.205 14c-.543 0-1.071-.09-1.586-.273a4.44 4.44 0 01-1.374-.773 3.873 3.873 0 01-.97-1.217 3.695 3.695 0 01-.395-1.612h1.27c.028.407.122.78.282 1.12a2.835 2.835 0 001.581 1.465c.363.138.76.207 1.192.207.387 0 .758-.042 1.112-.126a2.85 2.85 0 00.938-.399 2.01 2.01 0 00.647-.708c.16-.29.241-.642.241-1.054 0-.337-.087-.623-.261-.86a2.333 2.333 0 00-.69-.61 4.651 4.651 0 00-.495-.257h2.099z"/><path d="M3 7h10v1H3z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

1
src/views/CanvasEditor/assets/images/subscript.svg

@ -0,0 +1 @@
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 16 16" xml:space="preserve"><style>.st0{fill:#3d4757}</style><g id="_x30_0-公共_x2F_02工具栏_x2F_subscript"><path id="_x32_" class="st0" d="M15 13.3v.7h-3c0-.3.1-.5.3-.8.2-.2.5-.6 1-1 .4-.3.6-.5.7-.7.1-.2.2-.3.2-.5s-.1-.3-.2-.4c-.1-.1-.2-.1-.4-.1s-.3 0-.4.1-.2.4-.2.7l-.9-.1c.1-.4.2-.7.5-.9.3-.2.6-.3 1-.3s.8.1 1 .3c.3.2.4.5.4.8 0 .2 0 .4-.1.5-.1.2-.2.3-.3.5-.1.1-.3.3-.6.5s-.4.4-.5.4c-.1.1-.1.2-.2.3H15z"/><path id="合并形状" class="st0" d="M7.2 8.5l4 5.5H9.8L6.5 9.4 3.2 14H1.8l4-5.5-4-5.5h1.4l3.3 4.6L9.8 3h1.3L7.2 8.5z"/></g></svg>

After

Width:  |  Height:  |  Size: 637 B

1
src/views/CanvasEditor/assets/images/superscript.svg

@ -0,0 +1 @@
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 16 16" xml:space="preserve"><style>.st0{fill:#3d4757}</style><g id="_x30_0-公共_x2F_02工具栏_x2F_superscript"><path id="_x32_" class="st0" d="M15 6.3V7h-3c0-.3.1-.5.3-.8.2-.2.5-.6 1-1 .3-.2.6-.5.7-.6.1-.2.2-.3.2-.5s-.1-.3-.2-.4c-.1-.1-.2-.1-.4-.1s-.3 0-.4.1-.2.3-.2.6l-.9-.1c.1-.4.2-.7.5-.9s.6-.3 1-.3.8.1 1 .3c.3.2.4.5.4.8 0 .2 0 .4-.1.5s-.2.4-.4.5c-.1.1-.3.3-.6.5s-.4.4-.4.5c-.1.1-.1.2-.2.3l1.7-.1z"/><path id="合并形状" class="st0" d="M7.4 8.5l4 5.5H10L6.7 9.4 3.4 14H2l4-5.5L2 3h1.4l3.3 4.6L10 3h1.3L7.4 8.5z"/></g></svg>

After

Width:  |  Height:  |  Size: 627 B

1
src/views/CanvasEditor/assets/images/table.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect x=".5" y=".5" width="12" height="12" rx="1" transform="translate(1 1)" stroke="#3D4757"/><path fill="#3D4757" fill-rule="nonzero" d="M2 9h12v1H2zm0-4h12v1H2z"/><path fill="#3D4757" fill-rule="nonzero" d="M5 1h1v13H5zm4 0h1v13H9z"/></g></svg>

After

Width:  |  Height:  |  Size: 345 B

1
src/views/CanvasEditor/assets/images/title.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M14 1a1 1 0 011 1v12a1 1 0 01-1 1H2a1 1 0 01-1-1V2a1 1 0 011-1h12zm0 1H2v12h12V2z" fill-rule="nonzero"/><path fill-rule="nonzero" d="M4 11h8v1H4zm0-3h4v1H4zm0-3h2v1H4z"/><path d="M9 5h1v4H9z"/><path d="M7 5h5v1H7z"/></g></svg>

After

Width:  |  Height:  |  Size: 336 B

1
src/views/CanvasEditor/assets/images/trash.svg

@ -0,0 +1 @@
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg"><g fill="#3d4757" fill-rule="evenodd"><path d="M17 3v4h4v2h-2v13H6V9H4V7h4V3h9zm0 6H8v11h9V9zm-2-4h-5v2h5V5z" fill-rule="nonzero"/><path d="M10 10h2v7h-2zm3 0h2v7h-2z"/></g></svg>

After

Width:  |  Height:  |  Size: 242 B

1
src/views/CanvasEditor/assets/images/underline.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M5 2v6a3 3 0 106 0V2h1v6a4 4 0 11-8 0V2h1zM4 13h8v1H4z" fill="#3D4757"/></svg>

After

Width:  |  Height:  |  Size: 170 B

1
src/views/CanvasEditor/assets/images/undo.svg

@ -0,0 +1 @@
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M6 2.763v7.544l-4.29-3.73zM13 14v-3a4 4 0 00-4-4H6V6h3a5 5 0 015 5v3h-1z" fill="#3D4757"/></svg>

After

Width:  |  Height:  |  Size: 188 B

1
src/views/CanvasEditor/assets/images/watermark.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><rect stroke="#3D4757" x="2.5" y="1.5" width="11" height="13" rx="1"/><path d="M4 7h8v1H4V7zm0-2h8v1H4V5zm0 6h8v1H4v-1zm0-2h8v1H4V9z" fill="#909AA9" fill-rule="nonzero"/><path d="M6 5.623c.36-.354.936-.638 2-.604 1.785.057 2-.008 2 1.894v4.098H8.984v-.993c1.046.662.885.993-.484.993-1.792 0-2.5-1.068-2.5-2 0-1.427.447-2 2.5-2h.484c0-1-.006-1.007-.984-1-.978.008-1.419.437-2 .437v-.825zm2.5 2.389c-.899 0-1.5-.232-1.5 1 0 1.31.438 1 1.5 1 .617 0 .484-.665.484-1.848v-.152H8.5z" fill="#3D4757"/></g></svg>

After

Width:  |  Height:  |  Size: 602 B

1
src/views/CanvasEditor/assets/images/word-tool.svg

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><g fill="#3D4757" fill-rule="evenodd"><path d="M1 0h1v15H1zm5 4h7v1H6zm-3 6h7v1H3z"/><path d="M1 0h4v1H1zm10 14h4v1h-4zM3 7h10v1H3z"/><path d="M14 0h1v15h-1zM8 0l3 3V0zm6 0h-3v1h3zM8 15l-3-3v3zm-6-1h3v1H2z"/></g></svg>

After

Width:  |  Height:  |  Size: 281 B

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.2.1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.2.2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.3.0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.3.1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.5.0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.5.1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.6.0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.6.1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.7.0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.7.1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.7.2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.7.3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.7.4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.7.6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.7.7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.8.0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.8.5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.8.6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.8.7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.8.8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.0.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.23.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.28.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.29.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.30.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.35.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

BIN
src/views/CanvasEditor/assets/snapshots/main_v0.9.8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

1876
src/views/CanvasEditor/canvas.ts

File diff suppressed because it is too large

171
src/views/CanvasEditor/components/dialog/Dialog.ts

@ -0,0 +1,171 @@
import { EditorComponent, EDITOR_COMPONENT } from '../../editor'
import './dialog.css'
export interface IDialogData {
type: string
label?: string
name: string
value?: string
options?: { label: string; value: string }[]
placeholder?: string
width?: number
height?: number
required?: boolean
}
export interface IDialogConfirm {
name: string
value: string
}
export interface IDialogOptions {
onClose?: () => void
onCancel?: () => void
onConfirm?: (payload: IDialogConfirm[]) => void
title: string
data: IDialogData[]
}
export class Dialog {
private options: IDialogOptions
private mask: HTMLDivElement | null
private container: HTMLDivElement | null
private inputList: (
| HTMLInputElement
| HTMLTextAreaElement
| HTMLSelectElement
)[]
constructor(options: IDialogOptions) {
this.options = options
this.mask = null
this.container = null
this.inputList = []
this._render()
}
private _render() {
const { title, data, onClose, onCancel, onConfirm } = this.options
// 渲染遮罩层
const mask = document.createElement('div')
mask.classList.add('dialog-mask')
mask.setAttribute(EDITOR_COMPONENT, EditorComponent.COMPONENT)
document.body.append(mask)
// 渲染容器
const container = document.createElement('div')
container.classList.add('dialog-container')
container.setAttribute(EDITOR_COMPONENT, EditorComponent.COMPONENT)
// 弹窗
const dialogContainer = document.createElement('div')
dialogContainer.classList.add('dialog')
container.append(dialogContainer)
// 标题容器
const titleContainer = document.createElement('div')
titleContainer.classList.add('dialog-title')
// 标题&关闭按钮
const titleSpan = document.createElement('span')
titleSpan.append(document.createTextNode(title))
const titleClose = document.createElement('i')
titleClose.onclick = () => {
if (onClose) {
onClose()
}
this._dispose()
}
titleContainer.append(titleSpan)
titleContainer.append(titleClose)
dialogContainer.append(titleContainer)
// 选项容器
const optionContainer = document.createElement('div')
optionContainer.classList.add('dialog-option')
// 选项
for (let i = 0; i < data.length; i++) {
const option = data[i]
const optionItemContainer = document.createElement('div')
optionItemContainer.classList.add('dialog-option__item')
// 选项名称
if (option.label) {
const optionName = document.createElement('span')
optionName.append(document.createTextNode(option.label))
optionItemContainer.append(optionName)
if (option.required) {
optionName.classList.add('dialog-option__item--require')
}
}
// 选项输入框
let optionInput:
| HTMLInputElement
| HTMLTextAreaElement
| HTMLSelectElement
if (option.type === 'select') {
optionInput = document.createElement('select')
option.options?.forEach(item => {
const optionItem = document.createElement('option')
optionItem.value = item.value
optionItem.label = item.label
optionInput.append(optionItem)
})
} else if (option.type === 'textarea') {
optionInput = document.createElement('textarea')
} else {
optionInput = document.createElement('input')
optionInput.type = option.type
}
if (option.width) {
optionInput.style.width = `${option.width}px`
}
if (option.height) {
optionInput.style.height = `${option.height}px`
}
optionInput.name = option.name
optionInput.value = option.value || ''
if (!(optionInput instanceof HTMLSelectElement)) {
optionInput.placeholder = option.placeholder || ''
}
optionItemContainer.append(optionInput)
optionContainer.append(optionItemContainer)
this.inputList.push(optionInput)
}
dialogContainer.append(optionContainer)
// 按钮容器
const menuContainer = document.createElement('div')
menuContainer.classList.add('dialog-menu')
// 取消按钮
const cancelBtn = document.createElement('button')
cancelBtn.classList.add('dialog-menu__cancel')
cancelBtn.append(document.createTextNode('取消'))
cancelBtn.type = 'button'
cancelBtn.onclick = () => {
if (onCancel) {
onCancel()
}
this._dispose()
}
menuContainer.append(cancelBtn)
// 确认按钮
const confirmBtn = document.createElement('button')
confirmBtn.append(document.createTextNode('确定'))
confirmBtn.type = 'submit'
confirmBtn.onclick = () => {
if (onConfirm) {
const payload = this.inputList.map<IDialogConfirm>(input => ({
name: input.name,
value: input.value
}))
onConfirm(payload)
}
this._dispose()
}
menuContainer.append(confirmBtn)
dialogContainer.append(menuContainer)
// 渲染
document.body.append(container)
this.container = container
this.mask = mask
}
private _dispose() {
this.mask?.remove()
this.container?.remove()
}
}

131
src/views/CanvasEditor/components/dialog/dialog.css

@ -0,0 +1,131 @@
.dialog-mask {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .5;
background: #000000;
z-index: 99;
}
.dialog-container {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: auto;
z-index: 999;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
}
.dialog {
position: absolute;
padding: 0 30px 30px;
background: #ffffff;
box-shadow: 0 2px 12px 0 rgb(56 56 56 / 20%);
border: 1px solid #e2e6ed;
border-radius: 2px;
}
.dialog-title {
position: relative;
border-bottom: 1px solid #e2e6ed;
margin-bottom: 30px;
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
}
.dialog-title i {
width: 16px;
height: 16px;
cursor: pointer;
display: inline-block;
background: url(../../assets/images/close.svg);
}
.dialog-option__item {
margin-bottom: 18px;
display: flex;
align-items: center;
justify-content: space-between;
}
.dialog-option__item span {
margin-right: 12px;
font-size: 14px;
color: #3d4757;
position: relative;
}
.dialog-option__item input,
.dialog-option__item textarea,
.dialog-option__item select {
width: 276px;
height: 30px;
border-radius: 2px;
border: 1px solid #d3d3d3;
min-height: 30px;
padding: 5px;
box-sizing: border-box;
outline: none;
appearance: none;
user-select: none;
font-family: inherit;
}
.dialog-option__item input:focus,
.dialog-option__item textarea:focus {
border-color: #4991f2;
}
.dialog-option__item--require::before {
content: "*";
color: #f56c6c;
margin-right: 4px;
position: absolute;
left: -8px;
}
.dialog-menu {
display: flex;
align-items: center;
justify-content: flex-end;
}
.dialog-menu button {
position: relative;
display: inline-block;
border: 1px solid #e2e6ed;
border-radius: 2px;
background: #ffffff;
line-height: 22px;
padding: 0 16px;
white-space: nowrap;
cursor: pointer;
}
.dialog-menu button:hover {
background: rgba(25, 55, 88, .04);
}
.dialog-menu__cancel {
margin-right: 16px;
}
.dialog-menu button[type='submit'] {
color: #ffffff;
background: #4991f2;
border-color: #4991f2;
}
.dialog-menu button[type='submit']:hover {
background: #5b9cf3;
border-color: #5b9cf3;
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save