From 380d191ad3e32732d0ae93a4b277b4118708b2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Thu, 19 Jun 2025 18:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=93=E5=8D=B0=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/print/index.vue | 288 ++++++++++++++++++++++++++- src/views/print/nodes/selectNode.vue | 24 ++- src/views/print/nodes/textNode.vue | 27 ++- src/views/print/nodes/timeNode.vue | 24 ++- src/views/print/tool.js | 27 ++- 5 files changed, 378 insertions(+), 12 deletions(-) diff --git a/src/views/print/index.vue b/src/views/print/index.vue index 5daa06e..0c50829 100644 --- a/src/views/print/index.vue +++ b/src/views/print/index.vue @@ -59,6 +59,7 @@ :panOnDrag="false" fit-view-on-init default-marker-color="#409EFF" + @selectionEnd="logEvent('selectionEnd', $event)" @dragover="onDragOver" @node-click="logEvent('click', $event)" @pane-click="logEvent('paneClick', $event)" @@ -185,10 +186,189 @@ /> + +
+
+
+
+
+
+
+
+
+
+
+ + + + + + +
+
+
+ +
+ + +
+ + + + + + +
+
+
+ +
+ + +
+ + + + + + +
+
+
+ +
+ + +
+ + + + + + +
+
+
+ +
+ + +
- diff --git a/src/views/print/nodes/selectNode.vue b/src/views/print/nodes/selectNode.vue index da70fc3..53c76af 100644 --- a/src/views/print/nodes/selectNode.vue +++ b/src/views/print/nodes/selectNode.vue @@ -5,7 +5,7 @@ :max-height="pageSize.height" color="#000" v-if="!props.isView && !props.isHideHandle && props.selected" />
+ :style="{...border(),textAlign:props.data.options.align,width:props.dimensions.width+'px',lineHeight:props.dimensions.height+'px',height:props.dimensions.height+'px',pointerEvents:props.isView?'auto': 'none'}">
@@ -92,6 +92,28 @@ watch(() => JSON.parse(JSON.stringify(props.data.options.default)), (obj1, obj2) } }, { deep: true, immediate: true }); +const border = () => { + let res = {}; + if (props.data.options.border) { + let top = props.data.options.border.find(e => e.type === 'top'); + let right = props.data.options.border.find(e => e.type === 'right'); + let bottom = props.data.options.border.find(e => e.type === 'bottom'); + let left = props.data.options.border.find(e => e.type === 'left'); + if (top.isShow) { + res['borderTop'] = `${top.width}px ${top.borderType} ${top.color}`; + } + if (right.isShow) { + res['borderRight'] = `${right.width}px ${right.borderType} ${right.color}`; + } + if (bottom.isShow) { + res['borderBottom'] = `${bottom.width}px ${bottom.borderType} ${bottom.color}`; + } + if (left.isShow) { + res['borderLeft'] = `${left.width}px ${left.borderType} ${left.color}`; + } + } + return res; +};