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,280 +0,0 @@
|
|
|
1
|
-
import { ref, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, withCtx, createBlock, createTextVNode, Fragment, renderList } from "vue";
|
|
2
|
-
import OpenVariable from "./sun-card-designer.es91.js";
|
|
3
|
-
import EditInput from "./sun-card-designer.es92.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
6
|
-
const _hoisted_1 = { class: "select-pes" };
|
|
7
|
-
const _hoisted_2 = { class: "slider-row" };
|
|
8
|
-
const _hoisted_3 = { class: "slider-row" };
|
|
9
|
-
const _sfc_main = {
|
|
10
|
-
__name: "selectBasePes",
|
|
11
|
-
props: ["record"],
|
|
12
|
-
setup(__props) {
|
|
13
|
-
const props = __props;
|
|
14
|
-
const editInputRef = ref();
|
|
15
|
-
const editInputCopyRef = ref();
|
|
16
|
-
const varOptions = ref([]);
|
|
17
|
-
const modeOptions = ref([
|
|
18
|
-
{ label: "固定", value: "fixed" },
|
|
19
|
-
{ label: "动态", value: "auto" }
|
|
20
|
-
]);
|
|
21
|
-
const selectTreeChange = (params) => {
|
|
22
|
-
const { item, node } = params;
|
|
23
|
-
editInputRef.value.insertToken(`{${item.name}#${node}}`);
|
|
24
|
-
};
|
|
25
|
-
const selectChange = (record) => {
|
|
26
|
-
editInputRef.value.insertToken(`{${record.name}}`);
|
|
27
|
-
};
|
|
28
|
-
const selectTreeChangeCopy = (params) => {
|
|
29
|
-
const { item, node } = params;
|
|
30
|
-
editInputCopyRef.value.insertToken(`{${item.name}#${node}}`);
|
|
31
|
-
};
|
|
32
|
-
const selectChangeCopy = (record) => {
|
|
33
|
-
editInputCopyRef.value.insertToken(`{${record.name}}`);
|
|
34
|
-
};
|
|
35
|
-
const onChange = () => {
|
|
36
|
-
props.record.options.optionsFixed = [];
|
|
37
|
-
props.record.options.optionsAuto = null;
|
|
38
|
-
};
|
|
39
|
-
const addOption = () => {
|
|
40
|
-
if (!Array.isArray(props.record.options.optionsFixed)) props.record.options.optionsFixed = [];
|
|
41
|
-
props.record.options.optionsFixed.push({ label: "", value: "" });
|
|
42
|
-
};
|
|
43
|
-
const removeOption = (idx) => {
|
|
44
|
-
if (!Array.isArray(props.record.options.optionsFixed)) return;
|
|
45
|
-
props.record.options.optionsFixed.splice(idx, 1);
|
|
46
|
-
};
|
|
47
|
-
return (_ctx, _cache) => {
|
|
48
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
49
|
-
const _component_a_input = resolveComponent("a-input");
|
|
50
|
-
const _component_a_radio = resolveComponent("a-radio");
|
|
51
|
-
const _component_a_radio_group = resolveComponent("a-radio-group");
|
|
52
|
-
const _component_a_segmented = resolveComponent("a-segmented");
|
|
53
|
-
const _component_a_button = resolveComponent("a-button");
|
|
54
|
-
const _component_a_select = resolveComponent("a-select");
|
|
55
|
-
const _component_a_col = resolveComponent("a-col");
|
|
56
|
-
const _component_a_row = resolveComponent("a-row");
|
|
57
|
-
const _component_a_form = resolveComponent("a-form");
|
|
58
|
-
const _component_a_divider = resolveComponent("a-divider");
|
|
59
|
-
const _component_a_slider = resolveComponent("a-slider");
|
|
60
|
-
const _component_a_input_number = resolveComponent("a-input-number");
|
|
61
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
62
|
-
_cache[12] || (_cache[12] = createElementVNode("div", { class: "title" }, "数据", -1)),
|
|
63
|
-
createVNode(_component_a_form, { layout: "vertical" }, {
|
|
64
|
-
default: withCtx(() => [
|
|
65
|
-
createVNode(_component_a_row, { gutter: [16, 16] }, {
|
|
66
|
-
default: withCtx(() => [
|
|
67
|
-
createVNode(_component_a_col, { span: 24 }, {
|
|
68
|
-
default: withCtx(() => [
|
|
69
|
-
createVNode(_component_a_form_item, { label: "标签" }, {
|
|
70
|
-
default: withCtx(() => [
|
|
71
|
-
createVNode(OpenVariable, {
|
|
72
|
-
onOnSelect: selectChange,
|
|
73
|
-
onOnSelectTree: selectTreeChange
|
|
74
|
-
}),
|
|
75
|
-
createVNode(EditInput, {
|
|
76
|
-
ref_key: "editInputRef",
|
|
77
|
-
ref: editInputRef,
|
|
78
|
-
record: props.record.options,
|
|
79
|
-
filed: "label"
|
|
80
|
-
}, null, 8, ["record"])
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
}),
|
|
84
|
-
createVNode(_component_a_form_item, { label: "占位符" }, {
|
|
85
|
-
default: withCtx(() => [
|
|
86
|
-
createVNode(_component_a_input, {
|
|
87
|
-
value: props.record.options.placeholder,
|
|
88
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.placeholder = $event),
|
|
89
|
-
placeholder: "请输入"
|
|
90
|
-
}, null, 8, ["value"])
|
|
91
|
-
]),
|
|
92
|
-
_: 1
|
|
93
|
-
}),
|
|
94
|
-
createVNode(_component_a_form_item, { label: "默认值" }, {
|
|
95
|
-
default: withCtx(() => [
|
|
96
|
-
createVNode(OpenVariable, {
|
|
97
|
-
onOnSelect: selectChangeCopy,
|
|
98
|
-
onOnSelectTree: selectTreeChangeCopy
|
|
99
|
-
}),
|
|
100
|
-
createVNode(EditInput, {
|
|
101
|
-
ref_key: "editInputCopyRef",
|
|
102
|
-
ref: editInputCopyRef,
|
|
103
|
-
record: props.record.options,
|
|
104
|
-
minRows: "1"
|
|
105
|
-
}, null, 8, ["record"])
|
|
106
|
-
]),
|
|
107
|
-
_: 1
|
|
108
|
-
}),
|
|
109
|
-
createVNode(_component_a_form_item, { label: "对齐方式" }, {
|
|
110
|
-
default: withCtx(() => [
|
|
111
|
-
createVNode(_component_a_radio_group, {
|
|
112
|
-
value: props.record.options.flex,
|
|
113
|
-
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => props.record.options.flex = $event)
|
|
114
|
-
}, {
|
|
115
|
-
default: withCtx(() => [
|
|
116
|
-
createVNode(_component_a_radio, { value: "vertical" }, {
|
|
117
|
-
default: withCtx(() => [..._cache[8] || (_cache[8] = [
|
|
118
|
-
createTextVNode("垂直", -1)
|
|
119
|
-
])]),
|
|
120
|
-
_: 1
|
|
121
|
-
}),
|
|
122
|
-
createVNode(_component_a_radio, { value: "horizontal" }, {
|
|
123
|
-
default: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
124
|
-
createTextVNode("水平", -1)
|
|
125
|
-
])]),
|
|
126
|
-
_: 1
|
|
127
|
-
})
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}, 8, ["value"])
|
|
131
|
-
]),
|
|
132
|
-
_: 1
|
|
133
|
-
}),
|
|
134
|
-
createVNode(_component_a_form_item, { label: "数据源" }, {
|
|
135
|
-
default: withCtx(() => [
|
|
136
|
-
createVNode(_component_a_segmented, {
|
|
137
|
-
block: "",
|
|
138
|
-
value: props.record.options.optionsMode,
|
|
139
|
-
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => props.record.options.optionsMode = $event),
|
|
140
|
-
options: modeOptions.value,
|
|
141
|
-
onChange
|
|
142
|
-
}, null, 8, ["value", "options"])
|
|
143
|
-
]),
|
|
144
|
-
_: 1
|
|
145
|
-
}),
|
|
146
|
-
props.record.options.optionsMode !== "auto" ? (openBlock(), createBlock(_component_a_form_item, {
|
|
147
|
-
key: 0,
|
|
148
|
-
label: ""
|
|
149
|
-
}, {
|
|
150
|
-
default: withCtx(() => [
|
|
151
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.record.options.optionsFixed, (opt, idx) => {
|
|
152
|
-
return openBlock(), createElementBlock("div", {
|
|
153
|
-
class: "option-line",
|
|
154
|
-
key: idx
|
|
155
|
-
}, [
|
|
156
|
-
createVNode(_component_a_input, {
|
|
157
|
-
value: opt.label,
|
|
158
|
-
"onUpdate:value": ($event) => opt.label = $event,
|
|
159
|
-
placeholder: "标签",
|
|
160
|
-
style: { "width": "45%" }
|
|
161
|
-
}, null, 8, ["value", "onUpdate:value"]),
|
|
162
|
-
createVNode(_component_a_input, {
|
|
163
|
-
value: opt.value,
|
|
164
|
-
"onUpdate:value": ($event) => opt.value = $event,
|
|
165
|
-
placeholder: "值",
|
|
166
|
-
style: { "width": "45%", "margin-left": "8px" }
|
|
167
|
-
}, null, 8, ["value", "onUpdate:value"]),
|
|
168
|
-
createVNode(_component_a_button, {
|
|
169
|
-
type: "link",
|
|
170
|
-
danger: "",
|
|
171
|
-
onClick: ($event) => removeOption(idx)
|
|
172
|
-
}, {
|
|
173
|
-
default: withCtx(() => [..._cache[10] || (_cache[10] = [
|
|
174
|
-
createTextVNode("删除", -1)
|
|
175
|
-
])]),
|
|
176
|
-
_: 1
|
|
177
|
-
}, 8, ["onClick"])
|
|
178
|
-
]);
|
|
179
|
-
}), 128)),
|
|
180
|
-
createVNode(_component_a_button, {
|
|
181
|
-
block: "",
|
|
182
|
-
type: "dashed",
|
|
183
|
-
onClick: addOption
|
|
184
|
-
}, {
|
|
185
|
-
default: withCtx(() => [..._cache[11] || (_cache[11] = [
|
|
186
|
-
createTextVNode("新增选项", -1)
|
|
187
|
-
])]),
|
|
188
|
-
_: 1
|
|
189
|
-
})
|
|
190
|
-
]),
|
|
191
|
-
_: 1
|
|
192
|
-
})) : (openBlock(), createBlock(_component_a_form_item, {
|
|
193
|
-
key: 1,
|
|
194
|
-
label: ""
|
|
195
|
-
}, {
|
|
196
|
-
default: withCtx(() => [
|
|
197
|
-
createVNode(_component_a_select, {
|
|
198
|
-
value: props.record.options.optionsAuto,
|
|
199
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => props.record.options.optionsAuto = $event),
|
|
200
|
-
placeholder: "请选择变量",
|
|
201
|
-
style: { "width": "100%" },
|
|
202
|
-
options: varOptions.value
|
|
203
|
-
}, null, 8, ["value", "options"])
|
|
204
|
-
]),
|
|
205
|
-
_: 1
|
|
206
|
-
}))
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
})
|
|
210
|
-
]),
|
|
211
|
-
_: 1
|
|
212
|
-
})
|
|
213
|
-
]),
|
|
214
|
-
_: 1
|
|
215
|
-
}),
|
|
216
|
-
createVNode(_component_a_divider, { style: { "margin-top": "0" } }),
|
|
217
|
-
_cache[13] || (_cache[13] = createElementVNode("div", { class: "title" }, "样式", -1)),
|
|
218
|
-
createVNode(_component_a_form, { layout: "vertical" }, {
|
|
219
|
-
default: withCtx(() => [
|
|
220
|
-
createVNode(_component_a_row, { gutter: [16, 16] }, {
|
|
221
|
-
default: withCtx(() => [
|
|
222
|
-
createVNode(_component_a_col, { span: 24 }, {
|
|
223
|
-
default: withCtx(() => [
|
|
224
|
-
createVNode(_component_a_form_item, { label: "上下边距" }, {
|
|
225
|
-
default: withCtx(() => [
|
|
226
|
-
createElementVNode("div", _hoisted_2, [
|
|
227
|
-
createVNode(_component_a_slider, {
|
|
228
|
-
min: 0,
|
|
229
|
-
max: 10,
|
|
230
|
-
value: props.record.options.style.tbPadding,
|
|
231
|
-
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => props.record.options.style.tbPadding = $event),
|
|
232
|
-
style: { "flex": "1", "margin-right": "12px" }
|
|
233
|
-
}, null, 8, ["value"]),
|
|
234
|
-
createVNode(_component_a_input_number, {
|
|
235
|
-
min: 0,
|
|
236
|
-
max: 10,
|
|
237
|
-
value: props.record.options.style.tbPadding,
|
|
238
|
-
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => props.record.options.style.tbPadding = $event)
|
|
239
|
-
}, null, 8, ["value"])
|
|
240
|
-
])
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
}),
|
|
244
|
-
createVNode(_component_a_form_item, { label: "左右边距" }, {
|
|
245
|
-
default: withCtx(() => [
|
|
246
|
-
createElementVNode("div", _hoisted_3, [
|
|
247
|
-
createVNode(_component_a_slider, {
|
|
248
|
-
min: 0,
|
|
249
|
-
max: 10,
|
|
250
|
-
value: props.record.options.style.lrPadding,
|
|
251
|
-
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => props.record.options.style.lrPadding = $event),
|
|
252
|
-
style: { "flex": "1", "margin-right": "12px" }
|
|
253
|
-
}, null, 8, ["value"]),
|
|
254
|
-
createVNode(_component_a_input_number, {
|
|
255
|
-
min: 0,
|
|
256
|
-
max: 10,
|
|
257
|
-
value: props.record.options.style.lrPadding,
|
|
258
|
-
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => props.record.options.style.lrPadding = $event)
|
|
259
|
-
}, null, 8, ["value"])
|
|
260
|
-
])
|
|
261
|
-
]),
|
|
262
|
-
_: 1
|
|
263
|
-
})
|
|
264
|
-
]),
|
|
265
|
-
_: 1
|
|
266
|
-
})
|
|
267
|
-
]),
|
|
268
|
-
_: 1
|
|
269
|
-
})
|
|
270
|
-
]),
|
|
271
|
-
_: 1
|
|
272
|
-
})
|
|
273
|
-
]);
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
const SelectBasePes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c915df7"]]);
|
|
278
|
-
export {
|
|
279
|
-
SelectBasePes as default
|
|
280
|
-
};
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { ref, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, withCtx, createTextVNode } from "vue";
|
|
2
|
-
import OpenVariable from "./sun-card-designer.es91.js";
|
|
3
|
-
import EditInput from "./sun-card-designer.es92.js";
|
|
4
|
-
/* empty css */
|
|
5
|
-
import _export_sfc from "./sun-card-designer.es16.js";
|
|
6
|
-
const _hoisted_1 = { class: "input-pes" };
|
|
7
|
-
const _hoisted_2 = { class: "slider-row" };
|
|
8
|
-
const _hoisted_3 = { class: "slider-row" };
|
|
9
|
-
const _sfc_main = {
|
|
10
|
-
__name: "enterpriseSearchBasePes",
|
|
11
|
-
props: ["record"],
|
|
12
|
-
setup(__props) {
|
|
13
|
-
const props = __props;
|
|
14
|
-
const editInputRef = ref();
|
|
15
|
-
const selectTreeChange = (params) => {
|
|
16
|
-
const { item, node } = params;
|
|
17
|
-
try {
|
|
18
|
-
props.record.options.label = `{${item.name}#${node}}`;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
console.error("解析失败");
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const selectChange = (record) => {
|
|
24
|
-
editInputRef.value.insertToken(`{${record.name}}`);
|
|
25
|
-
};
|
|
26
|
-
return (_ctx, _cache) => {
|
|
27
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
28
|
-
const _component_a_input = resolveComponent("a-input");
|
|
29
|
-
const _component_a_radio = resolveComponent("a-radio");
|
|
30
|
-
const _component_a_radio_group = resolveComponent("a-radio-group");
|
|
31
|
-
const _component_a_col = resolveComponent("a-col");
|
|
32
|
-
const _component_a_row = resolveComponent("a-row");
|
|
33
|
-
const _component_a_form = resolveComponent("a-form");
|
|
34
|
-
const _component_a_divider = resolveComponent("a-divider");
|
|
35
|
-
const _component_a_slider = resolveComponent("a-slider");
|
|
36
|
-
const _component_a_input_number = resolveComponent("a-input-number");
|
|
37
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
38
|
-
_cache[8] || (_cache[8] = createElementVNode("div", { class: "title" }, "数据", -1)),
|
|
39
|
-
createVNode(_component_a_form, { layout: "vertical" }, {
|
|
40
|
-
default: withCtx(() => [
|
|
41
|
-
createVNode(_component_a_row, { gutter: [16, 16] }, {
|
|
42
|
-
default: withCtx(() => [
|
|
43
|
-
createVNode(_component_a_col, { span: 24 }, {
|
|
44
|
-
default: withCtx(() => [
|
|
45
|
-
createVNode(_component_a_form_item, { label: "标签" }, {
|
|
46
|
-
default: withCtx(() => [
|
|
47
|
-
createVNode(OpenVariable, {
|
|
48
|
-
onOnSelect: selectChange,
|
|
49
|
-
onOnSelectTree: selectTreeChange
|
|
50
|
-
}),
|
|
51
|
-
createVNode(EditInput, {
|
|
52
|
-
ref_key: "editInputRef",
|
|
53
|
-
ref: editInputRef,
|
|
54
|
-
record: props.record.options,
|
|
55
|
-
filed: "label"
|
|
56
|
-
}, null, 8, ["record"])
|
|
57
|
-
]),
|
|
58
|
-
_: 1
|
|
59
|
-
}),
|
|
60
|
-
createVNode(_component_a_form_item, { label: "占位符" }, {
|
|
61
|
-
default: withCtx(() => [
|
|
62
|
-
createVNode(_component_a_input, {
|
|
63
|
-
value: props.record.options.placeholder,
|
|
64
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.placeholder = $event),
|
|
65
|
-
placeholder: "请输入"
|
|
66
|
-
}, null, 8, ["value"])
|
|
67
|
-
]),
|
|
68
|
-
_: 1
|
|
69
|
-
}),
|
|
70
|
-
createVNode(_component_a_form_item, { label: "对齐方式" }, {
|
|
71
|
-
default: withCtx(() => [
|
|
72
|
-
createVNode(_component_a_radio_group, {
|
|
73
|
-
value: props.record.options.flex,
|
|
74
|
-
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => props.record.options.flex = $event)
|
|
75
|
-
}, {
|
|
76
|
-
default: withCtx(() => [
|
|
77
|
-
createVNode(_component_a_radio, { value: "vertical" }, {
|
|
78
|
-
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
79
|
-
createTextVNode("垂直", -1)
|
|
80
|
-
])]),
|
|
81
|
-
_: 1
|
|
82
|
-
}),
|
|
83
|
-
createVNode(_component_a_radio, { value: "horizontal" }, {
|
|
84
|
-
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
85
|
-
createTextVNode("水平", -1)
|
|
86
|
-
])]),
|
|
87
|
-
_: 1
|
|
88
|
-
})
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
}, 8, ["value"])
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
})
|
|
95
|
-
]),
|
|
96
|
-
_: 1
|
|
97
|
-
})
|
|
98
|
-
]),
|
|
99
|
-
_: 1
|
|
100
|
-
})
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}),
|
|
104
|
-
createVNode(_component_a_divider, { style: { "margin-top": "0" } }),
|
|
105
|
-
_cache[9] || (_cache[9] = createElementVNode("div", { class: "title" }, "样式", -1)),
|
|
106
|
-
createVNode(_component_a_form, { layout: "vertical" }, {
|
|
107
|
-
default: withCtx(() => [
|
|
108
|
-
createVNode(_component_a_row, { gutter: [16, 16] }, {
|
|
109
|
-
default: withCtx(() => [
|
|
110
|
-
createVNode(_component_a_col, { span: 24 }, {
|
|
111
|
-
default: withCtx(() => [
|
|
112
|
-
createVNode(_component_a_form_item, { label: "上下边距" }, {
|
|
113
|
-
default: withCtx(() => [
|
|
114
|
-
createElementVNode("div", _hoisted_2, [
|
|
115
|
-
createVNode(_component_a_slider, {
|
|
116
|
-
min: 0,
|
|
117
|
-
max: 10,
|
|
118
|
-
value: props.record.options.style.tbPadding,
|
|
119
|
-
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => props.record.options.style.tbPadding = $event),
|
|
120
|
-
style: { "flex": "1", "margin-right": "12px" }
|
|
121
|
-
}, null, 8, ["value"]),
|
|
122
|
-
createVNode(_component_a_input_number, {
|
|
123
|
-
min: 0,
|
|
124
|
-
max: 10,
|
|
125
|
-
value: props.record.options.style.tbPadding,
|
|
126
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => props.record.options.style.tbPadding = $event)
|
|
127
|
-
}, null, 8, ["value"])
|
|
128
|
-
])
|
|
129
|
-
]),
|
|
130
|
-
_: 1
|
|
131
|
-
}),
|
|
132
|
-
createVNode(_component_a_form_item, { label: "左右边距" }, {
|
|
133
|
-
default: withCtx(() => [
|
|
134
|
-
createElementVNode("div", _hoisted_3, [
|
|
135
|
-
createVNode(_component_a_slider, {
|
|
136
|
-
min: 0,
|
|
137
|
-
max: 10,
|
|
138
|
-
value: props.record.options.style.lrPadding,
|
|
139
|
-
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => props.record.options.style.lrPadding = $event),
|
|
140
|
-
style: { "flex": "1", "margin-right": "12px" }
|
|
141
|
-
}, null, 8, ["value"]),
|
|
142
|
-
createVNode(_component_a_input_number, {
|
|
143
|
-
min: 0,
|
|
144
|
-
max: 10,
|
|
145
|
-
value: props.record.options.style.lrPadding,
|
|
146
|
-
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => props.record.options.style.lrPadding = $event)
|
|
147
|
-
}, null, 8, ["value"])
|
|
148
|
-
])
|
|
149
|
-
]),
|
|
150
|
-
_: 1
|
|
151
|
-
})
|
|
152
|
-
]),
|
|
153
|
-
_: 1
|
|
154
|
-
})
|
|
155
|
-
]),
|
|
156
|
-
_: 1
|
|
157
|
-
})
|
|
158
|
-
]),
|
|
159
|
-
_: 1
|
|
160
|
-
})
|
|
161
|
-
]);
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
const EnterpriseSearchPes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c9a74e7a"]]);
|
|
166
|
-
export {
|
|
167
|
-
EnterpriseSearchPes as default
|
|
168
|
-
};
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { ref, onMounted, computed, resolveComponent, createElementBlock, openBlock, createElementVNode, createVNode, withCtx, createBlock, createCommentVNode, unref, createTextVNode, Fragment, renderList } from "vue";
|
|
2
|
-
import { Vue3JsonEditor } from "vue3-json-editor";
|
|
3
|
-
import { DeleteOutlined } from "@ant-design/icons-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 = { class: "table-pes" };
|
|
8
|
-
const _hoisted_2 = {
|
|
9
|
-
key: 0,
|
|
10
|
-
style: { "margin-top": "12px" }
|
|
11
|
-
};
|
|
12
|
-
const _sfc_main = {
|
|
13
|
-
__name: "tableBasePes",
|
|
14
|
-
props: ["record", "sourceData"],
|
|
15
|
-
setup(__props) {
|
|
16
|
-
const cardManageStore = useCardManageStore();
|
|
17
|
-
const props = __props;
|
|
18
|
-
const selectValue = ref(null);
|
|
19
|
-
onMounted(() => {
|
|
20
|
-
if (typeof props.record.options.defaultValue === "string") {
|
|
21
|
-
selectValue.value = props.record.options.defaultValue;
|
|
22
|
-
} else {
|
|
23
|
-
selectValue.value = null;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
const selectOptions = computed(() => {
|
|
27
|
-
return (cardManageStore.variableList || []).filter((e) => e.type === "Array").map((e) => ({
|
|
28
|
-
label: e.name,
|
|
29
|
-
value: e.name
|
|
30
|
-
}));
|
|
31
|
-
});
|
|
32
|
-
const onJsonChange = (val) => {
|
|
33
|
-
props.record.options.defaultValue = val;
|
|
34
|
-
};
|
|
35
|
-
const onChangeMode = (val) => {
|
|
36
|
-
if (val === "static") {
|
|
37
|
-
props.record.options.columns = [
|
|
38
|
-
{
|
|
39
|
-
title: "列1",
|
|
40
|
-
dataIndex: "now1",
|
|
41
|
-
align: "left"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
title: "列2",
|
|
45
|
-
dataIndex: "now2",
|
|
46
|
-
align: "left"
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
props.record.options.defaultValue = [{
|
|
50
|
-
now1: "now1",
|
|
51
|
-
now2: "now2"
|
|
52
|
-
}];
|
|
53
|
-
selectValue.value = null;
|
|
54
|
-
} else {
|
|
55
|
-
props.record.options.columns = [];
|
|
56
|
-
props.record.options.defaultValue = "";
|
|
57
|
-
selectValue.value = null;
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
const onChange = (val) => {
|
|
61
|
-
props.record.options.defaultValue = val;
|
|
62
|
-
const v = (cardManageStore.variableList || []).find((e) => e.name === val);
|
|
63
|
-
let keys = [];
|
|
64
|
-
try {
|
|
65
|
-
const arr = v && (typeof v.defaultValue === "string" ? JSON.parse(v.defaultValue) : v.defaultValue);
|
|
66
|
-
if (Array.isArray(arr) && arr.length && typeof arr[0] === "object") {
|
|
67
|
-
keys = Object.keys(arr[0]);
|
|
68
|
-
}
|
|
69
|
-
} catch (e) {
|
|
70
|
-
}
|
|
71
|
-
props.record.options.columns = keys.map((k) => ({ title: `表头${k}`, dataIndex: k, align: "left" }));
|
|
72
|
-
};
|
|
73
|
-
const fieldOptions = computed(() => {
|
|
74
|
-
if (typeof props.record?.options?.defaultValue === "string") {
|
|
75
|
-
const v = (cardManageStore.variableList || []).find((e) => e.name === props.record.options.defaultValue);
|
|
76
|
-
try {
|
|
77
|
-
const arr = v && (typeof v.defaultValue === "string" ? JSON.parse(v.defaultValue) : v.defaultValue);
|
|
78
|
-
const first2 = Array.isArray(arr) ? arr[0] : null;
|
|
79
|
-
if (!first2 || typeof first2 !== "object") return [];
|
|
80
|
-
return Object.keys(first2).map((k) => ({ label: k, value: k }));
|
|
81
|
-
} catch (e) {
|
|
82
|
-
return [];
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
const first = Array.isArray(props.record?.options?.defaultValue) ? props.record.options.defaultValue[0] : null;
|
|
86
|
-
if (!first || typeof first !== "object") return [];
|
|
87
|
-
return Object.keys(first).map((k) => ({ label: k, value: k }));
|
|
88
|
-
});
|
|
89
|
-
const getFieldOptions = (index) => {
|
|
90
|
-
const selected = (props.record.options.columns || []).map((c, i) => i === index ? null : c.dataIndex).filter(Boolean);
|
|
91
|
-
return fieldOptions.value.filter(
|
|
92
|
-
(opt) => !selected.includes(opt.value) || opt.value === props.record.options.columns[index]?.dataIndex
|
|
93
|
-
);
|
|
94
|
-
};
|
|
95
|
-
const ensureColumns = () => {
|
|
96
|
-
if (!props.record.options.columns) props.record.options.columns = [];
|
|
97
|
-
};
|
|
98
|
-
const addColumn = () => {
|
|
99
|
-
ensureColumns();
|
|
100
|
-
props.record.options.columns.push({ title: "", dataIndex: void 0, align: "left" });
|
|
101
|
-
};
|
|
102
|
-
const removeColumn = (index) => {
|
|
103
|
-
ensureColumns();
|
|
104
|
-
props.record.options.columns.splice(index, 1);
|
|
105
|
-
};
|
|
106
|
-
const modeOptions = ref([
|
|
107
|
-
{
|
|
108
|
-
value: "static",
|
|
109
|
-
label: "静态"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
value: "dynamic",
|
|
113
|
-
label: "动态"
|
|
114
|
-
}
|
|
115
|
-
]);
|
|
116
|
-
return (_ctx, _cache) => {
|
|
117
|
-
const _component_a_segmented = resolveComponent("a-segmented");
|
|
118
|
-
const _component_a_select = resolveComponent("a-select");
|
|
119
|
-
const _component_a_form_item = resolveComponent("a-form-item");
|
|
120
|
-
const _component_a_button = resolveComponent("a-button");
|
|
121
|
-
const _component_a_input = resolveComponent("a-input");
|
|
122
|
-
const _component_a_col = resolveComponent("a-col");
|
|
123
|
-
const _component_a_row = resolveComponent("a-row");
|
|
124
|
-
const _component_a_form = resolveComponent("a-form");
|
|
125
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
126
|
-
_cache[4] || (_cache[4] = createElementVNode("div", { class: "title" }, "数据", -1)),
|
|
127
|
-
createVNode(_component_a_form, { layout: "vertical" }, {
|
|
128
|
-
default: withCtx(() => [
|
|
129
|
-
createVNode(_component_a_row, { gutter: [16, 16] }, {
|
|
130
|
-
default: withCtx(() => [
|
|
131
|
-
createVNode(_component_a_col, { span: 24 }, {
|
|
132
|
-
default: withCtx(() => [
|
|
133
|
-
createVNode(_component_a_segmented, {
|
|
134
|
-
block: "",
|
|
135
|
-
value: props.record.options.mode,
|
|
136
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => props.record.options.mode = $event),
|
|
137
|
-
options: modeOptions.value,
|
|
138
|
-
style: { "margin-bottom": "10px" },
|
|
139
|
-
onChange: onChangeMode
|
|
140
|
-
}, null, 8, ["value", "options"]),
|
|
141
|
-
createVNode(_component_a_form_item, { label: "数据源" }, {
|
|
142
|
-
default: withCtx(() => [
|
|
143
|
-
props.record.options.mode === "static" ? (openBlock(), createBlock(unref(Vue3JsonEditor), {
|
|
144
|
-
key: 0,
|
|
145
|
-
mode: "code",
|
|
146
|
-
"show-btns": false,
|
|
147
|
-
expandedOnStart: false,
|
|
148
|
-
modelValue: props.record.options.defaultValue,
|
|
149
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => props.record.options.defaultValue = $event),
|
|
150
|
-
onJsonChange
|
|
151
|
-
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
152
|
-
props.record.options.mode === "dynamic" ? (openBlock(), createBlock(_component_a_select, {
|
|
153
|
-
key: 1,
|
|
154
|
-
value: selectValue.value,
|
|
155
|
-
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => selectValue.value = $event),
|
|
156
|
-
options: selectOptions.value,
|
|
157
|
-
onChange
|
|
158
|
-
}, null, 8, ["value", "options"])) : createCommentVNode("", true)
|
|
159
|
-
]),
|
|
160
|
-
_: 1
|
|
161
|
-
}),
|
|
162
|
-
createVNode(_component_a_form_item, { label: "列配置" }, {
|
|
163
|
-
default: withCtx(() => [
|
|
164
|
-
createElementVNode("div", null, [
|
|
165
|
-
createVNode(_component_a_button, {
|
|
166
|
-
type: "dashed",
|
|
167
|
-
onClick: addColumn
|
|
168
|
-
}, {
|
|
169
|
-
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
170
|
-
createTextVNode("新增列", -1)
|
|
171
|
-
])]),
|
|
172
|
-
_: 1
|
|
173
|
-
}),
|
|
174
|
-
(props.record.options.columns || []).length ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
175
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.record.options.columns, (col, index) => {
|
|
176
|
-
return openBlock(), createElementBlock("div", {
|
|
177
|
-
key: index,
|
|
178
|
-
style: { "display": "flex", "gap": "8px", "align-items": "center", "margin-bottom": "8px" }
|
|
179
|
-
}, [
|
|
180
|
-
createVNode(_component_a_input, {
|
|
181
|
-
value: col.title,
|
|
182
|
-
"onUpdate:value": ($event) => col.title = $event,
|
|
183
|
-
placeholder: "标题名称",
|
|
184
|
-
style: { "width": "40%" }
|
|
185
|
-
}, null, 8, ["value", "onUpdate:value"]),
|
|
186
|
-
createVNode(_component_a_select, {
|
|
187
|
-
value: col.dataIndex,
|
|
188
|
-
"onUpdate:value": ($event) => col.dataIndex = $event,
|
|
189
|
-
options: getFieldOptions(index),
|
|
190
|
-
placeholder: "选择字段",
|
|
191
|
-
style: { "width": "200px" }
|
|
192
|
-
}, null, 8, ["value", "onUpdate:value", "options"]),
|
|
193
|
-
createVNode(unref(DeleteOutlined), {
|
|
194
|
-
onClick: ($event) => removeColumn(index)
|
|
195
|
-
}, null, 8, ["onClick"])
|
|
196
|
-
]);
|
|
197
|
-
}), 128))
|
|
198
|
-
])) : createCommentVNode("", true)
|
|
199
|
-
])
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
})
|
|
203
|
-
]),
|
|
204
|
-
_: 1
|
|
205
|
-
})
|
|
206
|
-
]),
|
|
207
|
-
_: 1
|
|
208
|
-
})
|
|
209
|
-
]),
|
|
210
|
-
_: 1
|
|
211
|
-
})
|
|
212
|
-
]);
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
const TableBasePes = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-df7fe26c"]]);
|
|
217
|
-
export {
|
|
218
|
-
TableBasePes as default
|
|
219
|
-
};
|