From 68835a05f74250bfb8668bae47fd723818278466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=B1=E6=B8=8A=E5=8F=A3=E9=A6=99=E7=B3=96?= <5183454+yuanjianming666@user.noreply.gitee.com> Date: Fri, 1 Nov 2024 16:13:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E6=94=B9=E8=A1=8C=E5=86=85svg?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2svg=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc-auto-import.json | 7 + src/assets/icon/align/averageX.svg | 6 + src/assets/icon/align/averageY.svg | 6 + src/assets/icon/align/bottom.svg | 6 + src/assets/icon/align/centerX.svg | 14 ++ src/assets/icon/align/centerY.svg | 6 + src/assets/icon/align/left.svg | 10 + src/assets/icon/align/right.svg | 4 + src/assets/icon/align/top.svg | 6 + src/assets/icon/attribute/fontStyle.svg | 5 + src/assets/icon/attribute/fontWeight.svg | 5 + src/assets/icon/attribute/linethrough.svg | 5 + src/assets/icon/attribute/textAlignCenter.svg | 1 + .../icon/attribute/textAlignJustitfy.svg | 1 + src/assets/icon/attribute/textAlignLeft.svg | 1 + src/assets/icon/attribute/textAlignRight.svg | 1 + src/assets/icon/attribute/underline.svg | 6 + src/assets/icon/barcode/center.svg | 1 + src/assets/icon/barcode/left.svg | 1 + src/assets/icon/barcode/right.svg | 1 + src/assets/icon/centerAlign/center.svg | 18 ++ src/assets/icon/centerAlign/centerX.svg | 12 + src/assets/icon/centerAlign/centerY.svg | 12 + src/assets/icon/flip/x.svg | 22 ++ src/assets/icon/flip/y.svg | 21 ++ src/assets/icon/group/group.svg | 13 ++ src/assets/icon/group/unGroup.svg | 13 ++ src/assets/icon/layer/circle.svg | 1 + src/assets/icon/layer/default.svg | 1 + src/assets/icon/layer/down.svg | 1 + src/assets/icon/layer/downTop.svg | 1 + src/assets/icon/layer/group.svg | 1 + src/assets/icon/layer/iText.svg | 1 + src/assets/icon/layer/image.svg | 1 + src/assets/icon/layer/polygon.svg | 1 + src/assets/icon/layer/rect.svg | 1 + src/assets/icon/layer/textbox.svg | 1 + src/assets/icon/layer/triangle.svg | 1 + src/assets/icon/layer/up.svg | 1 + src/assets/icon/layer/upTop.svg | 1 + src/assets/icon/tools/barCode.svg | 15 ++ src/assets/icon/tools/circle.svg | 14 ++ src/assets/icon/tools/draw1.svg | 20 ++ src/assets/icon/tools/draw2.svg | 15 ++ src/assets/icon/tools/draw3.svg | 15 ++ src/assets/icon/tools/draw4.svg | 15 ++ src/assets/icon/tools/polygon.svg | 14 ++ src/assets/icon/tools/qrCode.svg | 23 ++ src/assets/icon/tools/rect.svg | 14 ++ src/assets/icon/tools/text.svg | 12 + src/assets/icon/tools/textBox.svg | 12 + src/assets/icon/tools/triangle.svg | 14 ++ src/assets/icon/zoom/big.svg | 20 ++ src/assets/icon/zoom/small.svg | 20 ++ src/components/attributeBarcode.vue | 10 +- src/components/attributeFont.vue | 60 ++--- src/components/centerAlign.vue | 53 +---- src/components/flip.vue | 50 +--- src/components/group.vue | 34 +-- src/components/layer.vue | 50 ++-- src/components/tools.vue | 219 +++--------------- src/components/zoom.vue | 42 +--- vite.config.ts | 1 + 63 files changed, 549 insertions(+), 410 deletions(-) create mode 100644 src/assets/icon/align/averageX.svg create mode 100644 src/assets/icon/align/averageY.svg create mode 100644 src/assets/icon/align/bottom.svg create mode 100644 src/assets/icon/align/centerX.svg create mode 100644 src/assets/icon/align/centerY.svg create mode 100644 src/assets/icon/align/left.svg create mode 100644 src/assets/icon/align/right.svg create mode 100644 src/assets/icon/align/top.svg create mode 100644 src/assets/icon/attribute/fontStyle.svg create mode 100644 src/assets/icon/attribute/fontWeight.svg create mode 100644 src/assets/icon/attribute/linethrough.svg create mode 100644 src/assets/icon/attribute/textAlignCenter.svg create mode 100644 src/assets/icon/attribute/textAlignJustitfy.svg create mode 100644 src/assets/icon/attribute/textAlignLeft.svg create mode 100644 src/assets/icon/attribute/textAlignRight.svg create mode 100644 src/assets/icon/attribute/underline.svg create mode 100644 src/assets/icon/barcode/center.svg create mode 100644 src/assets/icon/barcode/left.svg create mode 100644 src/assets/icon/barcode/right.svg create mode 100644 src/assets/icon/centerAlign/center.svg create mode 100644 src/assets/icon/centerAlign/centerX.svg create mode 100644 src/assets/icon/centerAlign/centerY.svg create mode 100644 src/assets/icon/flip/x.svg create mode 100644 src/assets/icon/flip/y.svg create mode 100644 src/assets/icon/group/group.svg create mode 100644 src/assets/icon/group/unGroup.svg create mode 100644 src/assets/icon/layer/circle.svg create mode 100644 src/assets/icon/layer/default.svg create mode 100644 src/assets/icon/layer/down.svg create mode 100644 src/assets/icon/layer/downTop.svg create mode 100644 src/assets/icon/layer/group.svg create mode 100644 src/assets/icon/layer/iText.svg create mode 100644 src/assets/icon/layer/image.svg create mode 100644 src/assets/icon/layer/polygon.svg create mode 100644 src/assets/icon/layer/rect.svg create mode 100644 src/assets/icon/layer/textbox.svg create mode 100644 src/assets/icon/layer/triangle.svg create mode 100644 src/assets/icon/layer/up.svg create mode 100644 src/assets/icon/layer/upTop.svg create mode 100644 src/assets/icon/tools/barCode.svg create mode 100644 src/assets/icon/tools/circle.svg create mode 100644 src/assets/icon/tools/draw1.svg create mode 100644 src/assets/icon/tools/draw2.svg create mode 100644 src/assets/icon/tools/draw3.svg create mode 100644 src/assets/icon/tools/draw4.svg create mode 100644 src/assets/icon/tools/polygon.svg create mode 100644 src/assets/icon/tools/qrCode.svg create mode 100644 src/assets/icon/tools/rect.svg create mode 100644 src/assets/icon/tools/text.svg create mode 100644 src/assets/icon/tools/textBox.svg create mode 100644 src/assets/icon/tools/triangle.svg create mode 100644 src/assets/icon/zoom/big.svg create mode 100644 src/assets/icon/zoom/small.svg diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 61875e3b..a9f62599 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -3,11 +3,14 @@ "Component": true, "ComponentPublicInstance": true, "ComputedRef": true, + "DirectiveBinding": true, "EffectScope": true, "ExtractDefaultPropTypes": true, "ExtractPropTypes": true, "ExtractPublicPropTypes": true, "InjectionKey": true, + "MaybeRef": true, + "MaybeRefOrGetter": true, "PropType": true, "Ref": true, "VNode": true, @@ -41,6 +44,7 @@ "onServerPrefetch": true, "onUnmounted": true, "onUpdated": true, + "onWatcherCleanup": true, "provide": true, "reactive": true, "readonly": true, @@ -58,7 +62,10 @@ "useAttrs": true, "useCssModule": true, "useCssVars": true, + "useId": true, + "useModel": true, "useSlots": true, + "useTemplateRef": true, "watch": true, "watchEffect": true, "watchPostEffect": true, diff --git a/src/assets/icon/align/averageX.svg b/src/assets/icon/align/averageX.svg new file mode 100644 index 00000000..76d743c9 --- /dev/null +++ b/src/assets/icon/align/averageX.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/align/averageY.svg b/src/assets/icon/align/averageY.svg new file mode 100644 index 00000000..46fda05f --- /dev/null +++ b/src/assets/icon/align/averageY.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/align/bottom.svg b/src/assets/icon/align/bottom.svg new file mode 100644 index 00000000..18814074 --- /dev/null +++ b/src/assets/icon/align/bottom.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/align/centerX.svg b/src/assets/icon/align/centerX.svg new file mode 100644 index 00000000..51f97b2a --- /dev/null +++ b/src/assets/icon/align/centerX.svg @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/align/centerY.svg b/src/assets/icon/align/centerY.svg new file mode 100644 index 00000000..1aaadf41 --- /dev/null +++ b/src/assets/icon/align/centerY.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/align/left.svg b/src/assets/icon/align/left.svg new file mode 100644 index 00000000..e70bbd9a --- /dev/null +++ b/src/assets/icon/align/left.svg @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/align/right.svg b/src/assets/icon/align/right.svg new file mode 100644 index 00000000..70622e11 --- /dev/null +++ b/src/assets/icon/align/right.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/align/top.svg b/src/assets/icon/align/top.svg new file mode 100644 index 00000000..69be13bf --- /dev/null +++ b/src/assets/icon/align/top.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/attribute/fontStyle.svg b/src/assets/icon/attribute/fontStyle.svg new file mode 100644 index 00000000..08c7fbc6 --- /dev/null +++ b/src/assets/icon/attribute/fontStyle.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/attribute/fontWeight.svg b/src/assets/icon/attribute/fontWeight.svg new file mode 100644 index 00000000..db47c753 --- /dev/null +++ b/src/assets/icon/attribute/fontWeight.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/attribute/linethrough.svg b/src/assets/icon/attribute/linethrough.svg new file mode 100644 index 00000000..72bbac07 --- /dev/null +++ b/src/assets/icon/attribute/linethrough.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/attribute/textAlignCenter.svg b/src/assets/icon/attribute/textAlignCenter.svg new file mode 100644 index 00000000..c712bb3a --- /dev/null +++ b/src/assets/icon/attribute/textAlignCenter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/attribute/textAlignJustitfy.svg b/src/assets/icon/attribute/textAlignJustitfy.svg new file mode 100644 index 00000000..5975d2bc --- /dev/null +++ b/src/assets/icon/attribute/textAlignJustitfy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/attribute/textAlignLeft.svg b/src/assets/icon/attribute/textAlignLeft.svg new file mode 100644 index 00000000..4f92a76c --- /dev/null +++ b/src/assets/icon/attribute/textAlignLeft.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/attribute/textAlignRight.svg b/src/assets/icon/attribute/textAlignRight.svg new file mode 100644 index 00000000..393b3dbc --- /dev/null +++ b/src/assets/icon/attribute/textAlignRight.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/attribute/underline.svg b/src/assets/icon/attribute/underline.svg new file mode 100644 index 00000000..79975d4c --- /dev/null +++ b/src/assets/icon/attribute/underline.svg @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/barcode/center.svg b/src/assets/icon/barcode/center.svg new file mode 100644 index 00000000..c712bb3a --- /dev/null +++ b/src/assets/icon/barcode/center.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/barcode/left.svg b/src/assets/icon/barcode/left.svg new file mode 100644 index 00000000..b6248ead --- /dev/null +++ b/src/assets/icon/barcode/left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/barcode/right.svg b/src/assets/icon/barcode/right.svg new file mode 100644 index 00000000..393b3dbc --- /dev/null +++ b/src/assets/icon/barcode/right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/centerAlign/center.svg b/src/assets/icon/centerAlign/center.svg new file mode 100644 index 00000000..1dc92bba --- /dev/null +++ b/src/assets/icon/centerAlign/center.svg @@ -0,0 +1,18 @@ + + + + \ No newline at end of file diff --git a/src/assets/icon/centerAlign/centerX.svg b/src/assets/icon/centerAlign/centerX.svg new file mode 100644 index 00000000..0987e262 --- /dev/null +++ b/src/assets/icon/centerAlign/centerX.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/centerAlign/centerY.svg b/src/assets/icon/centerAlign/centerY.svg new file mode 100644 index 00000000..916b1385 --- /dev/null +++ b/src/assets/icon/centerAlign/centerY.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/flip/x.svg b/src/assets/icon/flip/x.svg new file mode 100644 index 00000000..43a35cde --- /dev/null +++ b/src/assets/icon/flip/x.svg @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/src/assets/icon/flip/y.svg b/src/assets/icon/flip/y.svg new file mode 100644 index 00000000..cb83d198 --- /dev/null +++ b/src/assets/icon/flip/y.svg @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file diff --git a/src/assets/icon/group/group.svg b/src/assets/icon/group/group.svg new file mode 100644 index 00000000..0fe4e1a6 --- /dev/null +++ b/src/assets/icon/group/group.svg @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/group/unGroup.svg b/src/assets/icon/group/unGroup.svg new file mode 100644 index 00000000..70bba6c1 --- /dev/null +++ b/src/assets/icon/group/unGroup.svg @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/layer/circle.svg b/src/assets/icon/layer/circle.svg new file mode 100644 index 00000000..8f165a2d --- /dev/null +++ b/src/assets/icon/layer/circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/default.svg b/src/assets/icon/layer/default.svg new file mode 100644 index 00000000..c4703030 --- /dev/null +++ b/src/assets/icon/layer/default.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/down.svg b/src/assets/icon/layer/down.svg new file mode 100644 index 00000000..54a1cc6e --- /dev/null +++ b/src/assets/icon/layer/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/downTop.svg b/src/assets/icon/layer/downTop.svg new file mode 100644 index 00000000..df98aa68 --- /dev/null +++ b/src/assets/icon/layer/downTop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/group.svg b/src/assets/icon/layer/group.svg new file mode 100644 index 00000000..9b62d462 --- /dev/null +++ b/src/assets/icon/layer/group.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/iText.svg b/src/assets/icon/layer/iText.svg new file mode 100644 index 00000000..68f5741c --- /dev/null +++ b/src/assets/icon/layer/iText.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/image.svg b/src/assets/icon/layer/image.svg new file mode 100644 index 00000000..e9b3533f --- /dev/null +++ b/src/assets/icon/layer/image.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/polygon.svg b/src/assets/icon/layer/polygon.svg new file mode 100644 index 00000000..d3130edb --- /dev/null +++ b/src/assets/icon/layer/polygon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/rect.svg b/src/assets/icon/layer/rect.svg new file mode 100644 index 00000000..589a99e9 --- /dev/null +++ b/src/assets/icon/layer/rect.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/textbox.svg b/src/assets/icon/layer/textbox.svg new file mode 100644 index 00000000..145895a8 --- /dev/null +++ b/src/assets/icon/layer/textbox.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/triangle.svg b/src/assets/icon/layer/triangle.svg new file mode 100644 index 00000000..352fc88e --- /dev/null +++ b/src/assets/icon/layer/triangle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/up.svg b/src/assets/icon/layer/up.svg new file mode 100644 index 00000000..bfe6a59e --- /dev/null +++ b/src/assets/icon/layer/up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/layer/upTop.svg b/src/assets/icon/layer/upTop.svg new file mode 100644 index 00000000..f1186162 --- /dev/null +++ b/src/assets/icon/layer/upTop.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icon/tools/barCode.svg b/src/assets/icon/tools/barCode.svg new file mode 100644 index 00000000..8130cbfc --- /dev/null +++ b/src/assets/icon/tools/barCode.svg @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/circle.svg b/src/assets/icon/tools/circle.svg new file mode 100644 index 00000000..2759986a --- /dev/null +++ b/src/assets/icon/tools/circle.svg @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/draw1.svg b/src/assets/icon/tools/draw1.svg new file mode 100644 index 00000000..3fa92ef7 --- /dev/null +++ b/src/assets/icon/tools/draw1.svg @@ -0,0 +1,20 @@ + + + + \ No newline at end of file diff --git a/src/assets/icon/tools/draw2.svg b/src/assets/icon/tools/draw2.svg new file mode 100644 index 00000000..d27d782c --- /dev/null +++ b/src/assets/icon/tools/draw2.svg @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/draw3.svg b/src/assets/icon/tools/draw3.svg new file mode 100644 index 00000000..46994948 --- /dev/null +++ b/src/assets/icon/tools/draw3.svg @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/draw4.svg b/src/assets/icon/tools/draw4.svg new file mode 100644 index 00000000..8b458e5b --- /dev/null +++ b/src/assets/icon/tools/draw4.svg @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/polygon.svg b/src/assets/icon/tools/polygon.svg new file mode 100644 index 00000000..3000120f --- /dev/null +++ b/src/assets/icon/tools/polygon.svg @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/qrCode.svg b/src/assets/icon/tools/qrCode.svg new file mode 100644 index 00000000..c63c6eed --- /dev/null +++ b/src/assets/icon/tools/qrCode.svg @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/src/assets/icon/tools/rect.svg b/src/assets/icon/tools/rect.svg new file mode 100644 index 00000000..a6ba5558 --- /dev/null +++ b/src/assets/icon/tools/rect.svg @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/text.svg b/src/assets/icon/tools/text.svg new file mode 100644 index 00000000..feb79bb7 --- /dev/null +++ b/src/assets/icon/tools/text.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/textBox.svg b/src/assets/icon/tools/textBox.svg new file mode 100644 index 00000000..13fc1e30 --- /dev/null +++ b/src/assets/icon/tools/textBox.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/tools/triangle.svg b/src/assets/icon/tools/triangle.svg new file mode 100644 index 00000000..966d75d1 --- /dev/null +++ b/src/assets/icon/tools/triangle.svg @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/assets/icon/zoom/big.svg b/src/assets/icon/zoom/big.svg new file mode 100644 index 00000000..656a9902 --- /dev/null +++ b/src/assets/icon/zoom/big.svg @@ -0,0 +1,20 @@ + + + + \ No newline at end of file diff --git a/src/assets/icon/zoom/small.svg b/src/assets/icon/zoom/small.svg new file mode 100644 index 00000000..591d68c7 --- /dev/null +++ b/src/assets/icon/zoom/small.svg @@ -0,0 +1,20 @@ + + + + \ No newline at end of file diff --git a/src/components/attributeBarcode.vue b/src/components/attributeBarcode.vue index f92bfa9d..3c699935 100644 --- a/src/components/attributeBarcode.vue +++ b/src/components/attributeBarcode.vue @@ -108,6 +108,10 @@ import useSelect from '@/hooks/select'; import InputNumber from '@/components/inputNumber'; import { toRaw } from 'vue'; +import left from '@/assets/icon/barcode/left.svg?raw'; +import right from '@/assets/icon/barcode/right.svg?raw'; +import center from '@/assets/icon/barcode/center.svg?raw'; + const update = getCurrentInstance(); const { isOne, canvasEditor, isMatchType } = useSelect(['image']); @@ -132,11 +136,7 @@ const baseAttr = reactive({ // 字体对齐方式 const textAlignList = ['left', 'center', 'right']; // 对齐图标 -const textAlignListSvg = [ - '', - '', - '', -]; +const textAlignListSvg = [left, center, right]; // 属性获取 const getObjectAttr = (e) => { diff --git a/src/components/attributeFont.vue b/src/components/attributeFont.vue index d421b536..36253e94 100644 --- a/src/components/attributeFont.vue +++ b/src/components/attributeFont.vue @@ -55,36 +55,32 @@
@@ -129,6 +125,15 @@ import useSelect from '@/hooks/select'; import { Spin } from 'view-ui-plus'; import InputNumber from '@/components/inputNumber'; +import fontWeight from '@/assets/icon/attribute/fontWeight.svg'; +import fontStyle from '@/assets/icon/attribute/fontStyle.svg'; +import linethrough from '@/assets/icon/attribute/linethrough.svg'; +import underline from '@/assets/icon/attribute/underline.svg'; + +import textAlignLeft from '@/assets/icon/attribute/textAlignLeft.svg?raw'; +import textAlignRight from '@/assets/icon/attribute/textAlignRight.svg?raw'; +import textAlignCenter from '@/assets/icon/attribute/textAlignCenter.svg?raw'; +import textAlignJustitfy from '@/assets/icon/attribute/textAlignJustitfy.svg?raw'; const update = getCurrentInstance(); @@ -159,12 +164,7 @@ canvasEditor.getFontList().then((list) => { // 字体对齐方式 const textAlignList = ['left', 'center', 'right', 'justify']; // 对齐图标 -const textAlignListSvg = [ - '', - '', - '', - '', -]; +const textAlignListSvg = [textAlignLeft, textAlignCenter, textAlignRight, textAlignJustitfy]; // 属性获取 const getObjectAttr = (e) => { diff --git a/src/components/centerAlign.vue b/src/components/centerAlign.vue index 56df75e1..728cec95 100644 --- a/src/components/centerAlign.vue +++ b/src/components/centerAlign.vue @@ -16,62 +16,19 @@ @@ -81,6 +38,10 @@