sun-card-design 1.3.3 → 1.3.5
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/README.md +80 -4
- package/dist/mobile/sun-card-design-mobile.es15.js +19 -11
- package/dist/mobile/sun-card-design-mobile.es16.js +26 -8
- package/dist/mobile/sun-card-design-mobile.es2.js +36 -4
- package/dist/mobile/sun-card-design-mobile.es25.js +48 -26
- package/dist/mobile/sun-card-design-mobile.es4.js +17 -13
- package/dist/mobile/sun-card-design-mobile.es56.js +50 -46
- package/dist/mobile/sun-card-design-mobile.es57.js +46 -88
- package/dist/mobile/sun-card-design-mobile.es58.js +29 -33
- package/dist/mobile/sun-card-design-mobile.es59.js +55 -108
- package/dist/mobile/sun-card-design-mobile.es60.js +36 -28
- package/dist/mobile/sun-card-design-mobile.es61.js +188 -0
- package/dist/mobile/sun-card-design-mobile.es62.js +188 -0
- package/dist/mobile/sun-card-design-mobile.es63.js +188 -0
- package/dist/mobile/sun-card-design-mobile.es67.js +124 -0
- package/dist/mobile/sun-card-design-mobile.es7.js +123 -56
- package/dist/pc/sun-card-design-pc.es15.js +19 -11
- package/dist/pc/sun-card-design-pc.es16.js +26 -8
- package/dist/pc/sun-card-design-pc.es2.js +37 -4
- package/dist/pc/sun-card-design-pc.es25.js +48 -26
- package/dist/pc/sun-card-design-pc.es4.js +17 -13
- package/dist/pc/sun-card-design-pc.es56.js +50 -46
- package/dist/pc/sun-card-design-pc.es57.js +46 -88
- package/dist/pc/sun-card-design-pc.es58.js +29 -33
- package/dist/pc/sun-card-design-pc.es59.js +55 -108
- package/dist/pc/sun-card-design-pc.es60.js +36 -28
- package/dist/pc/sun-card-design-pc.es61.js +188 -0
- package/dist/pc/sun-card-design-pc.es67.js +124 -0
- package/dist/pc/sun-card-design-pc.es7.js +123 -56
- package/dist/public/sun-card-design.css +1 -1
- package/dist/public/sun-card-designer.css +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -74,10 +74,26 @@ import { PcPanel, MobilePanel } from 'sun-card-design'
|
|
|
74
74
|
<template>
|
|
75
75
|
<div class="container">
|
|
76
76
|
<div class="pc-wrap">
|
|
77
|
-
<PcPanel
|
|
77
|
+
<PcPanel
|
|
78
|
+
:config="toolConfig"
|
|
79
|
+
:record="record"
|
|
80
|
+
@clickEvent="handleClickEvent"
|
|
81
|
+
@fileUpdateEvent="handleFileUpdate"
|
|
82
|
+
@clickColumnsEvent="handleClickColumns"
|
|
83
|
+
@clickLinkEvent="handleClickLink"
|
|
84
|
+
@uploadEvent="handleUpload"
|
|
85
|
+
/>
|
|
78
86
|
</div>
|
|
79
87
|
<div class="mb-wrap">
|
|
80
|
-
<MobilePanel
|
|
88
|
+
<MobilePanel
|
|
89
|
+
:config="toolConfig"
|
|
90
|
+
:record="record"
|
|
91
|
+
@clickEvent="handleClickEvent"
|
|
92
|
+
@fileUpdateEvent="handleFileUpdate"
|
|
93
|
+
@clickColumnsEvent="handleClickColumns"
|
|
94
|
+
@clickLinkEvent="handleClickLink"
|
|
95
|
+
@uploadEvent="handleUpload"
|
|
96
|
+
/>
|
|
81
97
|
</div>
|
|
82
98
|
</div>
|
|
83
99
|
</template>
|
|
@@ -114,12 +130,73 @@ const toolConfig = ref({
|
|
|
114
130
|
]
|
|
115
131
|
})
|
|
116
132
|
|
|
133
|
+
// 组件点击
|
|
117
134
|
const handleClickEvent = (record) => {
|
|
118
|
-
console.
|
|
135
|
+
console.log('clickEvent', record)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// 布局区域点击
|
|
139
|
+
const handleClickColumns = (record) => {
|
|
140
|
+
console.log('clickColumnsEvent', record)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// 文件组件内容更新
|
|
144
|
+
const handleFileUpdate = (record) => {
|
|
145
|
+
console.log('fileUpdateEvent', record)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// 文件链接点击
|
|
149
|
+
const handleClickLink = (link) => {
|
|
150
|
+
console.log('clickLinkEvent', link)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// 文件上传点击(上传由宿主应用实现)
|
|
154
|
+
const handleUpload = ({ url, callBack }) => {
|
|
155
|
+
console.log('uploadEvent url', url)
|
|
156
|
+
|
|
157
|
+
// 在这里发起实际的上传请求,拿到文件列表 list[]
|
|
158
|
+
// 假设上传完成后得到 filesList 数组:
|
|
159
|
+
const filesList = [] // TODO: 替换为真实上传返回的 list[]
|
|
160
|
+
|
|
161
|
+
// 上传完成后,通过 callBack 把文件列表回传给 card 预览组件
|
|
162
|
+
callBack(filesList)
|
|
119
163
|
}
|
|
120
164
|
</script>
|
|
121
165
|
```
|
|
122
166
|
|
|
167
|
+
## 事件 API
|
|
168
|
+
|
|
169
|
+
渲染面板组件(`PcPanel`、`MobilePanel`)会向外抛出一系列交互事件,便于在宿主应用中统一处理业务逻辑:
|
|
170
|
+
|
|
171
|
+
- **clickEvent**:组件点击事件
|
|
172
|
+
- **触发场景**:卡片内可点击基础组件(如按钮、图片、文件组件等)被用户点击时触发
|
|
173
|
+
- **回调签名**:`(record) => void`
|
|
174
|
+
- **参数说明**:`record` 为当前被点击组件的配置数据
|
|
175
|
+
|
|
176
|
+
- **fileUpdateEvent**:文件组件内部文件列表更新事件
|
|
177
|
+
- **触发场景**:在文件组件中执行“更新文件”等操作时触发
|
|
178
|
+
- **回调签名**:`(record) => void`
|
|
179
|
+
- **参数说明**:`record` 为当前文件组件的配置数据
|
|
180
|
+
|
|
181
|
+
- **clickColumnsEvent**:布局区域(Grid 等)点击事件
|
|
182
|
+
- **触发场景**:开启了点击行为的布局列/区域被点击时触发
|
|
183
|
+
- **回调签名**:`(record) => void`
|
|
184
|
+
- **参数说明**:`record` 为当前被点击的布局列配置
|
|
185
|
+
|
|
186
|
+
- **clickLinkEvent**:文件链接点击事件
|
|
187
|
+
- **触发场景**:文件组件中的链接被点击时触发
|
|
188
|
+
- **回调签名**:`(link: string) => void`
|
|
189
|
+
- **参数说明**:`link` 为当前文件的链接地址
|
|
190
|
+
|
|
191
|
+
- **uploadEvent**:文件上传点击事件
|
|
192
|
+
- **触发场景**:文件组件中点击“上传”入口时触发
|
|
193
|
+
- **回调签名**:`(payload) => void`
|
|
194
|
+
- **参数结构**:`payload` 为一个对象:`{ url, callBack }`
|
|
195
|
+
- **url**:上传接口地址,类型为 `string`
|
|
196
|
+
- **callBack**:上传完成后的回调函数,签名为 `(files: any[]) => void`,其中 `files` 为上传返回的文件列表 `list[]`;宿主应用在完成上传并拿到文件列表后,需要调用该回调将数据回传给预览面板
|
|
197
|
+
|
|
198
|
+
> 建议在业务代码中统一封装这些事件的处理逻辑,以便在不同卡片、不同终端(PC/Mobile)之间复用。
|
|
199
|
+
|
|
123
200
|
## 外部依赖与对等依赖
|
|
124
201
|
|
|
125
202
|
本库将以下依赖标记为 external/peer,不会被打入产物,请在宿主项目中自行安装与提供:
|
|
@@ -128,7 +205,6 @@ const handleClickEvent = (record) => {
|
|
|
128
205
|
- `vue` ^3.5.0
|
|
129
206
|
- `ant-design-vue` ^4.0.0
|
|
130
207
|
|
|
131
|
-
> 某些组件(如图表/3D/截图)依赖上述库,只有在使用相关组件时才需要安装。
|
|
132
208
|
|
|
133
209
|
## 兼容性
|
|
134
210
|
|
|
@@ -7,17 +7,17 @@ const _hoisted_2 = ["onClick"];
|
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
__name: "gridComp",
|
|
9
9
|
props: ["record", "recordData", "columnsIndex", "variableList"],
|
|
10
|
-
emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent"],
|
|
10
|
+
emits: ["clickEvent", "clickColumnsEvent", "fileUpdateEvent", "clickLinkEvent", "uploadEvent"],
|
|
11
11
|
setup(__props, { emit: __emit }) {
|
|
12
12
|
useCssVars((_ctx) => ({
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
13
|
+
"d08b17cc": mainBackground.value,
|
|
14
|
+
"v73ce06a6": boxBackground.value,
|
|
15
|
+
"v1485a1a4": boxBorder.value,
|
|
16
|
+
"v1cfa2f56": boxBorderRadius.value,
|
|
17
|
+
"v481cbd99": boxPadding.value,
|
|
18
|
+
"v54779541": boxJustifyContent.value,
|
|
19
|
+
"v171bdda1": boxMinHeight.value,
|
|
20
|
+
"v311da698": boxShadow.value
|
|
21
21
|
}));
|
|
22
22
|
const props = __props;
|
|
23
23
|
const emit = __emit;
|
|
@@ -33,10 +33,16 @@ const _sfc_main = {
|
|
|
33
33
|
const onUpdate = (record) => {
|
|
34
34
|
emit("fileUpdateEvent", record);
|
|
35
35
|
};
|
|
36
|
+
const onClickLink = (link) => {
|
|
37
|
+
emit("clickLinkEvent", link);
|
|
38
|
+
};
|
|
36
39
|
const onClickColumns = (record) => {
|
|
37
40
|
if (!record.options.clickEvent) return;
|
|
38
41
|
emit("clickColumnsEvent", record);
|
|
39
42
|
};
|
|
43
|
+
const onUpload = (uploadData) => {
|
|
44
|
+
emit("uploadEvent", uploadData);
|
|
45
|
+
};
|
|
40
46
|
function isGradientColor(color) {
|
|
41
47
|
return /^(linear|radial)-gradient\(.*\)$/.test(color);
|
|
42
48
|
}
|
|
@@ -94,7 +100,9 @@ const _sfc_main = {
|
|
|
94
100
|
key: index2,
|
|
95
101
|
columnsIndex: getIndex(item.index),
|
|
96
102
|
onClickEvent: onClick,
|
|
97
|
-
onFileUpdateEvent: onUpdate
|
|
103
|
+
onFileUpdateEvent: onUpdate,
|
|
104
|
+
onClickLinkEvent: onClickLink,
|
|
105
|
+
onUploadEvent: onUpload
|
|
98
106
|
}, null, 8, ["record", "variableList", "columnsIndex"]);
|
|
99
107
|
}), 128))
|
|
100
108
|
], 8, _hoisted_2)
|
|
@@ -109,7 +117,7 @@ const _sfc_main = {
|
|
|
109
117
|
};
|
|
110
118
|
}
|
|
111
119
|
};
|
|
112
|
-
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
120
|
+
const Grid = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-70d5add4"]]);
|
|
113
121
|
export {
|
|
114
122
|
Grid as default
|
|
115
123
|
};
|
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
import { useCssVars, computed, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, unref } from "vue";
|
|
1
|
+
import { useCssVars, computed, ref, watch, resolveComponent, createElementBlock, openBlock, createVNode, withCtx, unref } from "vue";
|
|
2
2
|
import { renderTextByVariables } from "./sun-card-design-mobile.es28.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import _export_sfc from "./sun-card-design-mobile.es27.js";
|
|
5
5
|
const _hoisted_1 = { class: "main-input" };
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
__name: "inputComp",
|
|
8
|
-
props: ["record", "variableList"],
|
|
8
|
+
props: ["record", "columnsIndex", "variableList"],
|
|
9
9
|
setup(__props) {
|
|
10
10
|
useCssVars((_ctx) => ({
|
|
11
|
-
"
|
|
11
|
+
"v3367bba6": mainPadding.value
|
|
12
12
|
}));
|
|
13
13
|
const props = __props;
|
|
14
|
+
const inputValue = ref(renderTextByVariables(props.record.options.defaultValue, props.columnsIndex, props.variableList));
|
|
15
|
+
watch(
|
|
16
|
+
() => renderTextByVariables(props.record.options.defaultValue, props.columnsIndex, props.variableList),
|
|
17
|
+
(newValue) => {
|
|
18
|
+
inputValue.value = newValue;
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
const handleInputChange = (e) => {
|
|
22
|
+
const newValue = e.target.value;
|
|
23
|
+
inputValue.value = newValue;
|
|
24
|
+
if (props.record.options?.variableName) {
|
|
25
|
+
const variableName = props.record.options.variableName;
|
|
26
|
+
const variable = props.variableList?.find((v) => v && v.name === variableName);
|
|
27
|
+
if (variable) {
|
|
28
|
+
variable.defaultValue = newValue;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
};
|
|
14
32
|
const mainPadding = computed(() => {
|
|
15
33
|
const tb = props.record.options?.style?.tbPadding ?? 0;
|
|
16
34
|
const lr = props.record.options?.style?.lrPadding ?? 0;
|
|
@@ -26,13 +44,13 @@ const _sfc_main = {
|
|
|
26
44
|
}, {
|
|
27
45
|
default: withCtx(() => [
|
|
28
46
|
createVNode(_component_a_form_item, {
|
|
29
|
-
label: unref(renderTextByVariables)(props.record.options.label,
|
|
47
|
+
label: unref(renderTextByVariables)(props.record.options.label, props.columnsIndex, props.variableList)
|
|
30
48
|
}, {
|
|
31
49
|
default: withCtx(() => [
|
|
32
50
|
createVNode(_component_a_input, {
|
|
33
|
-
value:
|
|
34
|
-
|
|
35
|
-
|
|
51
|
+
value: inputValue.value,
|
|
52
|
+
placeholder: props.record.options.placeholder,
|
|
53
|
+
onChange: handleInputChange
|
|
36
54
|
}, null, 8, ["value", "placeholder"])
|
|
37
55
|
]),
|
|
38
56
|
_: 1
|
|
@@ -44,7 +62,7 @@ const _sfc_main = {
|
|
|
44
62
|
};
|
|
45
63
|
}
|
|
46
64
|
};
|
|
47
|
-
const Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
65
|
+
const Input = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-eb38013e"]]);
|
|
48
66
|
export {
|
|
49
67
|
Input as default
|
|
50
68
|
};
|
|
@@ -5,8 +5,8 @@ import _export_sfc from "./sun-card-design-mobile.es27.js";
|
|
|
5
5
|
const _sfc_main = {
|
|
6
6
|
__name: "mobilePanel",
|
|
7
7
|
props: ["record", "config"],
|
|
8
|
-
emits: ["clickEvent", "fileUpdateEvent"],
|
|
9
|
-
setup(__props, { emit: __emit }) {
|
|
8
|
+
emits: ["clickEvent", "fileUpdateEvent", "clickColumnsEvent", "clickLinkEvent", "uploadEvent"],
|
|
9
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
10
10
|
const emit = __emit;
|
|
11
11
|
const props = __props;
|
|
12
12
|
adapter(props.record.list, props.config?.variableList);
|
|
@@ -20,6 +20,18 @@ const _sfc_main = {
|
|
|
20
20
|
const onClickColumns = (record) => {
|
|
21
21
|
emit("clickColumnsEvent", record);
|
|
22
22
|
};
|
|
23
|
+
const onClickLink = (link) => {
|
|
24
|
+
emit("clickLinkEvent", link);
|
|
25
|
+
};
|
|
26
|
+
const onUpload = (uploadData) => {
|
|
27
|
+
emit("uploadEvent", uploadData);
|
|
28
|
+
};
|
|
29
|
+
const getVariableData = () => {
|
|
30
|
+
return props.config?.variableList;
|
|
31
|
+
};
|
|
32
|
+
__expose({
|
|
33
|
+
getVariableData
|
|
34
|
+
});
|
|
23
35
|
function adapter(recordList = [], variableList = []) {
|
|
24
36
|
if (!Array.isArray(recordList)) return;
|
|
25
37
|
recordList.forEach((item) => {
|
|
@@ -55,6 +67,24 @@ const _sfc_main = {
|
|
|
55
67
|
});
|
|
56
68
|
}
|
|
57
69
|
}
|
|
70
|
+
if (item.type === "file") {
|
|
71
|
+
if (item.options.mode === "dynamic" && item.options.variableName) {
|
|
72
|
+
const variableItem = variableList.find(
|
|
73
|
+
(v) => v && v.name === item.options.variableName && v.type === "Array"
|
|
74
|
+
);
|
|
75
|
+
item.options.fileList = [];
|
|
76
|
+
if (variableItem && variableItem.defaultValue) {
|
|
77
|
+
const defaultValueArray = JSON.parse(variableItem.defaultValue);
|
|
78
|
+
const targetLength = defaultValueArray.length;
|
|
79
|
+
if (targetLength) {
|
|
80
|
+
const templateItem = JSON.parse(JSON.stringify(item.options.fileTemplate));
|
|
81
|
+
for (let index = 0; index < targetLength; index++) {
|
|
82
|
+
item.options.fileList.push(JSON.parse(JSON.stringify(templateItem)));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
58
88
|
});
|
|
59
89
|
}
|
|
60
90
|
return (_ctx, _cache) => {
|
|
@@ -74,14 +104,16 @@ const _sfc_main = {
|
|
|
74
104
|
key: index,
|
|
75
105
|
onClickEvent: onClick,
|
|
76
106
|
onFileUpdateEvent: onUpdated,
|
|
77
|
-
onClickColumnsEvent: onClickColumns
|
|
107
|
+
onClickColumnsEvent: onClickColumns,
|
|
108
|
+
onClickLinkEvent: onClickLink,
|
|
109
|
+
onUploadEvent: onUpload
|
|
78
110
|
}, null, 8, ["recordData", "variableList", "record"]);
|
|
79
111
|
}), 128))
|
|
80
112
|
], 4);
|
|
81
113
|
};
|
|
82
114
|
}
|
|
83
115
|
};
|
|
84
|
-
const MobilePanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
116
|
+
const MobilePanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-802cc37f"]]);
|
|
85
117
|
export {
|
|
86
118
|
MobilePanel as default
|
|
87
119
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock, createCommentVNode, openBlock, createBlock } from "vue";
|
|
1
|
+
import { useCssVars, computed, createElementBlock, createCommentVNode, openBlock, createBlock } from "vue";
|
|
2
2
|
import Title from "./sun-card-design-mobile.es3.js";
|
|
3
3
|
import Text from "./sun-card-design-mobile.es4.js";
|
|
4
4
|
import Button from "./sun-card-design-mobile.es5.js";
|
|
@@ -13,6 +13,7 @@ import Audio from "./sun-card-design-mobile.es9.js";
|
|
|
13
13
|
import Select from "./sun-card-design-mobile.es17.js";
|
|
14
14
|
import Video from "./sun-card-design-mobile.es8.js";
|
|
15
15
|
import Input from "./sun-card-design-mobile.es16.js";
|
|
16
|
+
import Textarea from "./sun-card-design-mobile.es56.js";
|
|
16
17
|
import GenerateImg from "./sun-card-design-mobile.es14.js";
|
|
17
18
|
import EnterpriseSearch from "./sun-card-design-mobile.es18.js";
|
|
18
19
|
import Table from "./sun-card-design-mobile.es19.js";
|
|
@@ -22,11 +23,11 @@ import LineChart from "./sun-card-design-mobile.es24.js";
|
|
|
22
23
|
import BarChart3D from "./sun-card-design-mobile.es21.js";
|
|
23
24
|
import PieChart3D from "./sun-card-design-mobile.es23.js";
|
|
24
25
|
import Panorama from "./sun-card-design-mobile.es13.js";
|
|
25
|
-
import SunIcon from "./sun-card-design-mobile.
|
|
26
|
-
import SingleColumn from "./sun-card-design-mobile.
|
|
27
|
-
import MultipleColumn from "./sun-card-design-mobile.
|
|
28
|
-
import MultipleLine from "./sun-card-design-mobile.
|
|
29
|
-
import GridList from "./sun-card-design-mobile.
|
|
26
|
+
import SunIcon from "./sun-card-design-mobile.es57.js";
|
|
27
|
+
import SingleColumn from "./sun-card-design-mobile.es58.js";
|
|
28
|
+
import MultipleColumn from "./sun-card-design-mobile.es59.js";
|
|
29
|
+
import MultipleLine from "./sun-card-design-mobile.es60.js";
|
|
30
|
+
import GridList from "./sun-card-design-mobile.es61.js";
|
|
30
31
|
/* empty css */
|
|
31
32
|
import _export_sfc from "./sun-card-design-mobile.es27.js";
|
|
32
33
|
const _hoisted_1 = {
|
|
@@ -36,8 +37,11 @@ const _hoisted_1 = {
|
|
|
36
37
|
const _sfc_main = {
|
|
37
38
|
__name: "formItem",
|
|
38
39
|
props: ["record", "recordData", "columnsIndex", "variableList"],
|
|
39
|
-
emits: ["clickEvent", "fileUpdateEvent", "clickColumnsEvent"],
|
|
40
|
+
emits: ["clickEvent", "fileUpdateEvent", "clickColumnsEvent", "clickLinkEvent", "uploadEvent"],
|
|
40
41
|
setup(__props, { emit: __emit }) {
|
|
42
|
+
useCssVars((_ctx) => ({
|
|
43
|
+
"v46a9ee3b": marginTop.value
|
|
44
|
+
}));
|
|
41
45
|
const props = __props;
|
|
42
46
|
const emit = __emit;
|
|
43
47
|
const onClick = (record) => {
|
|
@@ -46,9 +50,19 @@ const _sfc_main = {
|
|
|
46
50
|
const onUpdate = (record) => {
|
|
47
51
|
emit("fileUpdateEvent", record);
|
|
48
52
|
};
|
|
53
|
+
const onClickLink = (link) => {
|
|
54
|
+
emit("clickLinkEvent", link);
|
|
55
|
+
};
|
|
49
56
|
const onClickColumns = (record) => {
|
|
50
57
|
emit("clickColumnsEvent", record);
|
|
51
58
|
};
|
|
59
|
+
const onUpload = (uploadData) => {
|
|
60
|
+
emit("uploadEvent", uploadData);
|
|
61
|
+
};
|
|
62
|
+
const marginTop = computed(() => {
|
|
63
|
+
const margin = props.record?.options?.style?.marginTop ?? 0;
|
|
64
|
+
return `${margin}px`;
|
|
65
|
+
});
|
|
52
66
|
return (_ctx, _cache) => {
|
|
53
67
|
return __props.record.state !== false ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
54
68
|
__props.record.type === "title" ? (openBlock(), createBlock(Title, {
|
|
@@ -77,8 +91,9 @@ const _sfc_main = {
|
|
|
77
91
|
record: props.record,
|
|
78
92
|
columnsIndex: props.columnsIndex,
|
|
79
93
|
variableList: props.variableList,
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
onFileUpdateEvent: onUpdate,
|
|
95
|
+
onClickLinkEvent: onClickLink,
|
|
96
|
+
onUploadEvent: onUpload
|
|
82
97
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
83
98
|
__props.record.type === "upload" ? (openBlock(), createBlock(Upload, {
|
|
84
99
|
key: 4,
|
|
@@ -133,23 +148,30 @@ const _sfc_main = {
|
|
|
133
148
|
__props.record.type === "input" ? (openBlock(), createBlock(Input, {
|
|
134
149
|
key: 12,
|
|
135
150
|
record: props.record,
|
|
151
|
+
columnsIndex: props.columnsIndex,
|
|
136
152
|
variableList: props.variableList
|
|
137
|
-
}, null, 8, ["record", "variableList"])) : createCommentVNode("", true),
|
|
138
|
-
__props.record.type === "
|
|
153
|
+
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
154
|
+
__props.record.type === "textarea" ? (openBlock(), createBlock(Textarea, {
|
|
139
155
|
key: 13,
|
|
140
156
|
record: props.record,
|
|
141
157
|
columnsIndex: props.columnsIndex,
|
|
142
158
|
variableList: props.variableList
|
|
143
159
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
144
|
-
__props.record.type === "
|
|
160
|
+
__props.record.type === "generateImg" ? (openBlock(), createBlock(GenerateImg, {
|
|
145
161
|
key: 14,
|
|
146
162
|
record: props.record,
|
|
147
163
|
columnsIndex: props.columnsIndex,
|
|
164
|
+
variableList: props.variableList
|
|
165
|
+
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
166
|
+
__props.record.type === "sunIcon" ? (openBlock(), createBlock(SunIcon, {
|
|
167
|
+
key: 15,
|
|
168
|
+
record: props.record,
|
|
169
|
+
columnsIndex: props.columnsIndex,
|
|
148
170
|
variableList: props.variableList,
|
|
149
171
|
onClickEvent: onClick
|
|
150
172
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
151
173
|
__props.record.type === "grid" ? (openBlock(), createBlock(Grid, {
|
|
152
|
-
key:
|
|
174
|
+
key: 16,
|
|
153
175
|
record: props.record,
|
|
154
176
|
recordData: props.recordData,
|
|
155
177
|
columnsIndex: props.columnsIndex,
|
|
@@ -159,7 +181,7 @@ const _sfc_main = {
|
|
|
159
181
|
onClickColumnsEvent: onClickColumns
|
|
160
182
|
}, null, 8, ["record", "recordData", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
161
183
|
__props.record.type === "singleColumn" ? (openBlock(), createBlock(SingleColumn, {
|
|
162
|
-
key:
|
|
184
|
+
key: 17,
|
|
163
185
|
record: props.record,
|
|
164
186
|
recordData: props.recordData,
|
|
165
187
|
columnsIndex: props.columnsIndex,
|
|
@@ -169,7 +191,7 @@ const _sfc_main = {
|
|
|
169
191
|
onClickColumnsEvent: onClickColumns
|
|
170
192
|
}, null, 8, ["record", "recordData", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
171
193
|
__props.record.type === "multipleColumn" ? (openBlock(), createBlock(MultipleColumn, {
|
|
172
|
-
key:
|
|
194
|
+
key: 18,
|
|
173
195
|
record: props.record,
|
|
174
196
|
recordData: props.recordData,
|
|
175
197
|
columnsIndex: props.columnsIndex,
|
|
@@ -179,7 +201,7 @@ const _sfc_main = {
|
|
|
179
201
|
onClickColumnsEvent: onClickColumns
|
|
180
202
|
}, null, 8, ["record", "recordData", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
181
203
|
__props.record.type === "multipleLine" ? (openBlock(), createBlock(MultipleLine, {
|
|
182
|
-
key:
|
|
204
|
+
key: 19,
|
|
183
205
|
record: props.record,
|
|
184
206
|
recordData: props.recordData,
|
|
185
207
|
columnsIndex: props.columnsIndex,
|
|
@@ -189,7 +211,7 @@ const _sfc_main = {
|
|
|
189
211
|
onClickColumnsEvent: onClickColumns
|
|
190
212
|
}, null, 8, ["record", "recordData", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
191
213
|
__props.record.type === "gridList" ? (openBlock(), createBlock(GridList, {
|
|
192
|
-
key:
|
|
214
|
+
key: 20,
|
|
193
215
|
record: props.record,
|
|
194
216
|
recordData: props.recordData,
|
|
195
217
|
columnsIndex: props.columnsIndex,
|
|
@@ -199,49 +221,49 @@ const _sfc_main = {
|
|
|
199
221
|
onClickColumnsEvent: onClickColumns
|
|
200
222
|
}, null, 8, ["record", "recordData", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
201
223
|
__props.record.type === "enterpriseSearch" ? (openBlock(), createBlock(EnterpriseSearch, {
|
|
202
|
-
key:
|
|
224
|
+
key: 21,
|
|
203
225
|
record: props.record,
|
|
204
226
|
columnsIndex: props.columnsIndex,
|
|
205
227
|
variableList: props.variableList
|
|
206
228
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
207
229
|
__props.record.type === "table" ? (openBlock(), createBlock(Table, {
|
|
208
|
-
key:
|
|
230
|
+
key: 22,
|
|
209
231
|
record: props.record,
|
|
210
232
|
columnsIndex: props.columnsIndex,
|
|
211
233
|
variableList: props.variableList
|
|
212
234
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
213
235
|
__props.record.type === "barChart" ? (openBlock(), createBlock(BarChart, {
|
|
214
|
-
key:
|
|
236
|
+
key: 23,
|
|
215
237
|
record: props.record,
|
|
216
238
|
columnsIndex: props.columnsIndex,
|
|
217
239
|
variableList: props.variableList
|
|
218
240
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
219
241
|
__props.record.type === "pieChart" ? (openBlock(), createBlock(PieChart, {
|
|
220
|
-
key:
|
|
242
|
+
key: 24,
|
|
221
243
|
record: props.record,
|
|
222
244
|
columnsIndex: props.columnsIndex,
|
|
223
245
|
variableList: props.variableList
|
|
224
246
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
225
247
|
__props.record.type === "lineChart" ? (openBlock(), createBlock(LineChart, {
|
|
226
|
-
key:
|
|
248
|
+
key: 25,
|
|
227
249
|
record: props.record,
|
|
228
250
|
columnsIndex: props.columnsIndex,
|
|
229
251
|
variableList: props.variableList
|
|
230
252
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
231
253
|
__props.record.type === "barChart3D" ? (openBlock(), createBlock(BarChart3D, {
|
|
232
|
-
key:
|
|
254
|
+
key: 26,
|
|
233
255
|
record: props.record,
|
|
234
256
|
columnsIndex: props.columnsIndex,
|
|
235
257
|
variableList: props.variableList
|
|
236
258
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
237
259
|
__props.record.type === "pieChart3D" ? (openBlock(), createBlock(PieChart3D, {
|
|
238
|
-
key:
|
|
260
|
+
key: 27,
|
|
239
261
|
record: props.record,
|
|
240
262
|
columnsIndex: props.columnsIndex,
|
|
241
263
|
variableList: props.variableList
|
|
242
264
|
}, null, 8, ["record", "columnsIndex", "variableList"])) : createCommentVNode("", true),
|
|
243
265
|
__props.record.type === "panorama" ? (openBlock(), createBlock(Panorama, {
|
|
244
|
-
key:
|
|
266
|
+
key: 28,
|
|
245
267
|
record: props.record,
|
|
246
268
|
columnsIndex: props.columnsIndex,
|
|
247
269
|
variableList: props.variableList
|
|
@@ -250,7 +272,7 @@ const _sfc_main = {
|
|
|
250
272
|
};
|
|
251
273
|
}
|
|
252
274
|
};
|
|
253
|
-
const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
275
|
+
const FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8af7e919"]]);
|
|
254
276
|
export {
|
|
255
277
|
FormItem as default
|
|
256
278
|
};
|
|
@@ -18,18 +18,20 @@ const _sfc_main = {
|
|
|
18
18
|
emits: ["clickEvent"],
|
|
19
19
|
setup(__props, { emit: __emit }) {
|
|
20
20
|
useCssVars((_ctx) => ({
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
21
|
+
"v70234d73": mainPadding.value,
|
|
22
|
+
"v77825c27": mainJustifyContent.value,
|
|
23
|
+
"v65d2b24d": lineWidth.value,
|
|
24
|
+
"v75b8a177": lineBorderRadius.value,
|
|
25
|
+
"d3ad2756": lineMarginRight.value,
|
|
26
|
+
"v77d6e5f2": lineBackground.value,
|
|
27
|
+
"v3ab49d80": lineHeight.value,
|
|
28
|
+
"dc1d0b5e": textColor.value,
|
|
29
|
+
"v615f717c": textFontSize.value,
|
|
30
|
+
"dc583c1a": textAlign.value,
|
|
31
|
+
"v3e631282": textDecoration.value,
|
|
32
|
+
"v932df904": textIndent.value,
|
|
33
|
+
"v4ff6c00d": textLineHeight.value,
|
|
34
|
+
"v805803aa": textLetterSpacing.value
|
|
33
35
|
}));
|
|
34
36
|
const props = __props;
|
|
35
37
|
const emit = __emit;
|
|
@@ -83,6 +85,8 @@ const _sfc_main = {
|
|
|
83
85
|
const textAlign = computed(() => props.record.options.style.textAlign);
|
|
84
86
|
const textDecoration = computed(() => props.record.options.style.textDecoration);
|
|
85
87
|
const textIndent = computed(() => props.record.options.style.textIndent + "em");
|
|
88
|
+
const textLineHeight = computed(() => props.record.options.style.lineHeight);
|
|
89
|
+
const textLetterSpacing = computed(() => props.record.options.style.letterSpacing + "px");
|
|
86
90
|
return (_ctx, _cache) => {
|
|
87
91
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
88
92
|
props.record.options.hasLine ? (openBlock(), createElementBlock("div", _hoisted_2)) : createCommentVNode("", true),
|
|
@@ -99,7 +103,7 @@ const _sfc_main = {
|
|
|
99
103
|
};
|
|
100
104
|
}
|
|
101
105
|
};
|
|
102
|
-
const Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
106
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0f119d8f"]]);
|
|
103
107
|
export {
|
|
104
108
|
Text as default
|
|
105
109
|
};
|