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.
Files changed (152) hide show
  1. package/package.json +1 -1
  2. package/dist/mobile/sun-card-design-mobile.es61.js +0 -98
  3. package/dist/mobile/sun-card-design-mobile.es62.js +0 -98
  4. package/dist/public/sun-card-designer.css +0 -1
  5. package/dist/sun-card-designer.es.js +0 -25
  6. package/dist/sun-card-designer.es10.js +0 -167
  7. package/dist/sun-card-designer.es11.js +0 -197
  8. package/dist/sun-card-designer.es12.js +0 -203
  9. package/dist/sun-card-designer.es13.js +0 -130
  10. package/dist/sun-card-designer.es14.js +0 -120
  11. package/dist/sun-card-designer.es151.js +0 -4
  12. package/dist/sun-card-designer.es152.js +0 -4
  13. package/dist/sun-card-designer.es153.js +0 -4
  14. package/dist/sun-card-designer.es154.js +0 -4
  15. package/dist/sun-card-designer.es155.js +0 -82
  16. package/dist/sun-card-designer.es156.js +0 -91
  17. package/dist/sun-card-designer.es157.js +0 -92
  18. package/dist/sun-card-designer.es158.js +0 -191
  19. package/dist/sun-card-designer.es159.js +0 -86
  20. package/dist/sun-card-designer.es16.js +0 -10
  21. package/dist/sun-card-designer.es160.js +0 -238
  22. package/dist/sun-card-designer.es161.js +0 -113
  23. package/dist/sun-card-designer.es162.js +0 -49
  24. package/dist/sun-card-designer.es163.js +0 -43
  25. package/dist/sun-card-designer.es164.js +0 -39
  26. package/dist/sun-card-designer.es165.js +0 -46
  27. package/dist/sun-card-designer.es166.js +0 -58
  28. package/dist/sun-card-designer.es167.js +0 -56
  29. package/dist/sun-card-designer.es168.js +0 -58
  30. package/dist/sun-card-designer.es169.js +0 -73
  31. package/dist/sun-card-designer.es17.js +0 -333
  32. package/dist/sun-card-designer.es170.js +0 -59
  33. package/dist/sun-card-designer.es171.js +0 -69
  34. package/dist/sun-card-designer.es172.js +0 -182
  35. package/dist/sun-card-designer.es173.js +0 -176
  36. package/dist/sun-card-designer.es174.js +0 -184
  37. package/dist/sun-card-designer.es175.js +0 -409
  38. package/dist/sun-card-designer.es176.js +0 -365
  39. package/dist/sun-card-designer.es177.js +0 -70
  40. package/dist/sun-card-designer.es178.js +0 -68
  41. package/dist/sun-card-designer.es179.js +0 -184
  42. package/dist/sun-card-designer.es18.js +0 -68
  43. package/dist/sun-card-designer.es180.js +0 -193
  44. package/dist/sun-card-designer.es181.js +0 -193
  45. package/dist/sun-card-designer.es182.js +0 -193
  46. package/dist/sun-card-designer.es184.js +0 -228
  47. package/dist/sun-card-designer.es185.js +0 -71
  48. package/dist/sun-card-designer.es19.js +0 -611
  49. package/dist/sun-card-designer.es196.js +0 -4
  50. package/dist/sun-card-designer.es20.js +0 -225
  51. package/dist/sun-card-designer.es201.js +0 -125
  52. package/dist/sun-card-designer.es21.js +0 -69
  53. package/dist/sun-card-designer.es22.js +0 -719
  54. package/dist/sun-card-designer.es220.js +0 -63
  55. package/dist/sun-card-designer.es221.js +0 -80
  56. package/dist/sun-card-designer.es222.js +0 -82
  57. package/dist/sun-card-designer.es223.js +0 -94
  58. package/dist/sun-card-designer.es224.js +0 -87
  59. package/dist/sun-card-designer.es225.js +0 -226
  60. package/dist/sun-card-designer.es226.js +0 -105
  61. package/dist/sun-card-designer.es227.js +0 -45
  62. package/dist/sun-card-designer.es228.js +0 -31
  63. package/dist/sun-card-designer.es229.js +0 -29
  64. package/dist/sun-card-designer.es23.js +0 -211
  65. package/dist/sun-card-designer.es230.js +0 -32
  66. package/dist/sun-card-designer.es231.js +0 -46
  67. package/dist/sun-card-designer.es232.js +0 -42
  68. package/dist/sun-card-designer.es233.js +0 -44
  69. package/dist/sun-card-designer.es234.js +0 -61
  70. package/dist/sun-card-designer.es235.js +0 -46
  71. package/dist/sun-card-designer.es236.js +0 -54
  72. package/dist/sun-card-designer.es237.js +0 -130
  73. package/dist/sun-card-designer.es238.js +0 -127
  74. package/dist/sun-card-designer.es239.js +0 -132
  75. package/dist/sun-card-designer.es24.js +0 -265
  76. package/dist/sun-card-designer.es240.js +0 -375
  77. package/dist/sun-card-designer.es241.js +0 -348
  78. package/dist/sun-card-designer.es242.js +0 -69
  79. package/dist/sun-card-designer.es243.js +0 -65
  80. package/dist/sun-card-designer.es244.js +0 -87
  81. package/dist/sun-card-designer.es245.js +0 -98
  82. package/dist/sun-card-designer.es246.js +0 -98
  83. package/dist/sun-card-designer.es247.js +0 -98
  84. package/dist/sun-card-designer.es25.js +0 -857
  85. package/dist/sun-card-designer.es26.js +0 -768
  86. package/dist/sun-card-designer.es260.js +0 -125
  87. package/dist/sun-card-designer.es27.js +0 -264
  88. package/dist/sun-card-designer.es273.js +0 -192
  89. package/dist/sun-card-designer.es28.js +0 -809
  90. package/dist/sun-card-designer.es29.js +0 -220
  91. package/dist/sun-card-designer.es3.js +0 -506
  92. package/dist/sun-card-designer.es30.js +0 -809
  93. package/dist/sun-card-designer.es31.js +0 -220
  94. package/dist/sun-card-designer.es32.js +0 -820
  95. package/dist/sun-card-designer.es33.js +0 -225
  96. package/dist/sun-card-designer.es34.js +0 -69
  97. package/dist/sun-card-designer.es35.js +0 -375
  98. package/dist/sun-card-designer.es36.js +0 -186
  99. package/dist/sun-card-designer.es37.js +0 -119
  100. package/dist/sun-card-designer.es38.js +0 -354
  101. package/dist/sun-card-designer.es39.js +0 -127
  102. package/dist/sun-card-designer.es4.js +0 -365
  103. package/dist/sun-card-designer.es40.js +0 -100
  104. package/dist/sun-card-designer.es41.js +0 -214
  105. package/dist/sun-card-designer.es42.js +0 -119
  106. package/dist/sun-card-designer.es43.js +0 -250
  107. package/dist/sun-card-designer.es44.js +0 -118
  108. package/dist/sun-card-designer.es45.js +0 -64
  109. package/dist/sun-card-designer.es46.js +0 -223
  110. package/dist/sun-card-designer.es47.js +0 -196
  111. package/dist/sun-card-designer.es48.js +0 -77
  112. package/dist/sun-card-designer.es49.js +0 -85
  113. package/dist/sun-card-designer.es5.js +0 -317
  114. package/dist/sun-card-designer.es50.js +0 -85
  115. package/dist/sun-card-designer.es51.js +0 -64
  116. package/dist/sun-card-designer.es52.js +0 -283
  117. package/dist/sun-card-designer.es53.js +0 -64
  118. package/dist/sun-card-designer.es54.js +0 -142
  119. package/dist/sun-card-designer.es55.js +0 -52
  120. package/dist/sun-card-designer.es56.js +0 -85
  121. package/dist/sun-card-designer.es57.js +0 -258
  122. package/dist/sun-card-designer.es58.js +0 -226
  123. package/dist/sun-card-designer.es59.js +0 -169
  124. package/dist/sun-card-designer.es6.js +0 -190
  125. package/dist/sun-card-designer.es60.js +0 -280
  126. package/dist/sun-card-designer.es61.js +0 -168
  127. package/dist/sun-card-designer.es62.js +0 -219
  128. package/dist/sun-card-designer.es63.js +0 -168
  129. package/dist/sun-card-designer.es64.js +0 -275
  130. package/dist/sun-card-designer.es65.js +0 -760
  131. package/dist/sun-card-designer.es66.js +0 -272
  132. package/dist/sun-card-designer.es67.js +0 -559
  133. package/dist/sun-card-designer.es68.js +0 -124
  134. package/dist/sun-card-designer.es69.js +0 -528
  135. package/dist/sun-card-designer.es7.js +0 -65
  136. package/dist/sun-card-designer.es70.js +0 -185
  137. package/dist/sun-card-designer.es71.js +0 -107
  138. package/dist/sun-card-designer.es72.js +0 -153
  139. package/dist/sun-card-designer.es73.js +0 -315
  140. package/dist/sun-card-designer.es74.js +0 -114
  141. package/dist/sun-card-designer.es76.js +0 -4211
  142. package/dist/sun-card-designer.es79.js +0 -4
  143. package/dist/sun-card-designer.es8.js +0 -171
  144. package/dist/sun-card-designer.es80.js +0 -4
  145. package/dist/sun-card-designer.es81.js +0 -4
  146. package/dist/sun-card-designer.es84.js +0 -228
  147. package/dist/sun-card-designer.es87.js +0 -52
  148. package/dist/sun-card-designer.es88.js +0 -52
  149. package/dist/sun-card-designer.es9.js +0 -207
  150. package/dist/sun-card-designer.es91.js +0 -344
  151. package/dist/sun-card-designer.es92.js +0 -199
  152. package/dist/sun-card-designer.es95.js +0 -180
@@ -1,238 +0,0 @@
1
- import { ref, computed, watch, resolveComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, normalizeStyle, createCommentVNode, createVNode, withModifiers, withCtx, createTextVNode, h, unref, toDisplayString, Fragment, renderList } from "vue";
2
- import { UploadOutlined } from "@ant-design/icons-vue";
3
- import { message } from "ant-design-vue";
4
- import { useCardManageStore } from "./sun-card-designer.es13.js";
5
- /* empty css */
6
- import _export_sfc from "./sun-card-designer.es16.js";
7
- const _hoisted_1 = {
8
- key: 0,
9
- class: "upload-progress"
10
- };
11
- const _hoisted_2 = { class: "progress-text-container" };
12
- const _hoisted_3 = {
13
- key: 1,
14
- class: "file-list"
15
- };
16
- const _hoisted_4 = { class: "file-item-name" };
17
- const _sfc_main = {
18
- __name: "uploadComp",
19
- props: ["record"],
20
- setup(__props) {
21
- const props = __props;
22
- const cardManageStore = useCardManageStore();
23
- const currentUuid = ref(null);
24
- const fileList = ref([]);
25
- const uploadControllers = ref(/* @__PURE__ */ new Map());
26
- const currentUploadingUid = ref(null);
27
- const isUploading = computed(() => !!currentUploadingUid.value);
28
- const buttonColor = computed(() => {
29
- return props.record.options?.style?.buttonColor;
30
- });
31
- const buttonSize = computed(() => {
32
- return props.record.options?.style?.buttonSize;
33
- });
34
- watch(
35
- () => cardManageStore.currentSelectUuid,
36
- (val) => {
37
- currentUuid.value = val;
38
- }
39
- );
40
- const acceptTypes = computed(() => {
41
- if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
42
- return "";
43
- }
44
- const formatMap = {
45
- pdf: ".pdf",
46
- word: ".doc,.docx",
47
- excle: ".xls,.xlsx",
48
- txt: ".txt",
49
- ppt: ".ppt,.pptx"
50
- };
51
- return props.record.options.format.map((format) => formatMap[format] || `.${format}`).join(",");
52
- });
53
- const beforeUpload = (file) => {
54
- const isValidType = checkFileType(file);
55
- if (!isValidType) {
56
- const allowedFormats = props.record.options?.format || [];
57
- const formatNames = {
58
- pdf: "PDF",
59
- word: "Word",
60
- excle: "Excel",
61
- txt: "TXT",
62
- ppt: "PPT"
63
- };
64
- const formatText = allowedFormats.map((f) => formatNames[f] || f.toUpperCase()).join("、");
65
- if (formatText) {
66
- message.error(`只支持 ${formatText} 格式的文件`);
67
- } else {
68
- message.error("请先配置允许的文件格式");
69
- }
70
- return false;
71
- }
72
- return true;
73
- };
74
- const checkFileType = (file) => {
75
- if (!props.record.options?.format || !Array.isArray(props.record.options.format) || props.record.options.format.length === 0) {
76
- return false;
77
- }
78
- const fileName = (file.name || file.fileName || "").toLowerCase();
79
- if (!fileName) {
80
- return false;
81
- }
82
- const allowedFormats = props.record.options.format;
83
- const formatExtensions = {
84
- pdf: [".pdf"],
85
- word: [".doc", ".docx"],
86
- excle: [".xls", ".xlsx"],
87
- txt: [".txt"],
88
- ppt: [".ppt", ".pptx"]
89
- };
90
- const allowedExtensions = allowedFormats.reduce((exts, format) => {
91
- if (formatExtensions[format]) {
92
- exts.push(...formatExtensions[format]);
93
- }
94
- return exts;
95
- }, []);
96
- if (allowedExtensions.length === 0) {
97
- return false;
98
- }
99
- const isValid = allowedExtensions.some((ext) => fileName.endsWith(ext));
100
- console.log("文件类型检查:", {
101
- fileName,
102
- allowedFormats,
103
- allowedExtensions,
104
- isValid
105
- });
106
- return isValid;
107
- };
108
- const customRequest = (options) => {
109
- const { file, onSuccess, onProgress } = options;
110
- ({ uid: file.uid, name: file.name });
111
- currentUploadingUid.value = file.uid;
112
- let progress = 0;
113
- const timer = setInterval(() => {
114
- progress = Math.min(progress + 8 + Math.random() * 6, 99);
115
- onProgress({ percent: progress });
116
- }, 200);
117
- const doneTimer = setTimeout(() => {
118
- clearInterval(timer);
119
- uploadControllers.value.delete(file.uid);
120
- fileList.value.push({ uid: file.uid, name: file.name });
121
- message.success("上传成功");
122
- onSuccess({ url: URL.createObjectURL(file), name: file.name });
123
- if (currentUploadingUid.value === file.uid) currentUploadingUid.value = null;
124
- }, 2e3);
125
- uploadControllers.value.set(file.uid, { timer, doneTimer });
126
- };
127
- const onCancelUpload = () => {
128
- const uid = currentUploadingUid.value;
129
- if (!uid) return;
130
- const ctrl = uploadControllers.value.get(uid);
131
- if (ctrl) {
132
- if (ctrl.timer) clearInterval(ctrl.timer);
133
- if (ctrl.doneTimer) clearTimeout(ctrl.doneTimer);
134
- uploadControllers.value.delete(uid);
135
- }
136
- const item = fileList.value.find((f) => f.uid === uid);
137
- if (item) {
138
- item.status = "cancelled";
139
- item.percent = 0;
140
- }
141
- currentUploadingUid.value = null;
142
- message.info("已取消上传");
143
- };
144
- const removeFile = (uid) => {
145
- const item = fileList.value.find((f) => f.uid === uid);
146
- if (item && item.status === "uploading") {
147
- currentUploadingUid.value = uid;
148
- onCancelUpload();
149
- }
150
- fileList.value = fileList.value.filter((f) => f.uid !== uid);
151
- };
152
- return (_ctx, _cache) => {
153
- const _component_a_button = resolveComponent("a-button");
154
- const _component_a_upload = resolveComponent("a-upload");
155
- return openBlock(), createElementBlock("div", {
156
- class: normalizeClass(["upload-comp", { active: currentUuid.value === props.record.uuid }])
157
- }, [
158
- createElementVNode("div", {
159
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
160
- }, [
161
- isUploading.value ? (openBlock(), createElementBlock("div", _hoisted_1, [
162
- _cache[2] || (_cache[2] = createElementVNode("div", { class: "spinner" }, null, -1)),
163
- createElementVNode("div", _hoisted_2, [
164
- _cache[1] || (_cache[1] = createElementVNode("div", { class: "progress-text" }, "文件导入中...", -1)),
165
- createVNode(_component_a_button, {
166
- class: "cancel-btn",
167
- onClick: withModifiers(onCancelUpload, ["stop"]),
168
- size: "small"
169
- }, {
170
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
171
- createTextVNode("取消", -1)
172
- ])]),
173
- _: 1
174
- })
175
- ])
176
- ])) : createCommentVNode("", true),
177
- createVNode(_component_a_upload, {
178
- accept: acceptTypes.value,
179
- multiple: true,
180
- "before-upload": beforeUpload,
181
- "custom-request": customRequest,
182
- "show-upload-list": false,
183
- disabled: false
184
- }, {
185
- default: withCtx(() => [
186
- createVNode(_component_a_button, {
187
- type: "primary",
188
- style: normalizeStyle({
189
- backgroundColor: buttonColor.value,
190
- borderColor: buttonColor.value,
191
- fontSize: buttonSize.value + "px",
192
- height: "auto",
193
- padding: "4px 12px",
194
- minHeight: "28px"
195
- }),
196
- icon: h(unref(UploadOutlined))
197
- }, {
198
- icon: withCtx(() => [
199
- createVNode(unref(UploadOutlined))
200
- ]),
201
- default: withCtx(() => [
202
- createTextVNode(" " + toDisplayString(props.record.options?.style?.buttonText), 1)
203
- ]),
204
- _: 1
205
- }, 8, ["style", "icon"])
206
- ]),
207
- _: 1
208
- }, 8, ["accept"]),
209
- fileList.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3, [
210
- (openBlock(true), createElementBlock(Fragment, null, renderList(fileList.value, (file) => {
211
- return openBlock(), createElementBlock("div", {
212
- class: "file-item",
213
- key: file.uid
214
- }, [
215
- createElementVNode("span", _hoisted_4, toDisplayString(file.name), 1),
216
- createVNode(_component_a_button, {
217
- type: "link",
218
- danger: "",
219
- size: "small",
220
- onClick: withModifiers(($event) => removeFile(file.uid), ["stop"])
221
- }, {
222
- default: withCtx(() => [..._cache[3] || (_cache[3] = [
223
- createTextVNode("删除", -1)
224
- ])]),
225
- _: 1
226
- }, 8, ["onClick"])
227
- ]);
228
- }), 128))
229
- ])) : createCommentVNode("", true)
230
- ], 4)
231
- ], 2);
232
- };
233
- }
234
- };
235
- const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5bfcdbbe"]]);
236
- export {
237
- Upload as default
238
- };
@@ -1,113 +0,0 @@
1
- import { ref, watch, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode } from "vue";
2
- import { renderTextByVariables } from "./sun-card-designer.es14.js";
3
- import { useCardManageStore } from "./sun-card-designer.es13.js";
4
- import IMG from "./sun-card-designer.es196.js";
5
- /* empty css */
6
- import _export_sfc from "./sun-card-designer.es16.js";
7
- const _sfc_main = {
8
- __name: "pictureComp",
9
- props: ["record", "columnsIndex"],
10
- setup(__props) {
11
- const props = __props;
12
- const cardManageStore = useCardManageStore();
13
- const currentUuid = ref(null);
14
- const currentImageUrl = ref(IMG);
15
- watch(
16
- () => cardManageStore.currentSelectUuid,
17
- (val) => {
18
- currentUuid.value = val;
19
- }
20
- );
21
- watch(
22
- () => props.record.options.defaultValue,
23
- (newUrl) => {
24
- if (newUrl) {
25
- const timer = setTimeout(() => {
26
- clearTimeout(timer);
27
- checkImageUrl(renderTextByVariables(newUrl, props.columnsIndex));
28
- }, 0);
29
- } else {
30
- currentImageUrl.value = IMG;
31
- }
32
- },
33
- { immediate: true }
34
- );
35
- const getAlign = () => {
36
- const obj = {
37
- "left": "flex-start",
38
- "center": "center",
39
- "right": "flex-end"
40
- };
41
- return obj[props.record.options.style.align];
42
- };
43
- const getHeight = () => {
44
- const mode = props.record.options.style.mode;
45
- const width = props.record.options.style.width;
46
- const height = props.record.options.style.height;
47
- if (mode === "fixed") {
48
- if (props.record.options.style.cuttingRatio === "1") {
49
- return width + "px";
50
- } else if (props.record.options.style.cuttingRatio === "2") {
51
- return width * 9 / 16 + "px";
52
- } else if (props.record.options.style.cuttingRatio === "3") {
53
- return width * 2 / 3 + "px";
54
- } else if (props.record.options.style.cuttingRatio === "4") {
55
- return width * 3 / 4 + "px";
56
- }
57
- return height + "px";
58
- } else {
59
- return "auto";
60
- }
61
- };
62
- const getAspectRatio = () => {
63
- if (props.record.options.style.cuttingRatio === "1") {
64
- return "1 / 1";
65
- } else if (props.record.options.style.cuttingRatio === "2") {
66
- return "16 / 9";
67
- } else if (props.record.options.style.cuttingRatio === "3") {
68
- return "3 / 2";
69
- } else if (props.record.options.style.cuttingRatio === "4") {
70
- return "4 / 3";
71
- }
72
- return "auto";
73
- };
74
- function checkImageUrl(url) {
75
- const img = new Image();
76
- img.onload = () => {
77
- currentImageUrl.value = url;
78
- };
79
- img.onerror = () => {
80
- currentImageUrl.value = IMG;
81
- };
82
- img.src = url;
83
- }
84
- return (_ctx, _cache) => {
85
- return openBlock(), createElementBlock("div", {
86
- class: normalizeClass(["main-picture", { active: currentUuid.value === props.record.uuid }]),
87
- style: normalizeStyle({ "justify-content": getAlign() })
88
- }, [
89
- createElementVNode("div", {
90
- style: normalizeStyle({ width: "100%", padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
91
- }, [
92
- createElementVNode("div", {
93
- class: "picture-container",
94
- style: normalizeStyle({
95
- width: props.record.options.style.mode === "fixed" ? props.record.options.style.width + "px" : "100%",
96
- height: getHeight(),
97
- backgroundImage: `url(${currentImageUrl.value})`,
98
- backgroundSize: props.record.options.style.cuttingMode,
99
- backgroundPosition: "center",
100
- backgroundRepeat: "no-repeat",
101
- aspectRatio: getAspectRatio(),
102
- borderRadius: props.record.options.style.borderRadius + "px"
103
- })
104
- }, null, 4)
105
- ], 4)
106
- ], 6);
107
- };
108
- }
109
- };
110
- const Picture = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-182d4dc4"]]);
111
- export {
112
- Picture as default
113
- };
@@ -1,49 +0,0 @@
1
- import { ref, watch, resolveComponent, createElementBlock, openBlock, createElementVNode, normalizeClass, normalizeStyle, createVNode, withCtx, createTextVNode, toDisplayString, unref } from "vue";
2
- import { useCardManageStore } from "./sun-card-designer.es13.js";
3
- import { renderTextByVariables } from "./sun-card-designer.es14.js";
4
- /* empty css */
5
- import _export_sfc from "./sun-card-designer.es16.js";
6
- const _sfc_main = {
7
- __name: "tagComp",
8
- props: ["record"],
9
- setup(__props) {
10
- const props = __props;
11
- const cardManageStore = useCardManageStore();
12
- const currentUuid = ref(null);
13
- watch(
14
- () => cardManageStore.currentSelectUuid,
15
- (val) => {
16
- currentUuid.value = val;
17
- }
18
- );
19
- return (_ctx, _cache) => {
20
- const _component_a_tag = resolveComponent("a-tag");
21
- return openBlock(), createElementBlock("div", null, [
22
- createElementVNode("div", {
23
- class: normalizeClass(["main-tag", { active: currentUuid.value === props.record.uuid }])
24
- }, [
25
- createElementVNode("div", {
26
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
27
- }, [
28
- createVNode(_component_a_tag, {
29
- color: props.record.options.style.backgroundColor,
30
- style: normalizeStyle({
31
- color: props.record.options.style.color,
32
- fontSize: props.record.options.style.size
33
- })
34
- }, {
35
- default: withCtx(() => [
36
- createTextVNode(toDisplayString(unref(renderTextByVariables)(props.record.options.defaultValue)), 1)
37
- ]),
38
- _: 1
39
- }, 8, ["color", "style"])
40
- ], 4)
41
- ], 2)
42
- ]);
43
- };
44
- }
45
- };
46
- const Tag = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b499160a"]]);
47
- export {
48
- Tag as default
49
- };
@@ -1,43 +0,0 @@
1
- import { ref, watch, resolveComponent, createElementBlock, openBlock, createElementVNode, normalizeClass, normalizeStyle, createVNode, unref } from "vue";
2
- import { useCardManageStore } from "./sun-card-designer.es13.js";
3
- import { renderTextByVariables } from "./sun-card-designer.es14.js";
4
- /* empty css */
5
- import _export_sfc from "./sun-card-designer.es16.js";
6
- const _sfc_main = {
7
- __name: "rateComp",
8
- props: ["record"],
9
- setup(__props) {
10
- const props = __props;
11
- const cardManageStore = useCardManageStore();
12
- const currentUuid = ref(null);
13
- watch(
14
- () => cardManageStore.currentSelectUuid,
15
- (val) => {
16
- currentUuid.value = val;
17
- }
18
- );
19
- return (_ctx, _cache) => {
20
- const _component_a_rate = resolveComponent("a-rate");
21
- return openBlock(), createElementBlock("div", null, [
22
- createElementVNode("div", {
23
- class: normalizeClass(["main-rate", { active: currentUuid.value === props.record.uuid }])
24
- }, [
25
- createElementVNode("div", {
26
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
27
- }, [
28
- createVNode(_component_a_rate, {
29
- value: unref(renderTextByVariables)(props.record.options.defaultValue) * 1,
30
- count: props.record.options.count,
31
- "allow-half": "",
32
- disabled: ""
33
- }, null, 8, ["value", "count"])
34
- ], 4)
35
- ], 2)
36
- ]);
37
- };
38
- }
39
- };
40
- const Rate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-da4a8ab1"]]);
41
- export {
42
- Rate as default
43
- };
@@ -1,39 +0,0 @@
1
- import { ref, watch, resolveComponent, createElementBlock, openBlock, createElementVNode, normalizeClass, createVNode, normalizeStyle } from "vue";
2
- import { useCardManageStore } from "./sun-card-designer.es13.js";
3
- /* empty css */
4
- import _export_sfc from "./sun-card-designer.es16.js";
5
- const _sfc_main = {
6
- __name: "dividerComp",
7
- props: ["record"],
8
- setup(__props) {
9
- const props = __props;
10
- const cardManageStore = useCardManageStore();
11
- const currentUuid = ref(null);
12
- watch(
13
- () => cardManageStore.currentSelectUuid,
14
- (val) => {
15
- currentUuid.value = val;
16
- }
17
- );
18
- return (_ctx, _cache) => {
19
- const _component_a_divider = resolveComponent("a-divider");
20
- return openBlock(), createElementBlock("div", null, [
21
- createElementVNode("div", {
22
- class: normalizeClass(["main-divider", { active: currentUuid.value === props.record.uuid }])
23
- }, [
24
- createVNode(_component_a_divider, {
25
- style: normalizeStyle({
26
- "margin-top": props.record.options.style.marginTop + "px",
27
- "margin-bottom": props.record.options.style.marginBottom + "px",
28
- "background": "#ccc"
29
- })
30
- }, null, 8, ["style"])
31
- ], 2)
32
- ]);
33
- };
34
- }
35
- };
36
- const Divider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-184e8aa5"]]);
37
- export {
38
- Divider as default
39
- };
@@ -1,46 +0,0 @@
1
- import { ref, computed, watch, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, createVNode } from "vue";
2
- import Audio$1 from "./sun-card-designer.es201.js";
3
- import { useCardManageStore } from "./sun-card-designer.es13.js";
4
- /* empty css */
5
- import _export_sfc from "./sun-card-designer.es16.js";
6
- const _sfc_main = {
7
- __name: "audioComp",
8
- props: ["record"],
9
- setup(__props) {
10
- const props = __props;
11
- const cardManageStore = useCardManageStore();
12
- const currentUuid = ref(null);
13
- const wrapperStyle = computed(() => ({
14
- "--play-btn-color": props.record?.options?.style?.playBtnColor || "#4a6bff",
15
- "--progress-color": props.record?.options?.style?.progressColor || "#409eff"
16
- }));
17
- watch(
18
- () => cardManageStore.currentSelectUuid,
19
- (val) => {
20
- currentUuid.value = val;
21
- }
22
- );
23
- return (_ctx, _cache) => {
24
- return openBlock(), createElementBlock("div", {
25
- class: normalizeClass(["main-audio", { active: currentUuid.value === props.record.uuid }]),
26
- style: normalizeStyle(wrapperStyle.value)
27
- }, [
28
- createElementVNode("div", {
29
- style: normalizeStyle({
30
- padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
31
- })
32
- }, [
33
- createVNode(Audio$1, {
34
- src: props.record.options.src,
35
- playBtnColor: props.record?.options?.style?.playBtnColor,
36
- progressColor: props.record?.options?.style?.progressColor
37
- }, null, 8, ["src", "playBtnColor", "progressColor"])
38
- ], 4)
39
- ], 6);
40
- };
41
- }
42
- };
43
- const Audio = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dc881905"]]);
44
- export {
45
- Audio as default
46
- };
@@ -1,58 +0,0 @@
1
- import { ref, watch, resolveComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, normalizeStyle, createVNode, withCtx, unref } from "vue";
2
- import { renderTextByVariables } from "./sun-card-designer.es14.js";
3
- import { useCardManageStore } from "./sun-card-designer.es13.js";
4
- /* empty css */
5
- import _export_sfc from "./sun-card-designer.es16.js";
6
- const _sfc_main = {
7
- __name: "selectComp",
8
- props: ["record"],
9
- setup(__props) {
10
- const props = __props;
11
- const cardManageStore = useCardManageStore();
12
- const currentUuid = ref(null);
13
- watch(
14
- () => cardManageStore.currentSelectUuid,
15
- (val) => {
16
- currentUuid.value = val;
17
- }
18
- );
19
- return (_ctx, _cache) => {
20
- const _component_a_select = resolveComponent("a-select");
21
- const _component_a_form_item = resolveComponent("a-form-item");
22
- const _component_a_form = resolveComponent("a-form");
23
- return openBlock(), createElementBlock("div", {
24
- class: normalizeClass(["main-select", { active: currentUuid.value === props.record.uuid }])
25
- }, [
26
- createElementVNode("div", {
27
- style: normalizeStyle({ padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px` })
28
- }, [
29
- createVNode(_component_a_form, {
30
- layout: props.record.options.flex
31
- }, {
32
- default: withCtx(() => [
33
- createVNode(_component_a_form_item, {
34
- label: unref(renderTextByVariables)(props.record.options.label)
35
- }, {
36
- default: withCtx(() => [
37
- createVNode(_component_a_select, {
38
- value: props.record.options.defaultValue,
39
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.defaultValue = $event),
40
- placeholder: props.record.options.placeholder,
41
- style: { "width": "100%" },
42
- options: props.record.options.optionsMode === "fixed" ? props.record.options.optionsFixed : props.record.options.optionsAuto
43
- }, null, 8, ["value", "placeholder", "options"])
44
- ]),
45
- _: 1
46
- }, 8, ["label"])
47
- ]),
48
- _: 1
49
- }, 8, ["layout"])
50
- ], 4)
51
- ], 2);
52
- };
53
- }
54
- };
55
- const Select = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-34ad5d27"]]);
56
- export {
57
- Select as default
58
- };
@@ -1,56 +0,0 @@
1
- import { ref, computed, watch, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode } from "vue";
2
- import { useCardManageStore } from "./sun-card-designer.es13.js";
3
- /* empty css */
4
- import _export_sfc from "./sun-card-designer.es16.js";
5
- const _hoisted_1 = ["src"];
6
- const _sfc_main = {
7
- __name: "videoComp",
8
- props: ["record"],
9
- setup(__props) {
10
- const props = __props;
11
- const cardManageStore = useCardManageStore();
12
- const currentUuid = ref(null);
13
- const wrapperStyle = computed(() => ({
14
- width: "100%"
15
- }));
16
- const videoStyle = computed(() => {
17
- const style = props.record?.options?.style || {};
18
- if (style.mode === "fixed") {
19
- const width = style.width ? `${style.width}px` : "360px";
20
- const height = style.height;
21
- return { width, height };
22
- }
23
- return { width: "100%" };
24
- });
25
- watch(
26
- () => cardManageStore.currentSelectUuid,
27
- (val) => {
28
- currentUuid.value = val;
29
- }
30
- );
31
- return (_ctx, _cache) => {
32
- return openBlock(), createElementBlock("div", {
33
- class: normalizeClass(["main-video", { active: currentUuid.value === props.record.uuid }]),
34
- style: normalizeStyle(wrapperStyle.value)
35
- }, [
36
- createElementVNode("div", {
37
- style: normalizeStyle({
38
- padding: `${props.record.options?.style?.tbPadding || 0}px ${props.record.options?.style?.lrPadding || 0}px`
39
- })
40
- }, [
41
- createElementVNode("video", {
42
- class: "custom-video",
43
- src: props.record.options.src,
44
- style: normalizeStyle(videoStyle.value),
45
- controls: "",
46
- preload: "metadata"
47
- }, null, 12, _hoisted_1)
48
- ], 4)
49
- ], 6);
50
- };
51
- }
52
- };
53
- const Video = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-31bc4002"]]);
54
- export {
55
- Video as default
56
- };