sun-card-design 1.1.37 → 1.1.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/package.json +1 -1
- package/dist/mobile/sun-card-design-mobile.es61.js +0 -98
- package/dist/mobile/sun-card-design-mobile.es62.js +0 -98
- package/dist/public/sun-card-designer.css +0 -1
- package/dist/sun-card-designer.es.js +0 -25
- package/dist/sun-card-designer.es10.js +0 -167
- package/dist/sun-card-designer.es11.js +0 -197
- package/dist/sun-card-designer.es12.js +0 -203
- package/dist/sun-card-designer.es13.js +0 -130
- package/dist/sun-card-designer.es14.js +0 -120
- package/dist/sun-card-designer.es151.js +0 -4
- package/dist/sun-card-designer.es152.js +0 -4
- package/dist/sun-card-designer.es153.js +0 -4
- package/dist/sun-card-designer.es154.js +0 -4
- package/dist/sun-card-designer.es155.js +0 -82
- package/dist/sun-card-designer.es156.js +0 -91
- package/dist/sun-card-designer.es157.js +0 -92
- package/dist/sun-card-designer.es158.js +0 -191
- package/dist/sun-card-designer.es159.js +0 -86
- package/dist/sun-card-designer.es16.js +0 -10
- package/dist/sun-card-designer.es160.js +0 -238
- package/dist/sun-card-designer.es161.js +0 -113
- package/dist/sun-card-designer.es162.js +0 -49
- package/dist/sun-card-designer.es163.js +0 -43
- package/dist/sun-card-designer.es164.js +0 -39
- package/dist/sun-card-designer.es165.js +0 -46
- package/dist/sun-card-designer.es166.js +0 -58
- package/dist/sun-card-designer.es167.js +0 -56
- package/dist/sun-card-designer.es168.js +0 -58
- package/dist/sun-card-designer.es169.js +0 -73
- package/dist/sun-card-designer.es17.js +0 -333
- package/dist/sun-card-designer.es170.js +0 -59
- package/dist/sun-card-designer.es171.js +0 -69
- package/dist/sun-card-designer.es172.js +0 -182
- package/dist/sun-card-designer.es173.js +0 -176
- package/dist/sun-card-designer.es174.js +0 -184
- package/dist/sun-card-designer.es175.js +0 -409
- package/dist/sun-card-designer.es176.js +0 -365
- package/dist/sun-card-designer.es177.js +0 -70
- package/dist/sun-card-designer.es178.js +0 -68
- package/dist/sun-card-designer.es179.js +0 -184
- package/dist/sun-card-designer.es18.js +0 -68
- package/dist/sun-card-designer.es180.js +0 -193
- package/dist/sun-card-designer.es181.js +0 -193
- package/dist/sun-card-designer.es182.js +0 -193
- package/dist/sun-card-designer.es184.js +0 -228
- package/dist/sun-card-designer.es185.js +0 -71
- package/dist/sun-card-designer.es19.js +0 -611
- package/dist/sun-card-designer.es196.js +0 -4
- package/dist/sun-card-designer.es20.js +0 -225
- package/dist/sun-card-designer.es201.js +0 -125
- package/dist/sun-card-designer.es21.js +0 -69
- package/dist/sun-card-designer.es22.js +0 -719
- package/dist/sun-card-designer.es220.js +0 -63
- package/dist/sun-card-designer.es221.js +0 -80
- package/dist/sun-card-designer.es222.js +0 -82
- package/dist/sun-card-designer.es223.js +0 -94
- package/dist/sun-card-designer.es224.js +0 -87
- package/dist/sun-card-designer.es225.js +0 -226
- package/dist/sun-card-designer.es226.js +0 -105
- package/dist/sun-card-designer.es227.js +0 -45
- package/dist/sun-card-designer.es228.js +0 -31
- package/dist/sun-card-designer.es229.js +0 -29
- package/dist/sun-card-designer.es23.js +0 -211
- package/dist/sun-card-designer.es230.js +0 -32
- package/dist/sun-card-designer.es231.js +0 -46
- package/dist/sun-card-designer.es232.js +0 -42
- package/dist/sun-card-designer.es233.js +0 -44
- package/dist/sun-card-designer.es234.js +0 -61
- package/dist/sun-card-designer.es235.js +0 -46
- package/dist/sun-card-designer.es236.js +0 -54
- package/dist/sun-card-designer.es237.js +0 -130
- package/dist/sun-card-designer.es238.js +0 -127
- package/dist/sun-card-designer.es239.js +0 -132
- package/dist/sun-card-designer.es24.js +0 -265
- package/dist/sun-card-designer.es240.js +0 -375
- package/dist/sun-card-designer.es241.js +0 -348
- package/dist/sun-card-designer.es242.js +0 -69
- package/dist/sun-card-designer.es243.js +0 -65
- package/dist/sun-card-designer.es244.js +0 -87
- package/dist/sun-card-designer.es245.js +0 -98
- package/dist/sun-card-designer.es246.js +0 -98
- package/dist/sun-card-designer.es247.js +0 -98
- package/dist/sun-card-designer.es25.js +0 -857
- package/dist/sun-card-designer.es26.js +0 -768
- package/dist/sun-card-designer.es260.js +0 -125
- package/dist/sun-card-designer.es27.js +0 -264
- package/dist/sun-card-designer.es273.js +0 -192
- package/dist/sun-card-designer.es28.js +0 -809
- package/dist/sun-card-designer.es29.js +0 -220
- package/dist/sun-card-designer.es3.js +0 -506
- package/dist/sun-card-designer.es30.js +0 -809
- package/dist/sun-card-designer.es31.js +0 -220
- package/dist/sun-card-designer.es32.js +0 -820
- package/dist/sun-card-designer.es33.js +0 -225
- package/dist/sun-card-designer.es34.js +0 -69
- package/dist/sun-card-designer.es35.js +0 -375
- package/dist/sun-card-designer.es36.js +0 -186
- package/dist/sun-card-designer.es37.js +0 -119
- package/dist/sun-card-designer.es38.js +0 -354
- package/dist/sun-card-designer.es39.js +0 -127
- package/dist/sun-card-designer.es4.js +0 -365
- package/dist/sun-card-designer.es40.js +0 -100
- package/dist/sun-card-designer.es41.js +0 -214
- package/dist/sun-card-designer.es42.js +0 -119
- package/dist/sun-card-designer.es43.js +0 -250
- package/dist/sun-card-designer.es44.js +0 -118
- package/dist/sun-card-designer.es45.js +0 -64
- package/dist/sun-card-designer.es46.js +0 -223
- package/dist/sun-card-designer.es47.js +0 -196
- package/dist/sun-card-designer.es48.js +0 -77
- package/dist/sun-card-designer.es49.js +0 -85
- package/dist/sun-card-designer.es5.js +0 -317
- package/dist/sun-card-designer.es50.js +0 -85
- package/dist/sun-card-designer.es51.js +0 -64
- package/dist/sun-card-designer.es52.js +0 -283
- package/dist/sun-card-designer.es53.js +0 -64
- package/dist/sun-card-designer.es54.js +0 -142
- package/dist/sun-card-designer.es55.js +0 -52
- package/dist/sun-card-designer.es56.js +0 -85
- package/dist/sun-card-designer.es57.js +0 -258
- package/dist/sun-card-designer.es58.js +0 -226
- package/dist/sun-card-designer.es59.js +0 -169
- package/dist/sun-card-designer.es6.js +0 -190
- package/dist/sun-card-designer.es60.js +0 -280
- package/dist/sun-card-designer.es61.js +0 -168
- package/dist/sun-card-designer.es62.js +0 -219
- package/dist/sun-card-designer.es63.js +0 -168
- package/dist/sun-card-designer.es64.js +0 -275
- package/dist/sun-card-designer.es65.js +0 -760
- package/dist/sun-card-designer.es66.js +0 -272
- package/dist/sun-card-designer.es67.js +0 -559
- package/dist/sun-card-designer.es68.js +0 -124
- package/dist/sun-card-designer.es69.js +0 -528
- package/dist/sun-card-designer.es7.js +0 -65
- package/dist/sun-card-designer.es70.js +0 -185
- package/dist/sun-card-designer.es71.js +0 -107
- package/dist/sun-card-designer.es72.js +0 -153
- package/dist/sun-card-designer.es73.js +0 -315
- package/dist/sun-card-designer.es74.js +0 -114
- package/dist/sun-card-designer.es76.js +0 -4211
- package/dist/sun-card-designer.es79.js +0 -4
- package/dist/sun-card-designer.es8.js +0 -171
- package/dist/sun-card-designer.es80.js +0 -4
- package/dist/sun-card-designer.es81.js +0 -4
- package/dist/sun-card-designer.es84.js +0 -228
- package/dist/sun-card-designer.es87.js +0 -52
- package/dist/sun-card-designer.es88.js +0 -52
- package/dist/sun-card-designer.es9.js +0 -207
- package/dist/sun-card-designer.es91.js +0 -344
- package/dist/sun-card-designer.es92.js +0 -199
- package/dist/sun-card-designer.es95.js +0 -180
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { ref, watch, createElementBlock, openBlock, normalizeStyle, createElementVNode } from "vue";
|
|
2
|
-
import { renderTextByVariables } from "./sun-card-designer.es185.js";
|
|
3
|
-
import IMG from "./sun-card-designer.es196.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
6
|
-
const _sfc_main = {
|
|
7
|
-
__name: "pictureComp",
|
|
8
|
-
props: ["record", "columnsIndex"],
|
|
9
|
-
emits: ["clickEvent"],
|
|
10
|
-
setup(__props, { emit: __emit }) {
|
|
11
|
-
const props = __props;
|
|
12
|
-
const emit = __emit;
|
|
13
|
-
const currentImageUrl = ref(IMG);
|
|
14
|
-
watch(
|
|
15
|
-
() => props.record.options.defaultValue,
|
|
16
|
-
(newUrl) => {
|
|
17
|
-
if (newUrl) {
|
|
18
|
-
checkImageUrl(renderTextByVariables(newUrl, props.columnsIndex));
|
|
19
|
-
} else {
|
|
20
|
-
currentImageUrl.value = IMG;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{ immediate: true }
|
|
24
|
-
);
|
|
25
|
-
const onClick = () => {
|
|
26
|
-
if (props.record.options.clickEvent) {
|
|
27
|
-
emit("clickEvent", props.record);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const getAlign = () => {
|
|
31
|
-
const obj = {
|
|
32
|
-
"left": "flex-start",
|
|
33
|
-
"center": "center",
|
|
34
|
-
"right": "flex-end"
|
|
35
|
-
};
|
|
36
|
-
return obj[props.record.options.style.align];
|
|
37
|
-
};
|
|
38
|
-
const getHeight = () => {
|
|
39
|
-
const mode = props.record.options.style.mode;
|
|
40
|
-
const width = props.record.options.style.width;
|
|
41
|
-
const height = props.record.options.style.height;
|
|
42
|
-
if (mode === "fixed") {
|
|
43
|
-
if (props.record.options.style.cuttingRatio === "1") {
|
|
44
|
-
return width + "px";
|
|
45
|
-
} else if (props.record.options.style.cuttingRatio === "2") {
|
|
46
|
-
return width * 9 / 16 + "px";
|
|
47
|
-
} else if (props.record.options.style.cuttingRatio === "3") {
|
|
48
|
-
return width * 2 / 3 + "px";
|
|
49
|
-
} else if (props.record.options.style.cuttingRatio === "4") {
|
|
50
|
-
return width * 3 / 4 + "px";
|
|
51
|
-
}
|
|
52
|
-
return height + "px";
|
|
53
|
-
} else {
|
|
54
|
-
return "auto";
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const getAspectRatio = () => {
|
|
58
|
-
if (props.record.options.style.cuttingRatio === "1") {
|
|
59
|
-
return "1 / 1";
|
|
60
|
-
} else if (props.record.options.style.cuttingRatio === "2") {
|
|
61
|
-
return "16 / 9";
|
|
62
|
-
} else if (props.record.options.style.cuttingRatio === "3") {
|
|
63
|
-
return "3 / 2";
|
|
64
|
-
} else if (props.record.options.style.cuttingRatio === "4") {
|
|
65
|
-
return "4 / 3";
|
|
66
|
-
}
|
|
67
|
-
return "auto";
|
|
68
|
-
};
|
|
69
|
-
function checkImageUrl(url) {
|
|
70
|
-
const img = new Image();
|
|
71
|
-
img.onload = () => {
|
|
72
|
-
currentImageUrl.value = url;
|
|
73
|
-
};
|
|
74
|
-
img.onerror = () => {
|
|
75
|
-
currentImageUrl.value = IMG;
|
|
76
|
-
};
|
|
77
|
-
img.src = url;
|
|
78
|
-
}
|
|
79
|
-
return (_ctx, _cache) => {
|
|
80
|
-
return openBlock(), createElementBlock("div", {
|
|
81
|
-
class: "main-picture",
|
|
82
|
-
style: normalizeStyle({ "justify-content": getAlign(), padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
83
|
-
}, [
|
|
84
|
-
createElementVNode("div", {
|
|
85
|
-
class: "picture-container",
|
|
86
|
-
style: normalizeStyle({
|
|
87
|
-
width: props.record.options.style.mode === "fixed" ? props.record.options.style.width + "px" : "100%",
|
|
88
|
-
height: getHeight(),
|
|
89
|
-
backgroundImage: `url(${currentImageUrl.value})`,
|
|
90
|
-
backgroundSize: props.record.options.style.cuttingMode,
|
|
91
|
-
backgroundPosition: "center",
|
|
92
|
-
backgroundRepeat: "no-repeat",
|
|
93
|
-
aspectRatio: getAspectRatio(),
|
|
94
|
-
borderRadius: props.record.options.style.borderRadius + "px"
|
|
95
|
-
}),
|
|
96
|
-
onClick
|
|
97
|
-
}, null, 4)
|
|
98
|
-
], 4);
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
const Picture = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-75c3648d"]]);
|
|
103
|
-
export {
|
|
104
|
-
Picture as default
|
|
105
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { resolveComponent, createElementBlock, openBlock, createElementVNode, normalizeStyle, createVNode, withCtx, createTextVNode, toDisplayString, unref } from "vue";
|
|
2
|
-
import { renderTextByVariables } from "./sun-card-designer.es185.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
5
|
-
const _sfc_main = {
|
|
6
|
-
__name: "tagComp",
|
|
7
|
-
props: ["record"],
|
|
8
|
-
emits: ["clickEvent"],
|
|
9
|
-
setup(__props, { emit: __emit }) {
|
|
10
|
-
const props = __props;
|
|
11
|
-
const emit = __emit;
|
|
12
|
-
const onClick = () => {
|
|
13
|
-
if (props.record.options.clickEvent) {
|
|
14
|
-
emit("clickEvent", props.record);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return (_ctx, _cache) => {
|
|
18
|
-
const _component_a_tag = resolveComponent("a-tag");
|
|
19
|
-
return openBlock(), createElementBlock("div", null, [
|
|
20
|
-
createElementVNode("div", {
|
|
21
|
-
class: "main-tag",
|
|
22
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
23
|
-
}, [
|
|
24
|
-
createVNode(_component_a_tag, {
|
|
25
|
-
color: props.record.options.style.backgroundColor,
|
|
26
|
-
style: normalizeStyle({
|
|
27
|
-
color: props.record.options.style.color,
|
|
28
|
-
fontSize: props.record.options.style.size
|
|
29
|
-
}),
|
|
30
|
-
onClick
|
|
31
|
-
}, {
|
|
32
|
-
default: withCtx(() => [
|
|
33
|
-
createTextVNode(toDisplayString(unref(renderTextByVariables)(props.record.options.defaultValue)), 1)
|
|
34
|
-
]),
|
|
35
|
-
_: 1
|
|
36
|
-
}, 8, ["color", "style"])
|
|
37
|
-
], 4)
|
|
38
|
-
]);
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2bdaac5a"]]);
|
|
43
|
-
export {
|
|
44
|
-
Tag as default
|
|
45
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { resolveComponent, createElementBlock, openBlock, createElementVNode, normalizeStyle, createVNode, unref } from "vue";
|
|
2
|
-
import { renderTextByVariables } from "./sun-card-designer.es185.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
5
|
-
const _sfc_main = {
|
|
6
|
-
__name: "rateComp",
|
|
7
|
-
props: ["record"],
|
|
8
|
-
setup(__props) {
|
|
9
|
-
const props = __props;
|
|
10
|
-
return (_ctx, _cache) => {
|
|
11
|
-
const _component_a_rate = resolveComponent("a-rate");
|
|
12
|
-
return openBlock(), createElementBlock("div", null, [
|
|
13
|
-
createElementVNode("div", {
|
|
14
|
-
class: "main-rate",
|
|
15
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
16
|
-
}, [
|
|
17
|
-
createVNode(_component_a_rate, {
|
|
18
|
-
value: unref(renderTextByVariables)(props.record.options.defaultValue) * 1,
|
|
19
|
-
count: props.record.options.count,
|
|
20
|
-
"allow-half": "",
|
|
21
|
-
disabled: ""
|
|
22
|
-
}, null, 8, ["value", "count"])
|
|
23
|
-
], 4)
|
|
24
|
-
]);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const Rate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20282c61"]]);
|
|
29
|
-
export {
|
|
30
|
-
Rate as default
|
|
31
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, normalizeStyle } from "vue";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
4
|
-
const _hoisted_1 = { class: "main-divider" };
|
|
5
|
-
const _sfc_main = {
|
|
6
|
-
__name: "dividerComp",
|
|
7
|
-
props: ["record"],
|
|
8
|
-
setup(__props) {
|
|
9
|
-
const props = __props;
|
|
10
|
-
return (_ctx, _cache) => {
|
|
11
|
-
const _component_a_divider = resolveComponent("a-divider");
|
|
12
|
-
return openBlock(), createElementBlock("div", null, [
|
|
13
|
-
createElementVNode("div", _hoisted_1, [
|
|
14
|
-
createVNode(_component_a_divider, {
|
|
15
|
-
style: normalizeStyle({
|
|
16
|
-
"margin-top": props.record.options.style.marginTop + "px",
|
|
17
|
-
"margin-bottom": props.record.options.style.marginBottom + "px",
|
|
18
|
-
"background": "#ccc"
|
|
19
|
-
})
|
|
20
|
-
}, null, 8, ["style"])
|
|
21
|
-
])
|
|
22
|
-
]);
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
const Divider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-bd99764a"]]);
|
|
27
|
-
export {
|
|
28
|
-
Divider as default
|
|
29
|
-
};
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { ref, onMounted, watch, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, withCtx, createBlock, createCommentVNode, createTextVNode } from "vue";
|
|
2
|
-
import OpenVariable from "./sun-card-designer.es91.js";
|
|
3
|
-
import _sfc_main$1 from "./sun-card-designer.es95.js";
|
|
4
|
-
import EditInput from "./sun-card-designer.es92.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
7
|
-
const _hoisted_1 = { class: "title-action" };
|
|
8
|
-
const _hoisted_2 = { class: "click-action" };
|
|
9
|
-
const _sfc_main = {
|
|
10
|
-
__name: "textActionPes",
|
|
11
|
-
props: ["record"],
|
|
12
|
-
setup(__props) {
|
|
13
|
-
const props = __props;
|
|
14
|
-
const qflowRef = ref();
|
|
15
|
-
const modalBindOptions = ref([
|
|
16
|
-
{
|
|
17
|
-
label: "日期组件",
|
|
18
|
-
value: "dateComponent"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: "文本组件",
|
|
22
|
-
value: "textComponent"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: "图形组件",
|
|
26
|
-
value: "echartsComponent"
|
|
27
|
-
}
|
|
28
|
-
]);
|
|
29
|
-
const clickEventConfigOptions = ref([
|
|
30
|
-
{
|
|
31
|
-
label: "打开URL",
|
|
32
|
-
value: "url"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
label: "自定义事件",
|
|
36
|
-
value: "event"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: "给智能体发消息",
|
|
40
|
-
value: "agent"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: "调用 插件/工作流",
|
|
44
|
-
value: "tool"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: "关联弹窗",
|
|
48
|
-
value: "modal"
|
|
49
|
-
}
|
|
50
|
-
]);
|
|
51
|
-
const autoLabel = ref("URL");
|
|
52
|
-
const obj = {
|
|
53
|
-
url: "URL",
|
|
54
|
-
event: "事件",
|
|
55
|
-
agent: "消息",
|
|
56
|
-
tool: "调用 插件/工作流",
|
|
57
|
-
modal: "关联弹窗"
|
|
58
|
-
};
|
|
59
|
-
const switchChange = (val) => {
|
|
60
|
-
if (!val) {
|
|
61
|
-
props.record.options.clickEventConfig.type = "url";
|
|
62
|
-
props.record.options.clickEventConfig.value = "";
|
|
63
|
-
props.record.options.clickEventConfig.variableName = null;
|
|
64
|
-
props.record.options.clickEventConfig.toolItem = null;
|
|
65
|
-
props.record.options.clickEventConfig.modalComponent = null;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const onChange = () => {
|
|
69
|
-
props.record.options.clickEventConfig.value = "";
|
|
70
|
-
props.record.options.clickEventConfig.variableName = null;
|
|
71
|
-
props.record.options.clickEventConfig.toolItem = null;
|
|
72
|
-
props.record.options.clickEventConfig.modalComponent = null;
|
|
73
|
-
};
|
|
74
|
-
const onOpen = () => {
|
|
75
|
-
qflowRef.value.onOpen(props.record.options.clickEventConfig.toolItem);
|
|
76
|
-
};
|
|
77
|
-
const selectQFlow = (params) => {
|
|
78
|
-
props.record.options.clickEventConfig.toolItem = params;
|
|
79
|
-
};
|
|
80
|
-
onMounted(() => {
|
|
81
|
-
autoLabel.value = obj[props.record.options.clickEventConfig.type];
|
|
82
|
-
});
|
|
83
|
-
watch(
|
|
84
|
-
() => props.record.options.clickEventConfig.type,
|
|
85
|
-
(val) => {
|
|
86
|
-
autoLabel.value = obj[val];
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
const editInputRef = ref();
|
|
90
|
-
const selectTreeChange = (params) => {
|
|
91
|
-
const { item, node } = params;
|
|
92
|
-
editInputRef.value.insertToken(`{${item.name}#${node}}`);
|
|
93
|
-
};
|
|
94
|
-
const selectChange = (record) => {
|
|
95
|
-
editInputRef.value.insertToken(`{${record.name}}`);
|
|
96
|
-
};
|
|
97
|
-
return (_ctx, _cache) => {
|
|
98
|
-
const _component_a_switch = resolveComponent("a-switch");
|
|
99
|
-
const _component_a_select = resolveComponent("a-select");
|
|
100
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
101
|
-
const _component_a_button = resolveComponent("a-button");
|
|
102
|
-
const _component_a_textarea = resolveComponent("a-textarea");
|
|
103
|
-
const _component_a_col = resolveComponent("a-col");
|
|
104
|
-
const _component_a_row = resolveComponent("a-row");
|
|
105
|
-
const _component_a_form = resolveComponent("a-form");
|
|
106
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
107
|
-
_cache[5] || (_cache[5] = createElementVNode("div", { class: "title" }, "操作", -1)),
|
|
108
|
-
createVNode(_component_a_form, { layout: "vertical" }, {
|
|
109
|
-
default: withCtx(() => [
|
|
110
|
-
createVNode(_component_a_row, { gutter: [16, 16] }, {
|
|
111
|
-
default: withCtx(() => [
|
|
112
|
-
createVNode(_component_a_col, { span: 24 }, {
|
|
113
|
-
default: withCtx(() => [
|
|
114
|
-
createElementVNode("div", _hoisted_2, [
|
|
115
|
-
_cache[3] || (_cache[3] = createElementVNode("span", null, "点击事件", -1)),
|
|
116
|
-
createVNode(_component_a_switch, {
|
|
117
|
-
checked: props.record.options.clickEvent,
|
|
118
|
-
"onUpdate:checked": _cache[0] || (_cache[0] = ($event) => props.record.options.clickEvent = $event),
|
|
119
|
-
onChange: switchChange
|
|
120
|
-
}, null, 8, ["checked"])
|
|
121
|
-
]),
|
|
122
|
-
props.record.options.clickEvent ? (openBlock(), createBlock(_component_a_form_item, {
|
|
123
|
-
key: 0,
|
|
124
|
-
label: ""
|
|
125
|
-
}, {
|
|
126
|
-
default: withCtx(() => [
|
|
127
|
-
createVNode(_component_a_select, {
|
|
128
|
-
value: props.record.options.clickEventConfig.type,
|
|
129
|
-
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => props.record.options.clickEventConfig.type = $event),
|
|
130
|
-
options: clickEventConfigOptions.value,
|
|
131
|
-
style: { "width": "100%" },
|
|
132
|
-
onChange
|
|
133
|
-
}, null, 8, ["value", "options"])
|
|
134
|
-
]),
|
|
135
|
-
_: 1
|
|
136
|
-
})) : createCommentVNode("", true),
|
|
137
|
-
props.record.options.clickEvent && props.record.options.clickEventConfig.type === "modal" ? (openBlock(), createBlock(_component_a_form_item, {
|
|
138
|
-
key: 1,
|
|
139
|
-
label: "关联组件"
|
|
140
|
-
}, {
|
|
141
|
-
default: withCtx(() => [
|
|
142
|
-
createVNode(_component_a_select, {
|
|
143
|
-
value: props.record.options.clickEventConfig.modalComponent,
|
|
144
|
-
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => props.record.options.clickEventConfig.modalComponent = $event),
|
|
145
|
-
options: modalBindOptions.value,
|
|
146
|
-
placeholder: "请选择关联组件",
|
|
147
|
-
style: { "width": "100%" }
|
|
148
|
-
}, null, 8, ["value", "options"])
|
|
149
|
-
]),
|
|
150
|
-
_: 1
|
|
151
|
-
})) : createCommentVNode("", true),
|
|
152
|
-
props.record.options.clickEvent ? (openBlock(), createBlock(_component_a_form_item, {
|
|
153
|
-
key: 2,
|
|
154
|
-
label: autoLabel.value
|
|
155
|
-
}, {
|
|
156
|
-
default: withCtx(() => [
|
|
157
|
-
props.record.options.clickEventConfig.type != "tool" ? (openBlock(), createBlock(OpenVariable, {
|
|
158
|
-
key: 0,
|
|
159
|
-
showCom: true,
|
|
160
|
-
onOnSelect: selectChange,
|
|
161
|
-
onOnSelectTree: selectTreeChange
|
|
162
|
-
})) : createCommentVNode("", true),
|
|
163
|
-
props.record.options.clickEventConfig.type != "tool" ? (openBlock(), createBlock(EditInput, {
|
|
164
|
-
key: 1,
|
|
165
|
-
ref_key: "editInputRef",
|
|
166
|
-
ref: editInputRef,
|
|
167
|
-
record: props.record.options.clickEventConfig,
|
|
168
|
-
filed: "value",
|
|
169
|
-
minRows: 2
|
|
170
|
-
}, null, 8, ["record"])) : (openBlock(), createBlock(_component_a_button, {
|
|
171
|
-
key: 2,
|
|
172
|
-
style: { "width": "100%", "background": "#f0f0f0" },
|
|
173
|
-
onClick: onOpen
|
|
174
|
-
}, {
|
|
175
|
-
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
176
|
-
createTextVNode(" + 选择 ", -1)
|
|
177
|
-
])]),
|
|
178
|
-
_: 1
|
|
179
|
-
})),
|
|
180
|
-
!!props.record.options.clickEventConfig.toolItem ? (openBlock(), createBlock(_component_a_textarea, {
|
|
181
|
-
key: 3,
|
|
182
|
-
autoSize: { minRows: 1, maxRows: 2 },
|
|
183
|
-
disabled: true,
|
|
184
|
-
value: props.record.options.clickEventConfig.toolItem.label,
|
|
185
|
-
style: { "width": "100%", "margin-top": "10px", "border": "none" }
|
|
186
|
-
}, null, 8, ["value"])) : createCommentVNode("", true)
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
}, 8, ["label"])) : createCommentVNode("", true)
|
|
190
|
-
]),
|
|
191
|
-
_: 1
|
|
192
|
-
})
|
|
193
|
-
]),
|
|
194
|
-
_: 1
|
|
195
|
-
})
|
|
196
|
-
]),
|
|
197
|
-
_: 1
|
|
198
|
-
}),
|
|
199
|
-
createVNode(_sfc_main$1, {
|
|
200
|
-
ref_key: "qflowRef",
|
|
201
|
-
ref: qflowRef,
|
|
202
|
-
onConfirm: selectQFlow
|
|
203
|
-
}, null, 512)
|
|
204
|
-
]);
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
const TextActionPes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-19e121e5"]]);
|
|
209
|
-
export {
|
|
210
|
-
TextActionPes as default
|
|
211
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { computed, createElementBlock, openBlock, normalizeStyle, createVNode } from "vue";
|
|
2
|
-
import Audio$1 from "./sun-card-designer.es260.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
5
|
-
const _sfc_main = {
|
|
6
|
-
__name: "audioComp",
|
|
7
|
-
props: ["record"],
|
|
8
|
-
setup(__props) {
|
|
9
|
-
const props = __props;
|
|
10
|
-
const wrapperStyle = computed(() => ({
|
|
11
|
-
"--play-btn-color": props.record?.options?.style?.playBtnColor || "#4a6bff",
|
|
12
|
-
"--progress-color": props.record?.options?.style?.progressColor || "#409eff",
|
|
13
|
-
padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
|
|
14
|
-
}));
|
|
15
|
-
return (_ctx, _cache) => {
|
|
16
|
-
return openBlock(), createElementBlock("div", {
|
|
17
|
-
class: "main-audio",
|
|
18
|
-
style: normalizeStyle(wrapperStyle.value)
|
|
19
|
-
}, [
|
|
20
|
-
createVNode(Audio$1, {
|
|
21
|
-
src: props.record.options.src,
|
|
22
|
-
playBtnColor: props.record?.options?.style?.playBtnColor,
|
|
23
|
-
progressColor: props.record?.options?.style?.progressColor
|
|
24
|
-
}, null, 8, ["src", "playBtnColor", "progressColor"])
|
|
25
|
-
], 4);
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const Audio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3a42929f"]]);
|
|
30
|
-
export {
|
|
31
|
-
Audio as default
|
|
32
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, unref } from "vue";
|
|
2
|
-
import { renderTextByVariables } from "./sun-card-designer.es185.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
5
|
-
const _sfc_main = {
|
|
6
|
-
__name: "selectComp",
|
|
7
|
-
props: ["record"],
|
|
8
|
-
setup(__props) {
|
|
9
|
-
const props = __props;
|
|
10
|
-
return (_ctx, _cache) => {
|
|
11
|
-
const _component_a_select = resolveComponent("a-select");
|
|
12
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
13
|
-
const _component_a_form = resolveComponent("a-form");
|
|
14
|
-
return openBlock(), createElementBlock("div", {
|
|
15
|
-
class: "main-select",
|
|
16
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
17
|
-
}, [
|
|
18
|
-
createVNode(_component_a_form, {
|
|
19
|
-
layout: props.record.options.flex
|
|
20
|
-
}, {
|
|
21
|
-
default: withCtx(() => [
|
|
22
|
-
createVNode(_component_a_form_item, {
|
|
23
|
-
label: unref(renderTextByVariables)(props.record.options.label)
|
|
24
|
-
}, {
|
|
25
|
-
default: withCtx(() => [
|
|
26
|
-
createVNode(_component_a_select, {
|
|
27
|
-
value: props.record.options.defaultValue,
|
|
28
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.defaultValue = $event),
|
|
29
|
-
placeholder: props.record.options.placeholder,
|
|
30
|
-
style: { "width": "100%" },
|
|
31
|
-
options: props.record.options.optionsMode === "fixed" ? props.record.options.optionsFixed : props.record.options.optionsAuto
|
|
32
|
-
}, null, 8, ["value", "placeholder", "options"])
|
|
33
|
-
]),
|
|
34
|
-
_: 1
|
|
35
|
-
}, 8, ["label"])
|
|
36
|
-
]),
|
|
37
|
-
_: 1
|
|
38
|
-
}, 8, ["layout"])
|
|
39
|
-
], 4);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5707ab7d"]]);
|
|
44
|
-
export {
|
|
45
|
-
Select as default
|
|
46
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { computed, createElementBlock, openBlock, normalizeStyle, createElementVNode } from "vue";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
4
|
-
const _hoisted_1 = ["src"];
|
|
5
|
-
const _sfc_main = {
|
|
6
|
-
__name: "videoComp",
|
|
7
|
-
props: ["record"],
|
|
8
|
-
setup(__props) {
|
|
9
|
-
const props = __props;
|
|
10
|
-
const wrapperStyle = computed(() => ({
|
|
11
|
-
width: "100%",
|
|
12
|
-
padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
|
|
13
|
-
}));
|
|
14
|
-
const videoStyle = computed(() => {
|
|
15
|
-
const style = props.record?.options?.style || {};
|
|
16
|
-
if (style.mode === "fixed") {
|
|
17
|
-
const width = style.width ? `${style.width}px` : "360px";
|
|
18
|
-
const height = style.height;
|
|
19
|
-
return { width, height };
|
|
20
|
-
}
|
|
21
|
-
return { width: "100%" };
|
|
22
|
-
});
|
|
23
|
-
return (_ctx, _cache) => {
|
|
24
|
-
return openBlock(), createElementBlock("div", {
|
|
25
|
-
class: "main-video",
|
|
26
|
-
style: normalizeStyle(wrapperStyle.value)
|
|
27
|
-
}, [
|
|
28
|
-
createElementVNode("video", {
|
|
29
|
-
class: "custom-video",
|
|
30
|
-
src: props.record.options.src,
|
|
31
|
-
style: normalizeStyle(videoStyle.value),
|
|
32
|
-
controls: "",
|
|
33
|
-
preload: "metadata"
|
|
34
|
-
}, null, 12, _hoisted_1)
|
|
35
|
-
], 4);
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const Video = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ba6459c2"]]);
|
|
40
|
-
export {
|
|
41
|
-
Video as default
|
|
42
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, unref } from "vue";
|
|
2
|
-
import { renderTextByVariables } from "./sun-card-designer.es185.js";
|
|
3
|
-
/* empty css */
|
|
4
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
5
|
-
const _sfc_main = {
|
|
6
|
-
__name: "inputComp",
|
|
7
|
-
props: ["record"],
|
|
8
|
-
setup(__props) {
|
|
9
|
-
const props = __props;
|
|
10
|
-
return (_ctx, _cache) => {
|
|
11
|
-
const _component_a_input = resolveComponent("a-input");
|
|
12
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
13
|
-
const _component_a_form = resolveComponent("a-form");
|
|
14
|
-
return openBlock(), createElementBlock("div", {
|
|
15
|
-
class: "main-input",
|
|
16
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
17
|
-
}, [
|
|
18
|
-
createVNode(_component_a_form, {
|
|
19
|
-
layout: props.record.options.flex
|
|
20
|
-
}, {
|
|
21
|
-
default: withCtx(() => [
|
|
22
|
-
createVNode(_component_a_form_item, {
|
|
23
|
-
label: unref(renderTextByVariables)(props.record.options.label)
|
|
24
|
-
}, {
|
|
25
|
-
default: withCtx(() => [
|
|
26
|
-
createVNode(_component_a_input, {
|
|
27
|
-
value: props.record.options.defaultValue,
|
|
28
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.defaultValue = $event),
|
|
29
|
-
placeholder: props.record.options.placeholder
|
|
30
|
-
}, null, 8, ["value", "placeholder"])
|
|
31
|
-
]),
|
|
32
|
-
_: 1
|
|
33
|
-
}, 8, ["label"])
|
|
34
|
-
]),
|
|
35
|
-
_: 1
|
|
36
|
-
}, 8, ["layout"])
|
|
37
|
-
], 4);
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
const Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f4e2b8e3"]]);
|
|
42
|
-
export {
|
|
43
|
-
Input as default
|
|
44
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { resolveComponent, createElementBlock, openBlock, normalizeStyle, createVNode, withCtx, createTextVNode, toDisplayString, unref } from "vue";
|
|
2
|
-
import html2canvas from "html2canvas";
|
|
3
|
-
import { renderTextByVariables } from "./sun-card-designer.es185.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
6
|
-
const _sfc_main = {
|
|
7
|
-
__name: "generateImgComp",
|
|
8
|
-
props: ["record"],
|
|
9
|
-
setup(__props) {
|
|
10
|
-
const props = __props;
|
|
11
|
-
const queryCanvasEl = () => {
|
|
12
|
-
const elTo = document.querySelector(".mb-main");
|
|
13
|
-
if (elTo) return elTo;
|
|
14
|
-
const el = document.querySelector(".pc-main");
|
|
15
|
-
return el;
|
|
16
|
-
};
|
|
17
|
-
const onGenerate = async () => {
|
|
18
|
-
try {
|
|
19
|
-
const target = queryCanvasEl();
|
|
20
|
-
if (!target) return;
|
|
21
|
-
const canvas = await html2canvas(target, {
|
|
22
|
-
useCORS: true,
|
|
23
|
-
backgroundColor: null,
|
|
24
|
-
scale: window.devicePixelRatio || 2
|
|
25
|
-
});
|
|
26
|
-
const dataURL = canvas.toDataURL("image/png");
|
|
27
|
-
const link = document.createElement("a");
|
|
28
|
-
const ts = /* @__PURE__ */ new Date();
|
|
29
|
-
const pad = (n) => n < 10 ? "0" + n : "" + n;
|
|
30
|
-
const name = `card-${ts.getFullYear()}${pad(ts.getMonth() + 1)}${pad(ts.getDate())}-${pad(ts.getHours())}${pad(ts.getMinutes())}${pad(ts.getSeconds())}.png`;
|
|
31
|
-
link.download = name;
|
|
32
|
-
link.href = dataURL;
|
|
33
|
-
document.body.appendChild(link);
|
|
34
|
-
link.click();
|
|
35
|
-
document.body.removeChild(link);
|
|
36
|
-
} catch (e) {
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
const _component_a_button = resolveComponent("a-button");
|
|
41
|
-
return openBlock(), createElementBlock("div", {
|
|
42
|
-
class: "main-button",
|
|
43
|
-
style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
|
|
44
|
-
}, [
|
|
45
|
-
createVNode(_component_a_button, {
|
|
46
|
-
type: "primary",
|
|
47
|
-
onClick: onGenerate
|
|
48
|
-
}, {
|
|
49
|
-
default: withCtx(() => [
|
|
50
|
-
createTextVNode(toDisplayString(unref(renderTextByVariables)(props.record.options.defaultValue)), 1)
|
|
51
|
-
]),
|
|
52
|
-
_: 1
|
|
53
|
-
})
|
|
54
|
-
], 4);
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const GenerateImg = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4806336e"]]);
|
|
59
|
-
export {
|
|
60
|
-
GenerateImg as default
|
|
61
|
-
};
|