@gct-paas/design 0.1.4-dev.6 → 0.1.4-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.min.mjs +586 -0
- package/es/index.mjs +5 -5
- package/es/types/index.d.ts +1 -1
- package/package.json +6 -6
- package/es/constant/index.mjs +0 -3
- package/es/constant/variable-type/variable-type.mjs +0 -13
- package/es/interface/controller/i-design-drag.controller.mjs +0 -1
- package/es/interface/controller/i-design-view.controller.mjs +0 -1
- package/es/interface/design-page/design-page.mjs +0 -1
- package/es/interface/i-drag-collect/i-drag-collect.mjs +0 -1
- package/es/interface/i-drag-data-item/i-drag-data-item.mjs +0 -1
- package/es/interface/i-drag-item/i-drag-item.mjs +0 -1
- package/es/interface/i-drop-collect/i-drop-collect.mjs +0 -1
- package/es/interface/i-drop-result/i-drop-result.mjs +0 -1
- package/es/interface/props/plugin-comp-props.mjs +0 -1
- package/es/interface/state/i-design-drag.state.mjs +0 -1
- package/es/interface/state/i-design-view.state.mjs +0 -1
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
import { message as m } from "ant-design-vue";
|
|
2
|
+
import { computed as u } from "vue";
|
|
3
|
+
import { BorderStyle as s, TagTypeEnum as B, TextDecoration as y, FIELD_TYPE as a, Dependency_ENUM as d, ASSIGNMENTSTRATEGY_ENUM as N, PropGroup as r, MaterialEnum as h, FormComponents as A, ButtonSize as b, ButtonType as L, ButtonStyle as R, ButtonColorType as F, ButtonColorTheme as I, StyleGroup as T, fixedAlignENUM as g, Platform as O } from "@gct-paas/core";
|
|
4
|
+
import { isEmpty as t, pick as P, isNil as _ } from "lodash-es";
|
|
5
|
+
class M {
|
|
6
|
+
info(o, n) {
|
|
7
|
+
return new Promise((i) => {
|
|
8
|
+
m.info(o, n, () => {
|
|
9
|
+
i();
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
success(o, n) {
|
|
14
|
+
return new Promise((i) => {
|
|
15
|
+
m.success(o, n, () => {
|
|
16
|
+
i();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
warning(o, n) {
|
|
21
|
+
return new Promise((i) => {
|
|
22
|
+
m.warning(o, n, () => {
|
|
23
|
+
i();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
error(o, n) {
|
|
28
|
+
return new Promise((i) => {
|
|
29
|
+
m.error(o, n, () => {
|
|
30
|
+
i();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const j = {
|
|
36
|
+
position: "",
|
|
37
|
+
top: "",
|
|
38
|
+
left: "",
|
|
39
|
+
right: "",
|
|
40
|
+
bottom: "",
|
|
41
|
+
width: "",
|
|
42
|
+
height: "",
|
|
43
|
+
backgroundColor: "",
|
|
44
|
+
marginAll: "",
|
|
45
|
+
marginTop: "",
|
|
46
|
+
marginRight: "",
|
|
47
|
+
marginBottom: "",
|
|
48
|
+
marginLeft: "",
|
|
49
|
+
paddingAll: "",
|
|
50
|
+
paddingTop: "",
|
|
51
|
+
paddingRight: "",
|
|
52
|
+
paddingBottom: "",
|
|
53
|
+
paddingLeft: "",
|
|
54
|
+
labelFont: {
|
|
55
|
+
align: "left",
|
|
56
|
+
fontSize: "",
|
|
57
|
+
bold: !1,
|
|
58
|
+
italic: !1,
|
|
59
|
+
textDecoration: y.NONE,
|
|
60
|
+
color: ""
|
|
61
|
+
},
|
|
62
|
+
contentFont: {
|
|
63
|
+
align: "left",
|
|
64
|
+
fontSize: "",
|
|
65
|
+
bold: !1,
|
|
66
|
+
italic: !1,
|
|
67
|
+
textDecoration: y.NONE,
|
|
68
|
+
color: ""
|
|
69
|
+
},
|
|
70
|
+
tagStyle: {
|
|
71
|
+
color: "",
|
|
72
|
+
tagType: B.RADIUS
|
|
73
|
+
},
|
|
74
|
+
tagStyleOpen: !1,
|
|
75
|
+
borderAll: {
|
|
76
|
+
borderStyle: s.NONE,
|
|
77
|
+
borderColor: "#F0F0F0",
|
|
78
|
+
borderWidth: "1"
|
|
79
|
+
},
|
|
80
|
+
borderLeft: {
|
|
81
|
+
borderStyle: s.NONE,
|
|
82
|
+
borderColor: "#F0F0F0",
|
|
83
|
+
borderWidth: "1"
|
|
84
|
+
},
|
|
85
|
+
borderRight: {
|
|
86
|
+
borderStyle: s.NONE,
|
|
87
|
+
borderColor: "#F0F0F0",
|
|
88
|
+
borderWidth: "1"
|
|
89
|
+
},
|
|
90
|
+
borderBottom: {
|
|
91
|
+
borderStyle: s.NONE,
|
|
92
|
+
borderColor: "#F0F0F0",
|
|
93
|
+
borderWidth: "1"
|
|
94
|
+
},
|
|
95
|
+
borderTop: {
|
|
96
|
+
borderStyle: s.NONE,
|
|
97
|
+
borderColor: "#F0F0F0",
|
|
98
|
+
borderWidth: "1"
|
|
99
|
+
},
|
|
100
|
+
borderTopRightRadius: "0",
|
|
101
|
+
borderTopLeftRadius: "0",
|
|
102
|
+
borderBottomRightRadius: "0",
|
|
103
|
+
borderBottomLeftRadius: "0",
|
|
104
|
+
borderAllRadius: "0"
|
|
105
|
+
}, k = [
|
|
106
|
+
"position",
|
|
107
|
+
"backgroundColor",
|
|
108
|
+
"bold",
|
|
109
|
+
"italic",
|
|
110
|
+
"textDecoration",
|
|
111
|
+
"color",
|
|
112
|
+
"borderStyle",
|
|
113
|
+
"borderColor"
|
|
114
|
+
];
|
|
115
|
+
function W(e) {
|
|
116
|
+
return e + "px";
|
|
117
|
+
}
|
|
118
|
+
const l = {
|
|
119
|
+
fontAttrs: [
|
|
120
|
+
"fontWeight",
|
|
121
|
+
"fontSize",
|
|
122
|
+
"color",
|
|
123
|
+
"textDecorationLine",
|
|
124
|
+
"textAlign"
|
|
125
|
+
],
|
|
126
|
+
mapAttrs: {
|
|
127
|
+
bold: {
|
|
128
|
+
attr: "fontWeight",
|
|
129
|
+
callback: (e) => e ? 700 : 400
|
|
130
|
+
},
|
|
131
|
+
italic: {
|
|
132
|
+
attr: "fontStyle",
|
|
133
|
+
callback: (e) => e ? "italic" : "normal"
|
|
134
|
+
},
|
|
135
|
+
textDecoration: {
|
|
136
|
+
attr: "textDecorationLine"
|
|
137
|
+
},
|
|
138
|
+
fontSize: {
|
|
139
|
+
attr: "fontSize",
|
|
140
|
+
callback: (e) => e ? W(e) : ""
|
|
141
|
+
},
|
|
142
|
+
align: {
|
|
143
|
+
attr: "textAlign"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
// 获取font样式,
|
|
147
|
+
font(e) {
|
|
148
|
+
if (!e) return {};
|
|
149
|
+
const o = {};
|
|
150
|
+
return Object.assign(o, P(e, l.fontAttrs)), typeof l.mapAttrs == "object" && Object.keys(l.mapAttrs).forEach((n) => {
|
|
151
|
+
const { attr: i, callback: c } = l.mapAttrs[n];
|
|
152
|
+
o[i] = typeof c == "function" ? c(e[n]) : e[n];
|
|
153
|
+
}), o;
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
function v(e) {
|
|
157
|
+
const { style: o = {}, ignoringStyle: n = [] } = e || {}, i = u(() => U(o)), c = u(() => {
|
|
158
|
+
const f = {
|
|
159
|
+
position: t(o.position) ? "" : o.position + " !important",
|
|
160
|
+
top: t(o.top) ? "" : o.top + "px !important",
|
|
161
|
+
left: t(o.left) ? "" : o.left + "px !important",
|
|
162
|
+
right: t(o.right) ? "" : o.right + "px !important",
|
|
163
|
+
bottom: t(o.bottom) ? "" : o.bottom + "px !important",
|
|
164
|
+
width: t(o.width) ? "" : o.width + "px !important",
|
|
165
|
+
height: t(o.height) ? "" : o.height + "px !important",
|
|
166
|
+
backgroundColor: t(o.backgroundColor) ? "" : o.backgroundColor + " !important",
|
|
167
|
+
marginTop: t(o.marginTop) ? "" : o.marginTop + "px !important",
|
|
168
|
+
marginRight: t(o.marginRight) ? "" : o.marginRight + "px !important",
|
|
169
|
+
marginBottom: t(o.marginBottom) ? "" : o.marginBottom + "px !important",
|
|
170
|
+
marginLeft: t(o.marginLeft) ? "" : o.marginLeft + "px !important",
|
|
171
|
+
paddingTop: t(o.paddingTop) ? "" : o.paddingTop + "px !important",
|
|
172
|
+
paddingRight: t(o.paddingRight) ? "" : o.paddingRight + "px !important",
|
|
173
|
+
paddingBottom: t(o.paddingBottom) ? "" : o.paddingBottom + "px !important",
|
|
174
|
+
paddingLeft: t(o.paddingLeft) ? "" : o.paddingLeft + "px !important",
|
|
175
|
+
borderLeft: `${o.borderLeft?.borderWidth}px ${o.borderLeft?.borderStyle} ${o.borderLeft?.borderColor} !important`,
|
|
176
|
+
borderRight: `${o.borderRight?.borderWidth}px ${o.borderRight?.borderStyle} ${o.borderRight?.borderColor} !important`,
|
|
177
|
+
borderBottom: `${o.borderBottom?.borderWidth}px ${o.borderBottom?.borderStyle} ${o.borderBottom?.borderColor} !important`,
|
|
178
|
+
borderTop: `${o.borderTop?.borderWidth}px ${o.borderTop?.borderStyle} ${o.borderTop?.borderColor} !important`,
|
|
179
|
+
borderTopRightRadius: t(o.borderTopRightRadius) ? "" : o.borderTopRightRadius + "px !important",
|
|
180
|
+
borderTopLeftRadius: t(o.borderTopLeftRadius) ? "" : o.borderTopLeftRadius + "px !important",
|
|
181
|
+
borderBottomRightRadius: t(o.borderBottomRightRadius) ? "" : o.borderBottomRightRadius + "px !important",
|
|
182
|
+
borderBottomLeftRadius: t(o.borderBottomLeftRadius) ? "" : o.borderBottomLeftRadius + "px !important"
|
|
183
|
+
};
|
|
184
|
+
return n.forEach((C) => {
|
|
185
|
+
f[C] = void 0;
|
|
186
|
+
}), f;
|
|
187
|
+
}), E = u(() => l.font(o.labelFont)), S = u(() => l.font(o.contentFont));
|
|
188
|
+
return {
|
|
189
|
+
wrapperStyle: c,
|
|
190
|
+
wStyle: i,
|
|
191
|
+
labelFont: E,
|
|
192
|
+
contentFont: S
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function U(e = {}) {
|
|
196
|
+
const o = {};
|
|
197
|
+
for (const n in e)
|
|
198
|
+
o[n] = w(n, e[n]);
|
|
199
|
+
return o;
|
|
200
|
+
}
|
|
201
|
+
function w(e, o) {
|
|
202
|
+
return _(o) || t(o) ? "" : k.includes(e) ? o + " !important" : o + "px !important";
|
|
203
|
+
}
|
|
204
|
+
const D = [
|
|
205
|
+
a.REF,
|
|
206
|
+
a.USER,
|
|
207
|
+
a.ORG,
|
|
208
|
+
a.RDO_REF,
|
|
209
|
+
a.ATTACHMENT
|
|
210
|
+
], K = ({
|
|
211
|
+
groupName: e
|
|
212
|
+
}) => [
|
|
213
|
+
{
|
|
214
|
+
component: "switch-editor",
|
|
215
|
+
name: "enableAutofill",
|
|
216
|
+
label: "sys.pageDesigner.autofill",
|
|
217
|
+
group: e,
|
|
218
|
+
hidden: (o) => o.props.bindFieldKey || o.props.fieldReadonly ? !0 : !D.includes(o.props.fieldType) || o.props.multiple
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
component: "autofill-editor",
|
|
222
|
+
name: "autofillRules",
|
|
223
|
+
label: "",
|
|
224
|
+
group: e,
|
|
225
|
+
hidden: (o) => o.props.bindFieldKey || o.props.fieldReadonly ? !0 : (
|
|
226
|
+
// 如果不是这些字段类型/是多选模式/或者没开启自动填充 则隐藏
|
|
227
|
+
!D.includes(o.props.fieldType) || o.props.enableAutofill === !1 || o.props.multiple
|
|
228
|
+
)
|
|
229
|
+
}
|
|
230
|
+
];
|
|
231
|
+
function p(e) {
|
|
232
|
+
return Object.prototype.hasOwnProperty.call(e.props, "model") ? !e.props.model : Object.prototype.hasOwnProperty.call(e.props, "refForm") ? !e.props.refForm : !1;
|
|
233
|
+
}
|
|
234
|
+
const x = {
|
|
235
|
+
////显隐配置start
|
|
236
|
+
hidden: !1,
|
|
237
|
+
// displayType: DisplayType.CONFIG,
|
|
238
|
+
// displayRule: '',
|
|
239
|
+
componentDependency: {
|
|
240
|
+
sortDependency: [],
|
|
241
|
+
configDependency: {
|
|
242
|
+
/**隐藏 */
|
|
243
|
+
[d.HIDDEN]: {
|
|
244
|
+
expression: ""
|
|
245
|
+
},
|
|
246
|
+
/**只读 */
|
|
247
|
+
[d.READONLY]: {
|
|
248
|
+
expression: ""
|
|
249
|
+
},
|
|
250
|
+
/**禁用 */
|
|
251
|
+
[d.DISABLED]: {
|
|
252
|
+
expression: ""
|
|
253
|
+
},
|
|
254
|
+
/**必填 */
|
|
255
|
+
[d.REQUIRED]: {
|
|
256
|
+
expression: ""
|
|
257
|
+
},
|
|
258
|
+
[d.ASSIGNMENT]: {
|
|
259
|
+
expression: "",
|
|
260
|
+
strategy: N.alwaysCover
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}, $ = [
|
|
265
|
+
{
|
|
266
|
+
component: "dependency-editor",
|
|
267
|
+
name: "componentDependency",
|
|
268
|
+
label: "",
|
|
269
|
+
group: r.COMPONENTDEPENDENCY,
|
|
270
|
+
hidden: (e) => e.materialType === h.MaterialEmbedTableField || e.type === A.Form && e.preLocation ? !0 : p(e)
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
component: "switch-editor",
|
|
274
|
+
name: "notSubmitInHide",
|
|
275
|
+
label: "sys.pageDesigner.submitWhenHidden",
|
|
276
|
+
group: r.FIELD_CONFIG,
|
|
277
|
+
hidden(e) {
|
|
278
|
+
return !e.isField || !e.props.field || !!e.props.bindFieldKey || !!e.props.fieldReadonly || e.materialType === h.cardListFormField || [
|
|
279
|
+
a.EXPRESSION_CONDITION,
|
|
280
|
+
a.SERIALRULE,
|
|
281
|
+
a.LABEL_TEMPLATE
|
|
282
|
+
].includes(e.props.fieldType);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
], V = {
|
|
286
|
+
disabled: !1,
|
|
287
|
+
icon: "icon-park:all-application",
|
|
288
|
+
iconColor: "",
|
|
289
|
+
/**标题 */
|
|
290
|
+
title: "${sys.pageDesigner.button}",
|
|
291
|
+
buttonStyle: R.ORDINARY,
|
|
292
|
+
/**二次确认 */
|
|
293
|
+
confirm: !1,
|
|
294
|
+
confirmText: "",
|
|
295
|
+
// /**内置事件 */
|
|
296
|
+
// innerEvent: true,
|
|
297
|
+
/**系统事件类型 */
|
|
298
|
+
// sysMethedType: undefined,
|
|
299
|
+
// linkPage: '',
|
|
300
|
+
/**事件名称 */
|
|
301
|
+
// eventName: '',
|
|
302
|
+
hasIcon: !1,
|
|
303
|
+
hasText: !0,
|
|
304
|
+
type: L.PRIMARY,
|
|
305
|
+
danger: !1,
|
|
306
|
+
size: b.DEFAULT,
|
|
307
|
+
enableCustomColor: !1,
|
|
308
|
+
backgroundColor: "",
|
|
309
|
+
fontColor: "",
|
|
310
|
+
...x
|
|
311
|
+
}, Q = [
|
|
312
|
+
{
|
|
313
|
+
component: "text-editor",
|
|
314
|
+
name: "title",
|
|
315
|
+
label: "sys.pageDesigner.buttonName",
|
|
316
|
+
group: r.BASIC,
|
|
317
|
+
_config: {
|
|
318
|
+
i18n: !0,
|
|
319
|
+
showCount: !0,
|
|
320
|
+
maxlength: 32
|
|
321
|
+
},
|
|
322
|
+
changeCallback: (e, o) => {
|
|
323
|
+
e.alias = o;
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
component: "button-type-editor",
|
|
328
|
+
name: {
|
|
329
|
+
type: "type",
|
|
330
|
+
danger: "danger",
|
|
331
|
+
icon: "icon",
|
|
332
|
+
label: "label",
|
|
333
|
+
hasText: "hasText",
|
|
334
|
+
hasIcon: "hasIcon"
|
|
335
|
+
},
|
|
336
|
+
label: "sys.pageDesigner.buttonType",
|
|
337
|
+
group: r.BUTTON
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
component: "icon-editor",
|
|
341
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
342
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
343
|
+
group: r.BUTTON,
|
|
344
|
+
// _config: {
|
|
345
|
+
// showColor: true,
|
|
346
|
+
// },
|
|
347
|
+
hidden: (e) => !e.props.hasIcon
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
component: "radio-bgc-editor",
|
|
351
|
+
name: "size",
|
|
352
|
+
label: "sys.pageDesigner.buttonSize",
|
|
353
|
+
group: r.BUTTON,
|
|
354
|
+
_config: {
|
|
355
|
+
options: Object.values(b).map((e) => ({ value: e, label: "sys.pageDesigner." + e }))
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
], X = {
|
|
359
|
+
disabled: !1,
|
|
360
|
+
buttonTheme: I.DEFAULT,
|
|
361
|
+
buttonType: F.DEFAULT,
|
|
362
|
+
icon: "",
|
|
363
|
+
iconColor: "",
|
|
364
|
+
buttonStyle: R.ORDINARY,
|
|
365
|
+
enableCustomColor: !1,
|
|
366
|
+
backgroundColor: "",
|
|
367
|
+
fontColor: ""
|
|
368
|
+
}, q = [
|
|
369
|
+
{
|
|
370
|
+
component: "button-type-editor",
|
|
371
|
+
name: {
|
|
372
|
+
type: "type",
|
|
373
|
+
danger: "danger",
|
|
374
|
+
icon: "icon",
|
|
375
|
+
label: "label",
|
|
376
|
+
hasText: "hasText",
|
|
377
|
+
hasIcon: "hasIcon"
|
|
378
|
+
},
|
|
379
|
+
label: "sys.pageDesigner.buttonType",
|
|
380
|
+
group: r.ButtonStyle,
|
|
381
|
+
hidden: (e) => p(e)
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
component: "icon-editor",
|
|
385
|
+
name: { icon: "icon", iconColor: "iconColor" },
|
|
386
|
+
label: "sys.pageDesigner.buttonIcon",
|
|
387
|
+
group: r.ButtonStyle,
|
|
388
|
+
hidden: (e) => !e.props.hasIcon || p(e),
|
|
389
|
+
_config: {
|
|
390
|
+
clearable: !1
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
component: "switch-editor",
|
|
395
|
+
name: "enableCustomColor",
|
|
396
|
+
label: "sys.pageDesigner.customBtnColor",
|
|
397
|
+
group: r.ButtonStyle,
|
|
398
|
+
hidden: (e) => p(e)
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
component: "button-color-editor",
|
|
402
|
+
name: "fontColor",
|
|
403
|
+
label: "sys.pageDesigner.buttonNameColor",
|
|
404
|
+
group: r.ButtonStyle,
|
|
405
|
+
_config: {
|
|
406
|
+
isInRow: !0
|
|
407
|
+
},
|
|
408
|
+
hidden: (e) => !e.props.enableCustomColor
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
component: "button-color-editor",
|
|
412
|
+
name: "backgroundColor",
|
|
413
|
+
label: "sys.pageDesigner.buttonStyleColor",
|
|
414
|
+
group: r.ButtonStyle,
|
|
415
|
+
_config: {
|
|
416
|
+
isInRow: !0
|
|
417
|
+
},
|
|
418
|
+
hidden: (e) => !e.props.enableCustomColor || e.props.type === "link"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
component: "radio-bgc-editor",
|
|
422
|
+
name: "size",
|
|
423
|
+
label: "sys.pageDesigner.buttonSize",
|
|
424
|
+
group: r.ButtonStyle,
|
|
425
|
+
hidden: (e) => !!e,
|
|
426
|
+
_config: {
|
|
427
|
+
options: Object.values(b).map((e) => ({ value: e, label: "sys.pageDesigner." + e }))
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
component: "switch-editor",
|
|
432
|
+
name: "confirm",
|
|
433
|
+
label: "sys.pageDesigner.confirm",
|
|
434
|
+
group: r.ButtonStyle,
|
|
435
|
+
hidden: (e) => p(e),
|
|
436
|
+
_config: {
|
|
437
|
+
tooltip: "sys.pageDesigner.buttonConfirm"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
component: "texteare-editor",
|
|
442
|
+
name: "confirmText",
|
|
443
|
+
label: "sys.pageDesigner.regHint",
|
|
444
|
+
group: r.ButtonStyle,
|
|
445
|
+
_config: {
|
|
446
|
+
i18n: !0,
|
|
447
|
+
placeholder: "sys.pageDesigner.confirmTodo"
|
|
448
|
+
},
|
|
449
|
+
hidden: (e) => !e.props.confirm || p(e)
|
|
450
|
+
}
|
|
451
|
+
], J = [
|
|
452
|
+
{
|
|
453
|
+
component: "position-editor",
|
|
454
|
+
name: "position",
|
|
455
|
+
label: "sys.pageDesigner.position",
|
|
456
|
+
group: T.LAYOUT,
|
|
457
|
+
// 按钮容器中的按钮不需要样式属性
|
|
458
|
+
hidden: (e) => !!e.props.parentWidgetId || !!e.preLocation
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
component: "margin-editor",
|
|
462
|
+
group: T.MARGIN,
|
|
463
|
+
// 按钮容器中的按钮不需要样式属性
|
|
464
|
+
hidden: (e) => !!e.props.parentWidgetId || !!e.preLocation,
|
|
465
|
+
_config: {
|
|
466
|
+
hiddenMarginOrPadding: "padding"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
], Z = [
|
|
470
|
+
{
|
|
471
|
+
component: "radio-icon-editor",
|
|
472
|
+
name: "fixedAlign",
|
|
473
|
+
label: "sys.pageDesigner.columnFixed",
|
|
474
|
+
group: r.SHOW,
|
|
475
|
+
_config: {
|
|
476
|
+
options: [
|
|
477
|
+
{
|
|
478
|
+
label: "sys.pageDesigner.left",
|
|
479
|
+
value: g.LEFT
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
label: "sys.pageDesigner.none",
|
|
483
|
+
value: g.NONE
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
label: "sys.pageDesigner.right",
|
|
487
|
+
value: g.RIGHT
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
], oo = {
|
|
493
|
+
field: "",
|
|
494
|
+
fieldId: "",
|
|
495
|
+
label: "",
|
|
496
|
+
modelKey: "",
|
|
497
|
+
fieldType: void 0,
|
|
498
|
+
bindModelKey: void 0,
|
|
499
|
+
disabled: !1,
|
|
500
|
+
explain: "",
|
|
501
|
+
showExplain: !1,
|
|
502
|
+
displayLabelText: !0,
|
|
503
|
+
readonly: !1,
|
|
504
|
+
fieldReadonly: !1,
|
|
505
|
+
notSubmitInHide: !0,
|
|
506
|
+
...x
|
|
507
|
+
}, eo = [
|
|
508
|
+
{
|
|
509
|
+
component: "switch-editor",
|
|
510
|
+
name: "showExplain",
|
|
511
|
+
label: "sys.pageDesigner.explain",
|
|
512
|
+
group: r.BASIC,
|
|
513
|
+
hidden: (e) => e.platform === O.MOBILE
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
component: "texteare-editor",
|
|
517
|
+
name: "explain",
|
|
518
|
+
label: "",
|
|
519
|
+
group: r.BASIC,
|
|
520
|
+
hidden: (e) => !e.props.showExplain,
|
|
521
|
+
_config: {
|
|
522
|
+
i18n: !0
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
component: "switch-editor",
|
|
527
|
+
name: "displayLabelText",
|
|
528
|
+
label: "sys.pageDesigner.displayLabelText",
|
|
529
|
+
group: r.ADVANCED
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
component: "switch-editor",
|
|
533
|
+
name: "disabled",
|
|
534
|
+
label: "sys.pageDesigner.disabled",
|
|
535
|
+
group: r.ADVANCED
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
component: "switch-editor",
|
|
539
|
+
name: "readonly",
|
|
540
|
+
label: "sys.pageDesigner.readonly",
|
|
541
|
+
group: r.ADVANCED
|
|
542
|
+
},
|
|
543
|
+
...$
|
|
544
|
+
// {
|
|
545
|
+
// component: 'switch-editor',
|
|
546
|
+
// name: 'notSubmitInHide',
|
|
547
|
+
// label: 'sys.pageDesigner.notSubmitInHide',
|
|
548
|
+
// group: PropGroup.DISPLAY,
|
|
549
|
+
// },
|
|
550
|
+
], to = [
|
|
551
|
+
{
|
|
552
|
+
component: "permission-editor",
|
|
553
|
+
label: "",
|
|
554
|
+
group: r.PERMISSION,
|
|
555
|
+
hidden: (e) => p(e)
|
|
556
|
+
}
|
|
557
|
+
];
|
|
558
|
+
function ro() {
|
|
559
|
+
if (!window._gct) {
|
|
560
|
+
console.error(
|
|
561
|
+
"未找到 _gct 对象,请先安装 @gct-paas/core 包后再安装 @gct-paas/design 包!"
|
|
562
|
+
);
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
window._gct.message = new M();
|
|
566
|
+
}
|
|
567
|
+
export {
|
|
568
|
+
Q as baseBtnEditor,
|
|
569
|
+
V as baseBtnProp,
|
|
570
|
+
q as buttonEditor,
|
|
571
|
+
X as buttonProps,
|
|
572
|
+
J as buttonStyleEditor,
|
|
573
|
+
ro as default,
|
|
574
|
+
$ as displayEditor,
|
|
575
|
+
x as displayProps,
|
|
576
|
+
Z as fixedAlignEditor,
|
|
577
|
+
eo as formItemDisplayEditor,
|
|
578
|
+
oo as formItemProps,
|
|
579
|
+
K as getAutofillEditor,
|
|
580
|
+
p as hiddenButtonProps,
|
|
581
|
+
ro as install,
|
|
582
|
+
k as notNeedPxStyle,
|
|
583
|
+
to as permissionEditor,
|
|
584
|
+
j as style,
|
|
585
|
+
v as useStyle
|
|
586
|
+
};
|
package/es/index.mjs
CHANGED
|
@@ -3,16 +3,16 @@ import './hooks/index.mjs';
|
|
|
3
3
|
import './interface/index.mjs';
|
|
4
4
|
import './schema/index.mjs';
|
|
5
5
|
import { MessageUtil } from './utils/message/message.mjs';
|
|
6
|
-
export { useStyle } from './hooks/useStyle.mjs';
|
|
7
|
-
export { getAutofillEditor } from './schema/common-config/autofill-editor-config.mjs';
|
|
8
6
|
export { baseBtnEditor, baseBtnProp } from './schema/common-config/base-button-config.mjs';
|
|
9
7
|
export { buttonEditor, buttonProps, buttonStyleEditor } from './schema/common-config/button-editor-config.mjs';
|
|
10
|
-
export { hiddenButtonProps } from './schema/common-config/button-props-func.mjs';
|
|
11
|
-
export { fixedAlignEditor } from './schema/common-config/column-editor-config.mjs';
|
|
12
|
-
export { notNeedPxStyle, style } from './schema/common-config/common-style.mjs';
|
|
13
8
|
export { displayEditor, displayProps } from './schema/common-config/display-editor-config.mjs';
|
|
9
|
+
export { fixedAlignEditor } from './schema/common-config/column-editor-config.mjs';
|
|
14
10
|
export { formItemDisplayEditor, formItemProps } from './schema/common-config/formItem-editor-config.mjs';
|
|
11
|
+
export { getAutofillEditor } from './schema/common-config/autofill-editor-config.mjs';
|
|
12
|
+
export { hiddenButtonProps } from './schema/common-config/button-props-func.mjs';
|
|
13
|
+
export { notNeedPxStyle, style } from './schema/common-config/common-style.mjs';
|
|
15
14
|
export { permissionEditor } from './schema/common-config/permission-editor-config.mjs';
|
|
15
|
+
export { useStyle } from './hooks/useStyle.mjs';
|
|
16
16
|
|
|
17
17
|
"use strict";
|
|
18
18
|
function install() {
|
package/es/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design",
|
|
3
|
-
"version": "0.1.4-dev.
|
|
3
|
+
"version": "0.1.4-dev.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面底包",
|
|
6
6
|
"main": "dist/index.min.cjs",
|
|
@@ -41,19 +41,19 @@
|
|
|
41
41
|
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@gct-paas/
|
|
45
|
-
"@gct-paas/core": "0.1.4-dev.6",
|
|
44
|
+
"@gct-paas/core": "0.1.4-dev.7",
|
|
46
45
|
"ant-design-vue": "3.2.20",
|
|
47
|
-
"lodash-es": "^4.17.
|
|
46
|
+
"lodash-es": "^4.17.23",
|
|
48
47
|
"lokijs": "^1.5.12",
|
|
49
48
|
"qx-util": "^0.4.8",
|
|
50
|
-
"vue": "^3.5.
|
|
49
|
+
"vue": "^3.5.27"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
53
52
|
"vue": "^3.x"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
55
|
+
"@gct-paas/build": "^0.1.4",
|
|
56
56
|
"@types/lokijs": "^1.5.14"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "331b60348593f6afa0ccaa54fcdd52435b7876fa"
|
|
59
59
|
}
|
package/es/constant/index.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var VariableTypeEnum = /* @__PURE__ */ ((VariableTypeEnum2) => {
|
|
3
|
-
VariableTypeEnum2["String"] = "String";
|
|
4
|
-
VariableTypeEnum2["Number"] = "Number";
|
|
5
|
-
VariableTypeEnum2["Boolean"] = "Boolean";
|
|
6
|
-
VariableTypeEnum2["Object"] = "Object";
|
|
7
|
-
VariableTypeEnum2["Array"] = "Array";
|
|
8
|
-
VariableTypeEnum2["DataTime"] = "DataTime";
|
|
9
|
-
VariableTypeEnum2["Null"] = "Null";
|
|
10
|
-
return VariableTypeEnum2;
|
|
11
|
-
})(VariableTypeEnum || {});
|
|
12
|
-
|
|
13
|
-
export { VariableTypeEnum };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|