@gct-paas/core-web 0.1.6-dev.37 → 0.1.6-dev.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{JsBarcode-Bo5SpPqf.js → JsBarcode-ClFIdbED.js} +2 -2
- package/dist/{chunk-CzFT3iS2.js → chunk-CeDsE8LQ.js} +1 -1
- package/dist/{cropper-3WG6IxPT.js → cropper-CWuUC8vw.js} +2 -2
- package/dist/{de_DE-EpMUkrKG.js → de_DE-D0xcBz9q.js} +2 -2
- package/dist/{defineProperty-DjJcBLb4.js → defineProperty-DDkimXe6.js} +1 -1
- package/dist/{diagram-config-item-Ba84t2ju.js → diagram-config-item-BNTeBE-4.js} +2 -2
- package/dist/{diagram-config-item-reverse-BhbjSzBe.js → diagram-config-item-reverse-Dddnmnfo.js} +2 -2
- package/dist/{diagram-config-item-virtual-fva5teOL.js → diagram-config-item-virtual-DYZHFYx_.js} +2 -2
- package/dist/{en_US-Bgy0yEFu.js → en_US-B4Nwc1yU.js} +2 -2
- package/dist/{es_ES-DRngTAb5.js → es_ES-CqefGnVv.js} +2 -2
- package/dist/{fr_FR-5q20H1AL.js → fr_FR-BCfhXFGZ.js} +2 -2
- package/dist/{hooks-ZH0Pak8N.js → hooks-DP5xcN9D.js} +2 -2
- package/dist/{icon-next-picker-Dt_2BtcK.js → icon-next-picker-DG4HFDGl.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-DvTjb7zM.js → ja_JP-CoFxiAvE.js} +2 -2
- package/dist/loader.esm.min.js +2 -2
- package/dist/{monaco-editor-Dq3suO5P.js → monaco-editor-Bml9w0vu.js} +2 -2
- package/dist/{objectSpread2-oPY7ovX3.js → objectSpread2-hnXyEBLf.js} +1 -1
- package/dist/{overlayscrollbars-vue-BWvh-ibY.js → overlayscrollbars-vue-DfdIAPTx.js} +1 -1
- package/dist/{pt_PT-Ct6NdUWY.js → pt_PT-CuaCyhKZ.js} +2 -2
- package/dist/{relationship-diagram-config-C8LCLDKK.js → relationship-diagram-config-CAoHKQXK.js} +2 -2
- package/dist/{rich-editor-CFRbyrMz.js → rich-editor-BuG5EbhO.js} +2 -2
- package/dist/{ru_RU-EwaOwdC1.js → ru_RU-5uz6U6zf.js} +2 -2
- package/dist/{tr_TR-52XfjsR-.js → tr_TR-4pDGiPBN.js} +2 -2
- package/dist/{useMonacoEditor-8TeCBE8q.js → useMonacoEditor-sB2Y6Jf0.js} +2 -2
- package/dist/{vi_VN-Cv3A0n4a.js → vi_VN-QIS8kpjj.js} +2 -2
- package/dist/{zh_CN-DRHhwKU9.js → zh_CN-D1TlxLnL.js} +2 -2
- package/dist/{zh_TW-7f3cKGBH.js → zh_TW-Dxzu1jIs.js} +2 -2
- package/es/components/label-design/components/mr-vue/MrEl.vue.mjs +2 -2
- package/es/components/label-design/components/mr-vue/MrEl.vue_vue_type_script_setup_true_name_mr-el_lang.mjs +15 -11
- package/es/components/label-design/components/mr-vue/{MrEl.vue_vue_type_style_index_0_scoped_abef86c9_lang.css → MrEl.vue_vue_type_style_index_0_scoped_371e4b06_lang.css} +61 -61
- package/es/components/label-design/components/widgets/QrCode.vue.mjs +2 -2
- package/es/components/label-design/components/widgets/QrCode.vue_vue_type_script_setup_true_name_QR_CODE_lang.mjs +86 -4
- package/es/components/label-design/components/widgets/QrCode.vue_vue_type_style_index_0_scoped_2fb36afd_lang.css +14 -0
- package/es/components/label-design/components/widgets/Text.vue.mjs +3 -3
- package/es/components/label-design/components/widgets/{Text.vue_vue_type_script_setup_true_lang.mjs → Text.vue_vue_type_script_setup_true_name_TEXT_lang.mjs} +44 -22
- package/es/components/label-design/components/widgets/Text.vue_vue_type_style_index_0_scoped_d9ace99f_lang.css +37 -0
- package/es/components/label-design/components/widgets/richText.vue.mjs +2 -2
- package/es/components/label-design/components/widgets/richText.vue_vue_type_script_setup_true_lang.mjs +4 -3
- package/es/components/label-design/components/widgets/{richText.vue_vue_type_style_index_0_scoped_d05f3ffd_lang.css → richText.vue_vue_type_style_index_0_scoped_fc7a37f7_lang.css} +3 -3
- package/es/components/label-design/constants/CommonPrintElems.d.ts +41 -4
- package/es/components/label-design/constants/CommonPrintElems.mjs +31 -15
- package/es/components/label-design/header/test-var-modal.vue.d.ts +3 -0
- package/es/components/label-design/hooks/useDesigner.d.ts +1 -0
- package/es/components/label-design/hooks/useDesigner.mjs +19 -1
- package/es/components/label-design/hooks/usePage.mjs +16 -2
- package/es/components/label-design/hooks/useProp.d.ts +62 -7
- package/es/components/label-design/hooks/useProp.mjs +153 -96
- package/es/components/label-design/panels/modals/diff-modal.vue.mjs +2 -2
- package/es/components/label-design/panels/modals/diff-modal.vue_vue_type_script_setup_true_lang.mjs +4 -2
- package/es/components/label-design/panels/modals/{diff-modal.vue_vue_type_style_index_0_scoped_16a76e9a_lang.css → diff-modal.vue_vue_type_style_index_0_scoped_54211e3c_lang.css} +2 -2
- package/es/components/label-design/panels/widget/component-properties.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/component-properties.vue_vue_type_script_setup_true_name_component-properties_lang.mjs +5 -4
- package/es/components/label-design/panels/widget/{component-properties.vue_vue_type_style_index_0_scoped_dff66bbe_lang.css → component-properties.vue_vue_type_style_index_0_scoped_d6c5e9e9_lang.css} +10 -10
- package/es/components/label-design/panels/widget/controls/AliasInput.vue.mjs +9 -4
- package/es/components/label-design/panels/widget/controls/Border.vue.mjs +26 -23
- package/es/components/label-design/panels/widget/controls/Border.vue_vue_type_script_lang.mjs +4 -0
- package/es/components/label-design/panels/widget/controls/{Border.vue_vue_type_style_index_0_scoped_70116f39_lang.css → Border.vue_vue_type_style_index_0_scoped_5bb46dc4_lang.css} +5 -5
- package/es/components/label-design/panels/widget/controls/FontStyle.vue.mjs +12 -8
- package/es/components/label-design/panels/widget/controls/FontStyle.vue_vue_type_script_lang.mjs +12 -6
- package/es/components/label-design/panels/widget/controls/InputContent.vue.mjs +9 -4
- package/es/components/label-design/panels/widget/controls/InputContent.vue_vue_type_script_lang.mjs +4 -0
- package/es/components/label-design/panels/widget/controls/LineHeight.vue.mjs +183 -0
- package/es/components/label-design/panels/widget/controls/PdfQrConfig.vue.mjs +10 -0
- package/es/components/label-design/panels/widget/controls/PdfQrConfig.vue_vue_type_script_setup_true_name_pdf-qr-config_lang.mjs +166 -0
- package/es/components/label-design/panels/widget/controls/PdfQrConfig.vue_vue_type_style_index_0_scoped_cd6ec1c2_lang.css +19 -0
- package/es/components/label-design/panels/widget/controls/PdfQrConfig.vue_vue_type_style_index_1_lang.css +0 -0
- package/es/components/label-design/panels/widget/controls/SelectContent.vue.mjs +20 -5
- package/es/components/label-design/panels/widget/controls/StackOrder.vue.mjs +15 -10
- package/es/components/label-design/panels/widget/controls/TextAlign.vue.mjs +12 -8
- package/es/components/label-design/panels/widget/controls/TextAlign.vue_vue_type_script_lang.mjs +9 -3
- package/es/components/label-design/panels/widget/controls/TextVerticalAlign.vue.mjs +9 -6
- package/es/components/label-design/panels/widget/controls/TextVerticalAlign.vue_vue_type_script_lang.mjs +9 -3
- package/es/components/label-design/panels/widget/controls/VariableSelect.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/VariableSelect.vue_vue_type_script_setup_true_name_variable-select_lang.mjs +10 -6
- package/es/components/label-design/panels/widget/controls/VariableSelect.vue_vue_type_style_index_0_scoped_14634dd0_lang.css +15 -0
- package/es/components/label-design/panels/widget/controls/dim-pos.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/dim-pos.vue_vue_type_script_setup_true_name_dim-pos_lang.mjs +52 -44
- package/es/components/label-design/panels/widget/controls/{dim-pos.vue_vue_type_style_index_0_scoped_a247e0e1_lang.css → dim-pos.vue_vue_type_style_index_0_scoped_16616a25_lang.css} +2 -2
- package/es/components/label-design/panels/widget/controls/field-content.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/controls/field-content.vue_vue_type_script_setup_true_name_field-content_lang.mjs +3 -2
- package/es/components/label-design/panels/widget/controls/field-content.vue_vue_type_style_index_0_scoped_20837fed_lang.css +6 -0
- package/es/components/label-design/panels/widget/controls/index.mjs +4 -0
- package/es/components/label-design/panels/widget/controls/rich-btn.vue.mjs +1 -1
- package/es/components/label-design/panels/widget/controls/rich-btn.vue_vue_type_script_lang.mjs +11 -5
- package/es/components/label-design/panels/widget/page-properties.vue.mjs +2 -2
- package/es/components/label-design/panels/widget/page-properties.vue_vue_type_script_setup_true_name_page-properties_lang.mjs +3 -2
- package/es/components/label-design/panels/widget/{page-properties.vue_vue_type_style_index_0_scoped_ad548f64_lang.css → page-properties.vue_vue_type_style_index_0_scoped_e0675ce4_lang.css} +2 -2
- package/es/components/label-design/panels/widget/panel-widget.vue_vue_type_script_setup_true_name_panel-widget_lang.mjs +4 -3
- package/es/components/label-design/stage/StageEl.vue.d.ts +6 -1
- package/es/components/label-design/stage/StageEl.vue_vue_type_script_lang.mjs +23 -1
- package/es/components/label-design/stage/stage-canvas.vue.d.ts +2 -0
- package/es/components/label-design/stage/stage-canvas.vue_vue_type_script_setup_true_lang.mjs +27 -3
- package/es/components/label-design/toolkits/toolkit-widgets.vue.mjs +2 -2
- package/es/components/label-design/toolkits/toolkit-widgets.vue_vue_type_script_setup_true_name_toolkit-widgets_lang.mjs +4 -3
- package/es/components/label-design/toolkits/{toolkit-widgets.vue_vue_type_style_index_0_scoped_a787d212_lang.css → toolkit-widgets.vue_vue_type_style_index_0_scoped_c0634baf_lang.css} +9 -9
- package/es/components/open-select-user-modal/component/org.vue.mjs +1 -1
- package/es/components/open-select-user-modal/component/role.vue.mjs +1 -1
- package/es/components/open-select-user-modal/component/user-group.vue.mjs +1 -1
- package/es/components/open-select-user-modal/component/user.vue.mjs +1 -1
- package/es/index.mjs +2 -2
- package/es/locale/sys/appDesigner.d.ts +3 -0
- package/es/locale/sys/appDesigner.mjs +4 -1
- package/es/locale/sys/model.d.ts +2 -0
- package/es/locale/sys/model.mjs +3 -1
- package/es/locale/sys/pageDesigner.d.ts +25 -0
- package/es/locale/sys/pageDesigner.mjs +26 -1
- package/es/locale/sys/printDesigner.d.ts +111 -0
- package/es/locale/sys/printDesigner.mjs +112 -1
- package/es/locale/sys.d.ts +6 -0
- package/es/locale/sys.mjs +7 -1
- package/package.json +11 -11
- package/es/components/label-design/components/widgets/QrCode.vue_vue_type_style_index_0_scoped_61b471f2_lang.css +0 -10
- package/es/components/label-design/components/widgets/Text.vue_vue_type_style_index_0_scoped_170abee2_lang.css +0 -33
- package/es/components/label-design/panels/widget/controls/VariableSelect.vue_vue_type_style_index_0_scoped_2c6f0905_lang.css +0 -12
- package/es/components/label-design/panels/widget/controls/field-content.vue_vue_type_style_index_0_scoped_68aaf84d_lang.css +0 -6
- /package/es/components/open-select-user-modal/component/{user-group.vue_vue_type_style_index_0_lang.css → org.vue_vue_type_style_index_0_lang.css} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import qrcode_default from "./images/qrcode.png.mjs";
|
|
2
2
|
import gs1datamatrix_default from "./images/gs1datamatrix.png.mjs";
|
|
3
|
-
import { createElementBlock, defineComponent, normalizeStyle, openBlock, ref } from "vue";
|
|
3
|
+
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, nextTick, normalizeStyle, onMounted, openBlock, ref, vShow, watch, withDirectives } from "vue";
|
|
4
|
+
import bwipjs from "bwip-js";
|
|
4
5
|
//#region src/components/label-design/components/widgets/QrCode.vue?vue&type=script&setup=true&name=QR_CODE&lang.ts
|
|
5
6
|
var _hoisted_1 = { class: "p-qrcode" };
|
|
6
7
|
var QrCode_vue_vue_type_script_setup_true_name_QR_CODE_lang_default = /* @__PURE__ */ defineComponent({
|
|
@@ -13,10 +14,87 @@ var QrCode_vue_vue_type_script_setup_true_name_QR_CODE_lang_default = /* @__PURE
|
|
|
13
14
|
type: {
|
|
14
15
|
type: Object,
|
|
15
16
|
default: () => ({ value: "QR_CODE" })
|
|
17
|
+
},
|
|
18
|
+
content: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: () => ({
|
|
21
|
+
type: "text",
|
|
22
|
+
val: "QR Code Text",
|
|
23
|
+
var: ""
|
|
24
|
+
})
|
|
25
|
+
},
|
|
26
|
+
rowHeight: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: () => ({ val: 3 })
|
|
29
|
+
},
|
|
30
|
+
rows: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({ val: null })
|
|
33
|
+
},
|
|
34
|
+
columns: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default: () => ({ val: null })
|
|
16
37
|
}
|
|
17
38
|
},
|
|
18
|
-
|
|
39
|
+
emits: ["qrcodeChange"],
|
|
40
|
+
setup(__props, { emit: __emit }) {
|
|
41
|
+
const props = __props;
|
|
42
|
+
const emit = __emit;
|
|
19
43
|
const style = ref();
|
|
44
|
+
const canvasRef = ref();
|
|
45
|
+
watch(() => [
|
|
46
|
+
props.type.value,
|
|
47
|
+
props.content.value,
|
|
48
|
+
props.rows.value,
|
|
49
|
+
props.columns.value,
|
|
50
|
+
props.rowHeight.value
|
|
51
|
+
], () => {
|
|
52
|
+
createQrcode();
|
|
53
|
+
});
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
createQrcode();
|
|
56
|
+
});
|
|
57
|
+
async function createQrcode() {
|
|
58
|
+
if (props.type.value !== "PDF_417") return;
|
|
59
|
+
await nextTick();
|
|
60
|
+
const canvas = canvasRef.value;
|
|
61
|
+
if (!canvas) return;
|
|
62
|
+
const content = props.content.value || "PDF417 Text";
|
|
63
|
+
try {
|
|
64
|
+
bwipjs.toCanvas(canvas, {
|
|
65
|
+
bcid: "pdf417",
|
|
66
|
+
text: content,
|
|
67
|
+
scale: 1,
|
|
68
|
+
rowmult: props.rowHeight.value ?? 3,
|
|
69
|
+
rows: props.rows.value ?? 0,
|
|
70
|
+
columns: props.columns.value ?? 0,
|
|
71
|
+
eclevel: 4,
|
|
72
|
+
paddingwidth: 2,
|
|
73
|
+
paddingheight: 1
|
|
74
|
+
});
|
|
75
|
+
syncCanvasDisplaySize();
|
|
76
|
+
await nextTick();
|
|
77
|
+
notifySizeChange();
|
|
78
|
+
} catch (err) {
|
|
79
|
+
console.warn(err);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** 按 canvas 实际像素尺寸展示,避免被旧容器拉伸 */
|
|
83
|
+
function syncCanvasDisplaySize() {
|
|
84
|
+
const canvas = canvasRef.value;
|
|
85
|
+
if (!canvas) return;
|
|
86
|
+
canvas.style.width = `${canvas.width}px`;
|
|
87
|
+
canvas.style.height = `${canvas.height}px`;
|
|
88
|
+
}
|
|
89
|
+
/** canvas 无 load 事件,绘制完成后主动同步外层元素尺寸 */
|
|
90
|
+
function notifySizeChange() {
|
|
91
|
+
const canvas = canvasRef.value;
|
|
92
|
+
if (!canvas) return;
|
|
93
|
+
emit("qrcodeChange", {
|
|
94
|
+
width: canvas.width,
|
|
95
|
+
height: canvas.height
|
|
96
|
+
});
|
|
97
|
+
}
|
|
20
98
|
return (_ctx, _cache) => {
|
|
21
99
|
return openBlock(), createElementBlock("div", _hoisted_1, [__props.type.value == "QR_CODE" ? (openBlock(), createElementBlock("img", {
|
|
22
100
|
key: 0,
|
|
@@ -24,13 +102,17 @@ var QrCode_vue_vue_type_script_setup_true_name_QR_CODE_lang_default = /* @__PURE
|
|
|
24
102
|
alt: "qrcode",
|
|
25
103
|
class: "p-img-element",
|
|
26
104
|
style: normalizeStyle(style.value)
|
|
27
|
-
}, null, 4)) : (openBlock(), createElementBlock("img", {
|
|
105
|
+
}, null, 4)) : __props.type.value == "GS1_DATA_MATRIX" ? (openBlock(), createElementBlock("img", {
|
|
28
106
|
key: 1,
|
|
29
107
|
src: gs1datamatrix_default,
|
|
30
108
|
alt: "gs1datamatrix",
|
|
31
109
|
class: "p-img-element",
|
|
32
110
|
style: normalizeStyle(style.value)
|
|
33
|
-
}, null, 4))
|
|
111
|
+
}, null, 4)) : createCommentVNode("", true), withDirectives(createElementVNode("canvas", {
|
|
112
|
+
ref_key: "canvasRef",
|
|
113
|
+
ref: canvasRef,
|
|
114
|
+
class: "p-pdf417-canvas"
|
|
115
|
+
}, null, 512), [[vShow, __props.type.value == "PDF_417"]])]);
|
|
34
116
|
};
|
|
35
117
|
}
|
|
36
118
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
.p-qrcode[data-v-2fb36afd] {
|
|
3
|
+
position: absolute;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
text-align: center;
|
|
6
|
+
}
|
|
7
|
+
.p-qrcode img[data-v-2fb36afd],
|
|
8
|
+
.p-pdf417-canvas[data-v-2fb36afd] {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
.p-qrcode img[data-v-2fb36afd] {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __exportAll } from "../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
3
|
-
import
|
|
4
|
-
import './Text.
|
|
3
|
+
import Text_vue_vue_type_script_setup_true_name_TEXT_lang_default from "./Text.vue_vue_type_script_setup_true_name_TEXT_lang.mjs";
|
|
4
|
+
import './Text.vue_vue_type_style_index_0_scoped_d9ace99f_lang.css';/* empty css */
|
|
5
5
|
//#region src/components/label-design/components/widgets/Text.vue
|
|
6
6
|
var Text_exports = /* @__PURE__ */ __exportAll({ default: () => Text_default });
|
|
7
|
-
var Text_default = /* @__PURE__ */ _plugin_vue_export_helper_default(
|
|
7
|
+
var Text_default = /* @__PURE__ */ _plugin_vue_export_helper_default(Text_vue_vue_type_script_setup_true_name_TEXT_lang_default, [["__scopeId", "data-v-d9ace99f"]]);
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Text_exports };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useDesigner } from "../../hooks/useDesigner.mjs";
|
|
2
2
|
import { useProp } from "../../hooks/useProp.mjs";
|
|
3
|
-
import { computed,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
3
|
+
import { computed, createElementBlock, createVNode, defineComponent, normalizeStyle, openBlock, resolveComponent, unref } from "vue";
|
|
4
|
+
import { t } from "@gct-paas/core";
|
|
5
|
+
//#region src/components/label-design/components/widgets/Text.vue?vue&type=script&setup=true&name=TEXT&lang.ts
|
|
6
|
+
var Text_vue_vue_type_script_setup_true_name_TEXT_lang_default = /* @__PURE__ */ defineComponent({
|
|
7
7
|
name: "TextWidget",
|
|
8
8
|
__name: "Text",
|
|
9
9
|
props: {
|
|
@@ -66,19 +66,41 @@ var Text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
66
66
|
const showEdit = computed(() => {
|
|
67
67
|
return props.isEdit;
|
|
68
68
|
});
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
const spacingStyle = computed(() => {
|
|
70
|
+
const fontSize = props.fontSize;
|
|
71
|
+
const styles = props.styles || {};
|
|
72
|
+
const spaceType = styles["space-type"] || "LINE";
|
|
73
|
+
const space = styles.space;
|
|
74
|
+
const finalLineHeight = spaceType === "FIXED" ? Math.min(100, Math.max(fontSize, space ?? 24)) : Math.max(fontSize, Math.round(fontSize * (space ?? 1.5) * 100) / 100);
|
|
75
|
+
return {
|
|
76
|
+
fontSize,
|
|
77
|
+
lineHeight: finalLineHeight,
|
|
78
|
+
trimOffset: Math.max(0, finalLineHeight - fontSize) / 2
|
|
75
79
|
};
|
|
80
|
+
});
|
|
81
|
+
const containerStyle = computed(() => {
|
|
82
|
+
const obj = { backgroundColor: props.bgColor };
|
|
76
83
|
if (props.borderTop) obj.borderTop = `${props.borderTop.borderColor} ${props.borderTop.borderStyle} ${props.borderTop.borderWidth}px`;
|
|
77
84
|
if (props.borderRight) obj.borderRight = `${props.borderRight.borderColor} ${props.borderRight.borderStyle} ${props.borderRight.borderWidth}px`;
|
|
78
85
|
if (props.borderBottom) obj.borderBottom = `${props.borderBottom.borderColor} ${props.borderBottom.borderStyle} ${props.borderBottom.borderWidth}px`;
|
|
79
86
|
if (props.borderLeft) obj.borderLeft = `${props.borderLeft.borderColor} ${props.borderLeft.borderStyle} ${props.borderLeft.borderWidth}px`;
|
|
80
87
|
obj.borderRadius = `${props.borderTopLeftRadius || "0"}px ${props.borderTopRightRadius || "0"}px ${props.borderBottomRightRadius || "0"}px ${props.borderBottomLeftRadius || "0"}px`;
|
|
88
|
+
return obj;
|
|
89
|
+
});
|
|
90
|
+
const editStyle = computed(() => {
|
|
81
91
|
const styles = props.styles || {};
|
|
92
|
+
const { fontSize, lineHeight, trimOffset } = spacingStyle.value;
|
|
93
|
+
const obj = {
|
|
94
|
+
fontSize: fontSize + "px",
|
|
95
|
+
lineHeight: lineHeight + "px",
|
|
96
|
+
fontFamily: props.fontFamily,
|
|
97
|
+
marginTop: trimOffset ? `-${trimOffset}px` : void 0,
|
|
98
|
+
marginBottom: trimOffset ? `-${trimOffset}px` : void 0,
|
|
99
|
+
backgroundColor: "transparent",
|
|
100
|
+
border: "none",
|
|
101
|
+
boxShadow: "none",
|
|
102
|
+
resize: "none"
|
|
103
|
+
};
|
|
82
104
|
if (styles["text-decoration"]) obj.textDecoration = styles["text-decoration"];
|
|
83
105
|
if (styles["text-align"]) obj.textAlign = styles["text-align"];
|
|
84
106
|
if (styles["font-weight"]) obj.fontWeight = styles["font-weight"];
|
|
@@ -89,23 +111,23 @@ var Text_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
89
111
|
const _component_a_textarea = resolveComponent("a-textarea");
|
|
90
112
|
return openBlock(), createElementBlock("div", {
|
|
91
113
|
class: "p-label",
|
|
92
|
-
style: normalizeStyle(
|
|
93
|
-
}, [
|
|
94
|
-
key: 0,
|
|
95
|
-
class: normalizeClass(["p-label_text", { "is-empty": !showText.value }]),
|
|
96
|
-
"data-placeholder": "请输入文本",
|
|
97
|
-
textContent: toDisplayString(showText.value)
|
|
98
|
-
}, null, 10, _hoisted_1)) : (openBlock(), createBlock(_component_a_textarea, {
|
|
99
|
-
key: 1,
|
|
114
|
+
style: normalizeStyle(containerStyle.value)
|
|
115
|
+
}, [createVNode(_component_a_textarea, {
|
|
100
116
|
value: showText.value,
|
|
101
117
|
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => showText.value = $event),
|
|
102
118
|
"auto-size": "",
|
|
103
119
|
maxlength: 1e3,
|
|
104
|
-
style: normalizeStyle(
|
|
105
|
-
placeholder: "
|
|
106
|
-
|
|
120
|
+
style: normalizeStyle(editStyle.value),
|
|
121
|
+
placeholder: unref(t)("sys.pleaseInputSth", { sth: unref(t)("sys.text") }),
|
|
122
|
+
disabled: !showEdit.value
|
|
123
|
+
}, null, 8, [
|
|
124
|
+
"value",
|
|
125
|
+
"style",
|
|
126
|
+
"placeholder",
|
|
127
|
+
"disabled"
|
|
128
|
+
])], 4);
|
|
107
129
|
};
|
|
108
130
|
}
|
|
109
131
|
});
|
|
110
132
|
//#endregion
|
|
111
|
-
export {
|
|
133
|
+
export { Text_vue_vue_type_script_setup_true_name_TEXT_lang_default as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
.p-label {
|
|
3
|
+
&[data-v-d9ace99f] {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
|
|
6
|
+
/* display: table; */
|
|
7
|
+
width: 100%;
|
|
8
|
+
border: 1px dashed #e8ebf0;
|
|
9
|
+
outline: none;
|
|
10
|
+
|
|
11
|
+
/* overflow: hidden; */
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
word-break: break-all; /* 任意字符处都可换行(包括单词中间) */
|
|
14
|
+
overflow-wrap: break-word; /* 允许在单词内换行 */
|
|
15
|
+
}
|
|
16
|
+
.ant-input[data-v-d9ace99f] {
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
[data-v-d9ace99f] .ant-input {
|
|
21
|
+
padding: 0;
|
|
22
|
+
background: transparent;
|
|
23
|
+
border: none;
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
resize: none;
|
|
26
|
+
}
|
|
27
|
+
[data-v-d9ace99f] .ant-input[disabled],[data-v-d9ace99f] .ant-input-disabled,[data-v-d9ace99f] textarea[disabled] {
|
|
28
|
+
color: inherit;
|
|
29
|
+
background: transparent;
|
|
30
|
+
cursor: default;
|
|
31
|
+
opacity: 1;
|
|
32
|
+
-webkit-text-fill-color: currentColor;
|
|
33
|
+
}
|
|
34
|
+
[data-v-d9ace99f] .ant-input[disabled]::placeholder,[data-v-d9ace99f] .ant-input-disabled::placeholder,[data-v-d9ace99f] textarea[disabled]::placeholder {
|
|
35
|
+
color: #c3c3c3;
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __exportAll } from "../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
2
|
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
3
3
|
import richText_vue_vue_type_script_setup_true_lang_default from "./richText.vue_vue_type_script_setup_true_lang.mjs";
|
|
4
|
-
import './richText.
|
|
4
|
+
import './richText.vue_vue_type_style_index_0_scoped_fc7a37f7_lang.css';/* empty css */
|
|
5
5
|
//#region src/components/label-design/components/widgets/richText.vue
|
|
6
6
|
var richText_exports = /* @__PURE__ */ __exportAll({ default: () => richText_default });
|
|
7
|
-
var richText_default = /* @__PURE__ */ _plugin_vue_export_helper_default(richText_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
7
|
+
var richText_default = /* @__PURE__ */ _plugin_vue_export_helper_default(richText_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-fc7a37f7"]]);
|
|
8
8
|
//#endregion
|
|
9
9
|
export { richText_exports };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock } from "vue";
|
|
1
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, unref } from "vue";
|
|
2
|
+
import { t } from "@gct-paas/core";
|
|
2
3
|
//#region src/components/label-design/components/widgets/richText.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
-
var _hoisted_1 = ["innerHTML"];
|
|
4
|
+
var _hoisted_1 = ["data-placeholder", "innerHTML"];
|
|
4
5
|
var richText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
5
6
|
name: "RichTextWidget",
|
|
6
7
|
__name: "richText",
|
|
@@ -48,7 +49,7 @@ var richText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
48
49
|
"color-[#C3C3C3]": !props.text,
|
|
49
50
|
"is-empty": !props.text
|
|
50
51
|
}]),
|
|
51
|
-
"data-placeholder": "
|
|
52
|
+
"data-placeholder": unref(t)("sys.printDesigner.pleaseEnterRichText"),
|
|
52
53
|
innerHTML: showText.value
|
|
53
54
|
}, null, 10, _hoisted_1)], 4);
|
|
54
55
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.p-label[data-v-
|
|
2
|
+
.p-label[data-v-fc7a37f7] {
|
|
3
3
|
/* overflow: hidden; */
|
|
4
4
|
text-overflow: ellipsis;
|
|
5
5
|
outline: none;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
overflow-wrap: break-word; /* 允许在单词内换行 */
|
|
10
10
|
box-sizing: border-box;
|
|
11
11
|
}
|
|
12
|
-
.p-label_text[data-v-
|
|
12
|
+
.p-label_text[data-v-fc7a37f7] {
|
|
13
13
|
width: 100%;
|
|
14
14
|
/* height: 100%; */
|
|
15
15
|
word-break: break-all; /* 任意字符处都可换行(包括单词中间) */
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
box-sizing: border-box;
|
|
19
19
|
}
|
|
20
20
|
.is-empty {
|
|
21
|
-
&[data-v-
|
|
21
|
+
&[data-v-fc7a37f7]::before {
|
|
22
22
|
content: attr(data-placeholder);
|
|
23
23
|
width: 100%;
|
|
24
24
|
height: 100%;
|
|
@@ -20,8 +20,14 @@ export declare enum CONTENT_TYPE {
|
|
|
20
20
|
}
|
|
21
21
|
export declare enum QR_CODE_TYPE {
|
|
22
22
|
QR_CODE = "QR_CODE",
|
|
23
|
-
GS1_DATA_MATRIX = "GS1_DATA_MATRIX"
|
|
23
|
+
GS1_DATA_MATRIX = "GS1_DATA_MATRIX",
|
|
24
|
+
PDF_417 = "PDF_417"
|
|
24
25
|
}
|
|
26
|
+
export declare const QR_CODE_TEXT: {
|
|
27
|
+
QR_CODE: string;
|
|
28
|
+
GS1_DATA_MATRIX: string;
|
|
29
|
+
PDF_417: string;
|
|
30
|
+
};
|
|
25
31
|
declare const symbolElements: ({
|
|
26
32
|
label: string;
|
|
27
33
|
children: ({
|
|
@@ -45,6 +51,8 @@ declare const symbolElements: ({
|
|
|
45
51
|
color?: undefined;
|
|
46
52
|
'font-size'?: undefined;
|
|
47
53
|
'font-family'?: undefined;
|
|
54
|
+
'space-type'?: undefined;
|
|
55
|
+
space?: undefined;
|
|
48
56
|
};
|
|
49
57
|
classes: {};
|
|
50
58
|
rotate: number;
|
|
@@ -70,6 +78,8 @@ declare const symbolElements: ({
|
|
|
70
78
|
'vertical-align'?: undefined;
|
|
71
79
|
'font-size'?: undefined;
|
|
72
80
|
'font-family'?: undefined;
|
|
81
|
+
'space-type'?: undefined;
|
|
82
|
+
space?: undefined;
|
|
73
83
|
};
|
|
74
84
|
classes: {};
|
|
75
85
|
rotate: number;
|
|
@@ -100,6 +110,8 @@ declare const symbolElements: ({
|
|
|
100
110
|
'vertical-align'?: undefined;
|
|
101
111
|
'font-size'?: undefined;
|
|
102
112
|
'font-family'?: undefined;
|
|
113
|
+
'space-type'?: undefined;
|
|
114
|
+
space?: undefined;
|
|
103
115
|
};
|
|
104
116
|
classes: {};
|
|
105
117
|
rotate: number;
|
|
@@ -134,6 +146,8 @@ declare const symbolElements: ({
|
|
|
134
146
|
color: string;
|
|
135
147
|
'font-size': number;
|
|
136
148
|
'font-family': string;
|
|
149
|
+
'space-type': string;
|
|
150
|
+
space: number;
|
|
137
151
|
};
|
|
138
152
|
classes: {};
|
|
139
153
|
rotate: number;
|
|
@@ -165,6 +179,8 @@ declare const symbolElements: ({
|
|
|
165
179
|
color?: undefined;
|
|
166
180
|
'font-size'?: undefined;
|
|
167
181
|
'font-family'?: undefined;
|
|
182
|
+
'space-type'?: undefined;
|
|
183
|
+
space?: undefined;
|
|
168
184
|
};
|
|
169
185
|
classes: {};
|
|
170
186
|
rotate: number;
|
|
@@ -201,6 +217,9 @@ declare const symbolElements: ({
|
|
|
201
217
|
value: number;
|
|
202
218
|
};
|
|
203
219
|
magnification?: undefined;
|
|
220
|
+
rowHeight?: undefined;
|
|
221
|
+
rows?: undefined;
|
|
222
|
+
columns?: undefined;
|
|
204
223
|
icon?: undefined;
|
|
205
224
|
logoColor?: undefined;
|
|
206
225
|
logoBgColor?: undefined;
|
|
@@ -212,10 +231,9 @@ declare const symbolElements: ({
|
|
|
212
231
|
hasRotate: boolean;
|
|
213
232
|
rotateWidth: number;
|
|
214
233
|
rotateHeight: number;
|
|
234
|
+
hasError?: undefined;
|
|
235
|
+
errMsg?: undefined;
|
|
215
236
|
} | {
|
|
216
|
-
hasRotate?: undefined;
|
|
217
|
-
rotateWidth?: undefined;
|
|
218
|
-
rotateHeight?: undefined;
|
|
219
237
|
alias: string;
|
|
220
238
|
iconName: string;
|
|
221
239
|
displayName: string;
|
|
@@ -237,6 +255,15 @@ declare const symbolElements: ({
|
|
|
237
255
|
magnification: {
|
|
238
256
|
value: number;
|
|
239
257
|
};
|
|
258
|
+
rowHeight: {
|
|
259
|
+
value: number;
|
|
260
|
+
};
|
|
261
|
+
rows: {
|
|
262
|
+
value: null;
|
|
263
|
+
};
|
|
264
|
+
columns: {
|
|
265
|
+
value: null;
|
|
266
|
+
};
|
|
240
267
|
icon?: undefined;
|
|
241
268
|
logoColor?: undefined;
|
|
242
269
|
logoBgColor?: undefined;
|
|
@@ -245,7 +272,14 @@ declare const symbolElements: ({
|
|
|
245
272
|
classes: {};
|
|
246
273
|
rotate: number;
|
|
247
274
|
hasPos: boolean;
|
|
275
|
+
hasRotate: boolean;
|
|
276
|
+
rotateWidth: number;
|
|
277
|
+
rotateHeight: number;
|
|
278
|
+
hasError: boolean;
|
|
279
|
+
errMsg: string;
|
|
248
280
|
} | {
|
|
281
|
+
hasError?: undefined;
|
|
282
|
+
errMsg?: undefined;
|
|
249
283
|
alias: string;
|
|
250
284
|
iconName: string;
|
|
251
285
|
displayName: string;
|
|
@@ -259,6 +293,9 @@ declare const symbolElements: ({
|
|
|
259
293
|
content?: undefined;
|
|
260
294
|
type?: undefined;
|
|
261
295
|
magnification?: undefined;
|
|
296
|
+
rowHeight?: undefined;
|
|
297
|
+
rows?: undefined;
|
|
298
|
+
columns?: undefined;
|
|
262
299
|
icon: {
|
|
263
300
|
value: string;
|
|
264
301
|
};
|
|
@@ -25,15 +25,21 @@ var CONTENT_TYPE = /* @__PURE__ */ function(CONTENT_TYPE) {
|
|
|
25
25
|
var QR_CODE_TYPE = /* @__PURE__ */ function(QR_CODE_TYPE) {
|
|
26
26
|
QR_CODE_TYPE["QR_CODE"] = "QR_CODE";
|
|
27
27
|
QR_CODE_TYPE["GS1_DATA_MATRIX"] = "GS1_DATA_MATRIX";
|
|
28
|
+
QR_CODE_TYPE["PDF_417"] = "PDF_417";
|
|
28
29
|
return QR_CODE_TYPE;
|
|
29
30
|
}({});
|
|
31
|
+
var QR_CODE_TEXT = {
|
|
32
|
+
[QR_CODE_TYPE.QR_CODE]: "QR code Text",
|
|
33
|
+
[QR_CODE_TYPE.GS1_DATA_MATRIX]: "GS1 Data Matrix Text",
|
|
34
|
+
[QR_CODE_TYPE.PDF_417]: "PDF417 Text"
|
|
35
|
+
};
|
|
30
36
|
var symbolElements = [{
|
|
31
|
-
label: "
|
|
37
|
+
label: "sys.printDesigner.basic",
|
|
32
38
|
children: [
|
|
33
39
|
{
|
|
34
40
|
alias: "",
|
|
35
41
|
iconName: "juxing",
|
|
36
|
-
displayName: "
|
|
42
|
+
displayName: "sys.printDesigner.rect",
|
|
37
43
|
type: PRINT_ELE_TYPE.RECTANGLE,
|
|
38
44
|
width: 100,
|
|
39
45
|
height: 50,
|
|
@@ -51,7 +57,7 @@ var symbolElements = [{
|
|
|
51
57
|
{
|
|
52
58
|
alias: "",
|
|
53
59
|
iconName: "hengxian",
|
|
54
|
-
displayName: "
|
|
60
|
+
displayName: "sys.printDesigner.horizontalLine",
|
|
55
61
|
type: PRINT_ELE_TYPE.HORIZONTAL_LINE,
|
|
56
62
|
width: 200,
|
|
57
63
|
height: 24,
|
|
@@ -66,7 +72,7 @@ var symbolElements = [{
|
|
|
66
72
|
{
|
|
67
73
|
alias: "",
|
|
68
74
|
iconName: "shuxian",
|
|
69
|
-
displayName: "
|
|
75
|
+
displayName: "sys.printDesigner.verticalLine",
|
|
70
76
|
type: PRINT_ELE_TYPE.VERTICAL_LINE,
|
|
71
77
|
width: 24,
|
|
72
78
|
height: 200,
|
|
@@ -82,13 +88,13 @@ var symbolElements = [{
|
|
|
82
88
|
{
|
|
83
89
|
alias: "",
|
|
84
90
|
iconName: "wenben1",
|
|
85
|
-
displayName: "
|
|
91
|
+
displayName: "sys.text",
|
|
86
92
|
type: PRINT_ELE_TYPE.TEXT,
|
|
87
93
|
width: 100,
|
|
88
94
|
height: 40,
|
|
89
95
|
isEdit: false,
|
|
90
96
|
attrs: { text: {
|
|
91
|
-
label: "
|
|
97
|
+
label: "sys.text",
|
|
92
98
|
value: "",
|
|
93
99
|
type: DATA_TYPE.FIXED
|
|
94
100
|
} },
|
|
@@ -97,7 +103,9 @@ var symbolElements = [{
|
|
|
97
103
|
"vertical-align": "top",
|
|
98
104
|
color: "#000",
|
|
99
105
|
"font-size": 18,
|
|
100
|
-
"font-family": "微软雅黑"
|
|
106
|
+
"font-family": "微软雅黑",
|
|
107
|
+
"space-type": "LINE",
|
|
108
|
+
space: 1.5
|
|
101
109
|
},
|
|
102
110
|
classes: {},
|
|
103
111
|
rotate: 0,
|
|
@@ -109,7 +117,7 @@ var symbolElements = [{
|
|
|
109
117
|
{
|
|
110
118
|
alias: "",
|
|
111
119
|
iconName: "tupian_wudaima",
|
|
112
|
-
displayName: "
|
|
120
|
+
displayName: "sys.image",
|
|
113
121
|
type: PRINT_ELE_TYPE.IMAGE,
|
|
114
122
|
width: 80,
|
|
115
123
|
height: 80,
|
|
@@ -124,12 +132,12 @@ var symbolElements = [{
|
|
|
124
132
|
}
|
|
125
133
|
]
|
|
126
134
|
}, {
|
|
127
|
-
label: "
|
|
135
|
+
label: "sys.printDesigner.advanced",
|
|
128
136
|
children: [
|
|
129
137
|
{
|
|
130
138
|
alias: "",
|
|
131
139
|
iconName: "tiaoma",
|
|
132
|
-
displayName: "
|
|
140
|
+
displayName: "sys.printDesigner.barcode.index",
|
|
133
141
|
type: PRINT_ELE_TYPE.BAR_CODE,
|
|
134
142
|
width: 167,
|
|
135
143
|
height: 40,
|
|
@@ -155,7 +163,7 @@ var symbolElements = [{
|
|
|
155
163
|
{
|
|
156
164
|
alias: "",
|
|
157
165
|
iconName: "erweima2",
|
|
158
|
-
displayName: "
|
|
166
|
+
displayName: "sys.printDesigner.qrCode.index",
|
|
159
167
|
type: PRINT_ELE_TYPE.QR_CODE,
|
|
160
168
|
width: 102,
|
|
161
169
|
height: 102,
|
|
@@ -166,17 +174,25 @@ var symbolElements = [{
|
|
|
166
174
|
type: DATA_TYPE.FIXED
|
|
167
175
|
},
|
|
168
176
|
type: { value: "QR_CODE" },
|
|
169
|
-
magnification: { value: 4 }
|
|
177
|
+
magnification: { value: 4 },
|
|
178
|
+
rowHeight: { value: 3 },
|
|
179
|
+
rows: { value: null },
|
|
180
|
+
columns: { value: null }
|
|
170
181
|
},
|
|
171
182
|
styles: {},
|
|
172
183
|
classes: {},
|
|
173
184
|
rotate: 0,
|
|
174
|
-
hasPos: true
|
|
185
|
+
hasPos: true,
|
|
186
|
+
hasRotate: false,
|
|
187
|
+
rotateWidth: 0,
|
|
188
|
+
rotateHeight: 0,
|
|
189
|
+
hasError: false,
|
|
190
|
+
errMsg: ""
|
|
175
191
|
},
|
|
176
192
|
{
|
|
177
193
|
alias: "",
|
|
178
194
|
iconName: "tubiao",
|
|
179
|
-
displayName: "
|
|
195
|
+
displayName: "sys.appDesigner.icon",
|
|
180
196
|
type: PRINT_ELE_TYPE.ICON,
|
|
181
197
|
width: 72,
|
|
182
198
|
height: 72,
|
|
@@ -196,4 +212,4 @@ var symbolElements = [{
|
|
|
196
212
|
]
|
|
197
213
|
}];
|
|
198
214
|
//#endregion
|
|
199
|
-
export { CONTENT_TYPE, DATA_TYPE, PRINT_ELE_TYPE, QR_CODE_TYPE, symbolElements as default };
|
|
215
|
+
export { CONTENT_TYPE, DATA_TYPE, PRINT_ELE_TYPE, QR_CODE_TEXT, QR_CODE_TYPE, symbolElements as default };
|
|
@@ -12,9 +12,11 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
12
12
|
}> & Readonly<{
|
|
13
13
|
onMovingItem?: ((...args: any[]) => any) | undefined;
|
|
14
14
|
onUpdatePBarcodeWidth?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
onUpdatePQrCodeWidthAndHeight?: ((...args: any[]) => any) | undefined;
|
|
15
16
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
17
|
movingItem: (...args: any[]) => void;
|
|
17
18
|
updatePBarcodeWidth: (...args: any[]) => void;
|
|
19
|
+
updatePQrCodeWidthAndHeight: (...args: any[]) => void;
|
|
18
20
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
19
21
|
mrContainerRef: ({
|
|
20
22
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -199,6 +201,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
199
201
|
}> & Readonly<{
|
|
200
202
|
onMovingItem?: ((...args: any[]) => any) | undefined;
|
|
201
203
|
onUpdatePBarcodeWidth?: ((...args: any[]) => any) | undefined;
|
|
204
|
+
onUpdatePQrCodeWidthAndHeight?: ((...args: any[]) => any) | undefined;
|
|
202
205
|
}>, {}, {}, {}, {}, {}> | null;
|
|
203
206
|
}, HTMLDivElement>;
|
|
204
207
|
export default _default;
|
|
@@ -23,6 +23,7 @@ export declare function useDesigner(): {
|
|
|
23
23
|
snapTracking: import('vue').Ref<boolean, boolean>;
|
|
24
24
|
registerElement: (payload: IObject) => void;
|
|
25
25
|
resizeBarcodeWidth: (payload: IObject) => void;
|
|
26
|
+
resizeQrCodeWidthAndHeight: (payload: IObject) => void;
|
|
26
27
|
hoveredElements: import('vue').Ref<IObject[], IObject[]>;
|
|
27
28
|
isModal: import('vue').Ref<boolean, boolean>;
|
|
28
29
|
};
|
|
@@ -60,7 +60,7 @@ function useDesigner() {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
function removeElement(payload) {
|
|
63
|
-
if (selectedElements.value[0]
|
|
63
|
+
if (selectedElements.value[0] && selectedElements.value[0].isEdit) return;
|
|
64
64
|
clearSelectedElements();
|
|
65
65
|
const parent = selectedPage.value;
|
|
66
66
|
const eggIndex = parent.findIndex((egg) => egg.id === payload.elId);
|
|
@@ -98,6 +98,9 @@ function useDesigner() {
|
|
|
98
98
|
if (payload.classes) payload.egglement.classes = payload.classes;
|
|
99
99
|
if (payload.styles) payload.egglement.styles = payload.styles;
|
|
100
100
|
if (payload.attrs) payload.egglement.attrs = payload.attrs;
|
|
101
|
+
if (typeof payload.hasError !== "undefined" && payload.hasError !== null) payload.egglement.hasError = payload.hasError;
|
|
102
|
+
if (typeof payload.errMsg !== "undefined" && payload.errMsg !== null) payload.egglement.errMsg = payload.errMsg;
|
|
103
|
+
if (typeof payload.hasRotate !== "undefined" && payload.hasRotate !== null) payload.egglement.hasRotate = payload.hasRotate;
|
|
101
104
|
}
|
|
102
105
|
function deleteEgglement(payload) {
|
|
103
106
|
payload.parent.splice(payload.eggIndex, 1);
|
|
@@ -132,6 +135,20 @@ function useDesigner() {
|
|
|
132
135
|
width: payload.width
|
|
133
136
|
});
|
|
134
137
|
}
|
|
138
|
+
function resizeQrCodeWidthAndHeight(payload) {
|
|
139
|
+
const egglement = selectedPage.value?.find((d) => d.id === payload.elId) || {};
|
|
140
|
+
if (!egglement) return;
|
|
141
|
+
if (egglement.rotate === 90 || egglement.rotate === 270) updateEgglement({
|
|
142
|
+
egglement,
|
|
143
|
+
width: payload.height,
|
|
144
|
+
height: payload.width
|
|
145
|
+
});
|
|
146
|
+
else updateEgglement({
|
|
147
|
+
egglement,
|
|
148
|
+
width: payload.width,
|
|
149
|
+
height: payload.height
|
|
150
|
+
});
|
|
151
|
+
}
|
|
135
152
|
function togglePanel(value) {
|
|
136
153
|
if (currentPanel.value === value) return;
|
|
137
154
|
currentPanel.value = value;
|
|
@@ -155,6 +172,7 @@ function useDesigner() {
|
|
|
155
172
|
snapTracking,
|
|
156
173
|
registerElement,
|
|
157
174
|
resizeBarcodeWidth,
|
|
175
|
+
resizeQrCodeWidthAndHeight,
|
|
158
176
|
hoveredElements,
|
|
159
177
|
isModal
|
|
160
178
|
};
|