bm-admin-ui 1.0.37-alpha → 1.0.38-alpha
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/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
- package/es/components/form-create/index.js +34 -22
- package/es/components/form-designer/index.js +120 -30
- package/es/components/select-all/index.js +38 -25
- package/es/utils/bm-admin-ui-resolver.d.ts +3 -1
- package/es/utils/bm-admin-ui-resolver.js +1 -1
- package/index.esm.js +239 -124
- package/index.js +239 -124
- package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
- package/lib/components/form-create/index.js +34 -22
- package/lib/components/form-designer/index.js +119 -29
- package/lib/components/select-all/index.js +37 -24
- package/lib/utils/bm-admin-ui-resolver.d.ts +3 -1
- package/lib/utils/bm-admin-ui-resolver.js +1 -1
- package/package.json +2 -2
- package/theme-chalk/form-create.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/select-all.css +1 -1
- package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
- package/types/utils/bm-admin-ui-resolver.d.ts +3 -1
|
@@ -63,7 +63,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
63
63
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
64
64
|
prefixCls: StringConstructor;
|
|
65
65
|
color: {
|
|
66
|
-
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"
|
|
66
|
+
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"success" | "error" | "warning" | "default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "processing" | "geekblue" | "volcano", string>>;
|
|
67
67
|
};
|
|
68
68
|
closable: {
|
|
69
69
|
type: BooleanConstructor;
|
|
@@ -96,7 +96,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
96
96
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
97
97
|
prefixCls: StringConstructor;
|
|
98
98
|
color: {
|
|
99
|
-
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"
|
|
99
|
+
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"success" | "error" | "warning" | "default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "processing" | "geekblue" | "volcano", string>>;
|
|
100
100
|
};
|
|
101
101
|
closable: {
|
|
102
102
|
type: BooleanConstructor;
|
|
@@ -138,7 +138,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
138
138
|
} & Readonly<import("vue").ExtractPropTypes<{
|
|
139
139
|
prefixCls: StringConstructor;
|
|
140
140
|
color: {
|
|
141
|
-
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"
|
|
141
|
+
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"success" | "error" | "warning" | "default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "processing" | "geekblue" | "volcano", string>>;
|
|
142
142
|
};
|
|
143
143
|
closable: {
|
|
144
144
|
type: BooleanConstructor;
|
|
@@ -161,7 +161,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
161
161
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
162
162
|
prefixCls: StringConstructor;
|
|
163
163
|
color: {
|
|
164
|
-
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"
|
|
164
|
+
type: import("vue").PropType<import("ant-design-vue/lib/_util/type").LiteralUnion<"success" | "error" | "warning" | "default" | "blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "processing" | "geekblue" | "volcano", string>>;
|
|
165
165
|
};
|
|
166
166
|
closable: {
|
|
167
167
|
type: BooleanConstructor;
|
|
@@ -29,7 +29,10 @@ const fieldRatioMap = {
|
|
|
29
29
|
12: 12,
|
|
30
30
|
18: 18,
|
|
31
31
|
24: 24,
|
|
32
|
-
};
|
|
32
|
+
};
|
|
33
|
+
function getContainer() {
|
|
34
|
+
return document.body;
|
|
35
|
+
}
|
|
33
36
|
|
|
34
37
|
var input = {
|
|
35
38
|
name: 'input',
|
|
@@ -77,7 +80,7 @@ var input = {
|
|
|
77
80
|
field,
|
|
78
81
|
title: data.title.title,
|
|
79
82
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
80
|
-
|
|
83
|
+
minWidth: data.config.fieldRatio,
|
|
81
84
|
slots: {
|
|
82
85
|
default({ row }) {
|
|
83
86
|
return vue.h(antDesignVue.Input, {
|
|
@@ -142,7 +145,7 @@ var textarea = {
|
|
|
142
145
|
field,
|
|
143
146
|
title: data.title.title,
|
|
144
147
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
145
|
-
|
|
148
|
+
minWidth: data.config.fieldRatio,
|
|
146
149
|
slots: {
|
|
147
150
|
default({ row }) {
|
|
148
151
|
return vue.h(antDesignVue.Input, {
|
|
@@ -211,7 +214,7 @@ var numInput = {
|
|
|
211
214
|
field,
|
|
212
215
|
title: data.title.title,
|
|
213
216
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
214
|
-
|
|
217
|
+
minWidth: data.config.fieldRatio,
|
|
215
218
|
slots: {
|
|
216
219
|
default({ row }) {
|
|
217
220
|
return vue.h(antDesignVue.InputNumber, {
|
|
@@ -276,13 +279,14 @@ var radio = {
|
|
|
276
279
|
field,
|
|
277
280
|
title: data.title.title,
|
|
278
281
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
279
|
-
|
|
282
|
+
minWidth: data.config.fieldRatio,
|
|
280
283
|
slots: {
|
|
281
284
|
default({ row }) {
|
|
282
285
|
return vue.h(antDesignVue.Select, {
|
|
283
286
|
value: row[field],
|
|
284
287
|
placeholder: data.props.placeholder,
|
|
285
288
|
options: data.options,
|
|
289
|
+
getPopupContainer: getContainer,
|
|
286
290
|
'onUpdate:value': (value) => {
|
|
287
291
|
row[field] = value;
|
|
288
292
|
},
|
|
@@ -337,7 +341,7 @@ var checkbox = {
|
|
|
337
341
|
field,
|
|
338
342
|
title: data.title.title,
|
|
339
343
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
340
|
-
|
|
344
|
+
minWidth: data.config.fieldRatio,
|
|
341
345
|
slots: {
|
|
342
346
|
default({ row }) {
|
|
343
347
|
return vue.h(antDesignVue.Select, {
|
|
@@ -345,6 +349,7 @@ var checkbox = {
|
|
|
345
349
|
placeholder: data.props.placeholder,
|
|
346
350
|
options: data.options,
|
|
347
351
|
mode: 'multiple',
|
|
352
|
+
getPopupContainer: getContainer,
|
|
348
353
|
'onUpdate:value': (value) => {
|
|
349
354
|
row[field] = value;
|
|
350
355
|
},
|
|
@@ -418,7 +423,7 @@ var date = {
|
|
|
418
423
|
field,
|
|
419
424
|
title: data.title.title,
|
|
420
425
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
421
|
-
|
|
426
|
+
minWidth: data.config.fieldRatio,
|
|
422
427
|
slots: {
|
|
423
428
|
default({ row }) {
|
|
424
429
|
return vue.h(antDesignVue.DatePicker, {
|
|
@@ -434,6 +439,7 @@ var date = {
|
|
|
434
439
|
style: {
|
|
435
440
|
width: '100%',
|
|
436
441
|
},
|
|
442
|
+
getCalendarContainer: getContainer,
|
|
437
443
|
});
|
|
438
444
|
},
|
|
439
445
|
},
|
|
@@ -453,7 +459,7 @@ var dateRange = {
|
|
|
453
459
|
type: 'datePicker',
|
|
454
460
|
field: data.field,
|
|
455
461
|
title: data.title.title,
|
|
456
|
-
props: Object.assign({ range: true, separator: '~', format, valueFormat: format, placeholder: data.props.placeholder }, extraProps),
|
|
462
|
+
props: Object.assign({ range: true, separator: '~', format, valueFormat: format, placeholder: data.props.placeholder, getCalendarContainer: getContainer }, extraProps),
|
|
457
463
|
effect: {
|
|
458
464
|
required: data.effect.required && '请选择',
|
|
459
465
|
},
|
|
@@ -498,7 +504,7 @@ var dateRange = {
|
|
|
498
504
|
field,
|
|
499
505
|
title: data.title.title,
|
|
500
506
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
501
|
-
|
|
507
|
+
minWidth: data.config.fieldRatio,
|
|
502
508
|
slots: {
|
|
503
509
|
default({ row }) {
|
|
504
510
|
return vue.h(antDesignVue.RangePicker, {
|
|
@@ -514,6 +520,7 @@ var dateRange = {
|
|
|
514
520
|
style: {
|
|
515
521
|
width: '100%',
|
|
516
522
|
},
|
|
523
|
+
getCalendarContainer: getContainer,
|
|
517
524
|
});
|
|
518
525
|
},
|
|
519
526
|
},
|
|
@@ -890,7 +897,7 @@ var people = {
|
|
|
890
897
|
field,
|
|
891
898
|
title: data.title.title,
|
|
892
899
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
893
|
-
|
|
900
|
+
minWidth: data.config.fieldRatio,
|
|
894
901
|
slots: {
|
|
895
902
|
default({ row }) {
|
|
896
903
|
return vue.h(StaffSelector, Object.assign({ title: '添加员工', mode: data.props.limit ? 'radio' : 'multiple', placeholder: data.props.placeholder, onChange: (value) => {
|
|
@@ -1289,7 +1296,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1289
1296
|
field,
|
|
1290
1297
|
title: "\u5546\u54C1\u7F16\u7801",
|
|
1291
1298
|
headerClassName: rule.effect.required ? "is-required" : "",
|
|
1292
|
-
|
|
1299
|
+
minWidth: "138px",
|
|
1293
1300
|
slots: {
|
|
1294
1301
|
default({ row }) {
|
|
1295
1302
|
return vue.h(antDesignVue.Input, {
|
|
@@ -1312,7 +1319,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1312
1319
|
columns2.push({
|
|
1313
1320
|
field: childField,
|
|
1314
1321
|
title: item.label,
|
|
1315
|
-
|
|
1322
|
+
minWidth: "138px",
|
|
1316
1323
|
slots: {
|
|
1317
1324
|
default({ row }) {
|
|
1318
1325
|
if (item.value === "\u5546\u54C1\u56FE\u7247" && row[childField]) {
|
|
@@ -2168,9 +2175,10 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2168
2175
|
"filter-option": false,
|
|
2169
2176
|
"not-found-content": null,
|
|
2170
2177
|
options: options.value,
|
|
2178
|
+
"get-popup-container": vue.unref(getContainer),
|
|
2171
2179
|
onChange: handleChange,
|
|
2172
2180
|
onSearch: handleSearch
|
|
2173
|
-
}, null, 8, ["value", "options"]);
|
|
2181
|
+
}, null, 8, ["value", "options", "get-popup-container"]);
|
|
2174
2182
|
};
|
|
2175
2183
|
}
|
|
2176
2184
|
});
|
|
@@ -2247,7 +2255,7 @@ var shop = {
|
|
|
2247
2255
|
field,
|
|
2248
2256
|
title: data.title.title,
|
|
2249
2257
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
2250
|
-
|
|
2258
|
+
minWidth: '138px',
|
|
2251
2259
|
slots: {
|
|
2252
2260
|
default({ row }) {
|
|
2253
2261
|
return vue.h(ShopWidget, {
|
|
@@ -2306,8 +2314,9 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2306
2314
|
multiple: __props.multiple,
|
|
2307
2315
|
options: options.value,
|
|
2308
2316
|
"load-data": loadData,
|
|
2317
|
+
"get-popup-container": vue.unref(getContainer),
|
|
2309
2318
|
"onUpdate:value": handleChange
|
|
2310
|
-
}, null, 8, ["value", "multiple", "options"]);
|
|
2319
|
+
}, null, 8, ["value", "multiple", "options", "get-popup-container"]);
|
|
2311
2320
|
};
|
|
2312
2321
|
}
|
|
2313
2322
|
});
|
|
@@ -2448,7 +2457,7 @@ var materialType = {
|
|
|
2448
2457
|
field,
|
|
2449
2458
|
title: '素材类型',
|
|
2450
2459
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
2451
|
-
|
|
2460
|
+
minWidth: '138px',
|
|
2452
2461
|
slots: {
|
|
2453
2462
|
default({ row }) {
|
|
2454
2463
|
return vue.h(materialTypeInTable, {
|
|
@@ -2585,7 +2594,7 @@ var department = {
|
|
|
2585
2594
|
field,
|
|
2586
2595
|
title: data.title.title,
|
|
2587
2596
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
2588
|
-
|
|
2597
|
+
minWidth: data.config.fieldRatio,
|
|
2589
2598
|
slots: {
|
|
2590
2599
|
default({ row }) {
|
|
2591
2600
|
return vue.h(StaffSelector, Object.assign({ title: '添加部门', mode: data.props.limit ? 'radio' : 'multiple', placeholder: data.props.placeholder, immediateFetch: true, unitStr: '个', onChange: (value) => {
|
|
@@ -2770,7 +2779,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2770
2779
|
props: ["info"],
|
|
2771
2780
|
setup(__props) {
|
|
2772
2781
|
return (_ctx, _cache) => {
|
|
2773
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
2782
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
2774
2783
|
!__props.info?.status ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, "\u5BA1\u6279\u72B6\u6001")) : (vue.openBlock(), vue.createBlock(ApprovalStatus, {
|
|
2775
2784
|
key: 1,
|
|
2776
2785
|
class: "bm-form-basic-info__approval-status",
|
|
@@ -2779,7 +2788,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2779
2788
|
_hoisted_2,
|
|
2780
2789
|
_hoisted_3,
|
|
2781
2790
|
_hoisted_4
|
|
2782
|
-
]
|
|
2791
|
+
]);
|
|
2783
2792
|
};
|
|
2784
2793
|
}
|
|
2785
2794
|
});
|
|
@@ -2787,7 +2796,7 @@ var FormBasicInfo = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "formBa
|
|
|
2787
2796
|
|
|
2788
2797
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
2789
2798
|
__name: "form-create",
|
|
2790
|
-
props: ["fdRule", "extraConfig", "value"],
|
|
2799
|
+
props: ["fdRule", "extraConfig", "value", "info"],
|
|
2791
2800
|
emits: ["update:value"],
|
|
2792
2801
|
setup(__props, { expose, emit: emits }) {
|
|
2793
2802
|
const props = __props;
|
|
@@ -2829,7 +2838,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
2829
2838
|
item.value = props.value[item.field];
|
|
2830
2839
|
});
|
|
2831
2840
|
}
|
|
2832
|
-
rule2.value = props.value[rule2.field];
|
|
2841
|
+
rule2.value = props.value[rule2.field] || rule2.value;
|
|
2833
2842
|
});
|
|
2834
2843
|
return ruleData;
|
|
2835
2844
|
}
|
|
@@ -2842,7 +2851,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
2842
2851
|
return (_ctx, _cache) => {
|
|
2843
2852
|
const _component_formCreate = vue.resolveComponent("formCreate", true);
|
|
2844
2853
|
return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
|
|
2845
|
-
vue.createVNode(FormBasicInfo
|
|
2854
|
+
vue.createVNode(FormBasicInfo, {
|
|
2855
|
+
class: "bm-fc-form-basic-info",
|
|
2856
|
+
info: __props.info
|
|
2857
|
+
}, null, 8, ["info"]),
|
|
2846
2858
|
vue.createVNode(_component_formCreate, {
|
|
2847
2859
|
api: fApi.value,
|
|
2848
2860
|
"onUpdate:api": _cache[0] || (_cache[0] = ($event) => fApi.value = $event),
|
|
@@ -476,7 +476,7 @@ var input = {
|
|
|
476
476
|
},
|
|
477
477
|
},
|
|
478
478
|
effect: {
|
|
479
|
-
required:
|
|
479
|
+
required: false,
|
|
480
480
|
formRule: 'formRule',
|
|
481
481
|
},
|
|
482
482
|
props: {
|
|
@@ -509,6 +509,7 @@ var input = {
|
|
|
509
509
|
field: fieldsMap$g['props.placeholder'],
|
|
510
510
|
props: {
|
|
511
511
|
placeholder: '请输入',
|
|
512
|
+
maxlength: 30,
|
|
512
513
|
},
|
|
513
514
|
value: rule.props.placeholder,
|
|
514
515
|
},
|
|
@@ -518,6 +519,7 @@ var input = {
|
|
|
518
519
|
field: fieldsMap$g['value'],
|
|
519
520
|
props: {
|
|
520
521
|
placeholder: '请输入',
|
|
522
|
+
maxlength: 200,
|
|
521
523
|
},
|
|
522
524
|
value: rule.value,
|
|
523
525
|
},
|
|
@@ -577,7 +579,7 @@ var textarea = {
|
|
|
577
579
|
},
|
|
578
580
|
},
|
|
579
581
|
effect: {
|
|
580
|
-
required:
|
|
582
|
+
required: false,
|
|
581
583
|
formRule: 'formRule',
|
|
582
584
|
},
|
|
583
585
|
props: {
|
|
@@ -611,6 +613,7 @@ var textarea = {
|
|
|
611
613
|
field: fieldsMap$f['props.placeholder'],
|
|
612
614
|
props: {
|
|
613
615
|
placeholder: '请输入',
|
|
616
|
+
maxlength: 30,
|
|
614
617
|
},
|
|
615
618
|
value: rule.props.placeholder,
|
|
616
619
|
},
|
|
@@ -620,6 +623,7 @@ var textarea = {
|
|
|
620
623
|
field: fieldsMap$f['value'],
|
|
621
624
|
props: {
|
|
622
625
|
placeholder: '请输入',
|
|
626
|
+
maxlength: 5000,
|
|
623
627
|
},
|
|
624
628
|
value: rule.value,
|
|
625
629
|
},
|
|
@@ -680,7 +684,7 @@ var numInput = {
|
|
|
680
684
|
},
|
|
681
685
|
},
|
|
682
686
|
effect: {
|
|
683
|
-
required:
|
|
687
|
+
required: false,
|
|
684
688
|
formRule: 'formRule',
|
|
685
689
|
},
|
|
686
690
|
props: {
|
|
@@ -715,6 +719,7 @@ var numInput = {
|
|
|
715
719
|
field: fieldsMap$e['props.placeholder'],
|
|
716
720
|
props: {
|
|
717
721
|
placeholder: '请输入',
|
|
722
|
+
maxlength: 30,
|
|
718
723
|
},
|
|
719
724
|
value: rule.props.placeholder,
|
|
720
725
|
},
|
|
@@ -788,6 +793,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
788
793
|
const visible = vue.ref(false);
|
|
789
794
|
const text = vue.ref("");
|
|
790
795
|
const repeatOption = vue.ref([]);
|
|
796
|
+
const maxlength = 500;
|
|
791
797
|
function edit() {
|
|
792
798
|
visible.value = true;
|
|
793
799
|
text.value = makeText(props.options);
|
|
@@ -809,6 +815,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
809
815
|
function handleOk() {
|
|
810
816
|
const options = text.value.split("\n").reduce((pre, cur) => {
|
|
811
817
|
if (cur) {
|
|
818
|
+
cur = cur.substring(0, maxlength - 1);
|
|
812
819
|
pre.push({ value: cur, label: cur });
|
|
813
820
|
}
|
|
814
821
|
return pre;
|
|
@@ -873,6 +880,7 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
873
880
|
"bm-handle-options__input",
|
|
874
881
|
repeatOption.value.length && repeatOption.value.includes(element.value) ? "is-error" : ""
|
|
875
882
|
]),
|
|
883
|
+
maxlength,
|
|
876
884
|
onBlur: ($event) => handleBlur(element)
|
|
877
885
|
}, null, 8, ["value", "onUpdate:value", "class", "onBlur"])
|
|
878
886
|
]),
|
|
@@ -969,7 +977,7 @@ var radio = {
|
|
|
969
977
|
},
|
|
970
978
|
},
|
|
971
979
|
effect: {
|
|
972
|
-
required:
|
|
980
|
+
required: false,
|
|
973
981
|
formRule: 'formRule',
|
|
974
982
|
},
|
|
975
983
|
options: [
|
|
@@ -1015,6 +1023,7 @@ var radio = {
|
|
|
1015
1023
|
field: fieldsMap$d['props.placeholder'],
|
|
1016
1024
|
props: {
|
|
1017
1025
|
placeholder: '请输入',
|
|
1026
|
+
maxlength: 30,
|
|
1018
1027
|
},
|
|
1019
1028
|
value: rule.props.placeholder,
|
|
1020
1029
|
},
|
|
@@ -1107,7 +1116,7 @@ var checkbox = {
|
|
|
1107
1116
|
},
|
|
1108
1117
|
},
|
|
1109
1118
|
effect: {
|
|
1110
|
-
required:
|
|
1119
|
+
required: false,
|
|
1111
1120
|
formRule: 'formRule',
|
|
1112
1121
|
},
|
|
1113
1122
|
options: [
|
|
@@ -1153,6 +1162,7 @@ var checkbox = {
|
|
|
1153
1162
|
field: fieldsMap$c['props.placeholder'],
|
|
1154
1163
|
props: {
|
|
1155
1164
|
placeholder: '请输入',
|
|
1165
|
+
maxlength: 30,
|
|
1156
1166
|
},
|
|
1157
1167
|
value: rule.props.placeholder,
|
|
1158
1168
|
},
|
|
@@ -1314,7 +1324,7 @@ var date = {
|
|
|
1314
1324
|
},
|
|
1315
1325
|
},
|
|
1316
1326
|
effect: {
|
|
1317
|
-
required:
|
|
1327
|
+
required: false,
|
|
1318
1328
|
formRule: 'formRule',
|
|
1319
1329
|
},
|
|
1320
1330
|
props: {
|
|
@@ -1377,6 +1387,7 @@ var date = {
|
|
|
1377
1387
|
field: fieldsMap$b['props.placeholder'],
|
|
1378
1388
|
props: {
|
|
1379
1389
|
placeholder: '请输入',
|
|
1390
|
+
maxlength: 30,
|
|
1380
1391
|
},
|
|
1381
1392
|
value: rule.props.placeholder,
|
|
1382
1393
|
},
|
|
@@ -1458,7 +1469,7 @@ var dateRange = {
|
|
|
1458
1469
|
},
|
|
1459
1470
|
},
|
|
1460
1471
|
effect: {
|
|
1461
|
-
required:
|
|
1472
|
+
required: false,
|
|
1462
1473
|
formRule: 'formRule',
|
|
1463
1474
|
},
|
|
1464
1475
|
props: {
|
|
@@ -1523,6 +1534,7 @@ var dateRange = {
|
|
|
1523
1534
|
field: fieldsMap$a['props.placeholder.0'],
|
|
1524
1535
|
props: {
|
|
1525
1536
|
placeholder: '请输入',
|
|
1537
|
+
maxlength: 30,
|
|
1526
1538
|
},
|
|
1527
1539
|
value: rule.props.placeholder[0],
|
|
1528
1540
|
},
|
|
@@ -1532,6 +1544,7 @@ var dateRange = {
|
|
|
1532
1544
|
field: fieldsMap$a['props.placeholder.1'],
|
|
1533
1545
|
props: {
|
|
1534
1546
|
placeholder: '请输入',
|
|
1547
|
+
maxlength: 30,
|
|
1535
1548
|
},
|
|
1536
1549
|
value: rule.props.placeholder[1],
|
|
1537
1550
|
},
|
|
@@ -1605,10 +1618,23 @@ var instruction = {
|
|
|
1605
1618
|
title: label$9,
|
|
1606
1619
|
field: fieldsMap$9.value,
|
|
1607
1620
|
value: rule.value,
|
|
1621
|
+
inject: true,
|
|
1608
1622
|
prefix: {
|
|
1609
1623
|
type: 'TextColor',
|
|
1624
|
+
on: {
|
|
1625
|
+
change({ api, self }, color) {
|
|
1626
|
+
api.emit('change', 'style.color', color, self, api, true);
|
|
1627
|
+
},
|
|
1628
|
+
},
|
|
1610
1629
|
props: {
|
|
1611
|
-
rule,
|
|
1630
|
+
color: rule.style.color,
|
|
1631
|
+
},
|
|
1632
|
+
},
|
|
1633
|
+
on: {
|
|
1634
|
+
change({ api, self }, list) {
|
|
1635
|
+
vue.nextTick(() => {
|
|
1636
|
+
api.refresh();
|
|
1637
|
+
});
|
|
1612
1638
|
},
|
|
1613
1639
|
},
|
|
1614
1640
|
},
|
|
@@ -1651,7 +1677,7 @@ var picture = {
|
|
|
1651
1677
|
},
|
|
1652
1678
|
},
|
|
1653
1679
|
effect: {
|
|
1654
|
-
required:
|
|
1680
|
+
required: false,
|
|
1655
1681
|
formRule: 'formRule',
|
|
1656
1682
|
},
|
|
1657
1683
|
props: {
|
|
@@ -2000,7 +2026,15 @@ var table = {
|
|
|
2000
2026
|
effect: {
|
|
2001
2027
|
required: true,
|
|
2002
2028
|
},
|
|
2029
|
+
inject: true,
|
|
2003
2030
|
value: rule.config.childRules,
|
|
2031
|
+
on: {
|
|
2032
|
+
change({ api, self }, list) {
|
|
2033
|
+
vue.nextTick(() => {
|
|
2034
|
+
api.validate();
|
|
2035
|
+
});
|
|
2036
|
+
},
|
|
2037
|
+
},
|
|
2004
2038
|
},
|
|
2005
2039
|
{
|
|
2006
2040
|
type: 'checkbox',
|
|
@@ -2063,7 +2097,7 @@ var file = {
|
|
|
2063
2097
|
},
|
|
2064
2098
|
},
|
|
2065
2099
|
effect: {
|
|
2066
|
-
required:
|
|
2100
|
+
required: false,
|
|
2067
2101
|
formRule: 'formRule',
|
|
2068
2102
|
},
|
|
2069
2103
|
config: {
|
|
@@ -2134,7 +2168,7 @@ var people = {
|
|
|
2134
2168
|
},
|
|
2135
2169
|
},
|
|
2136
2170
|
effect: {
|
|
2137
|
-
required:
|
|
2171
|
+
required: false,
|
|
2138
2172
|
formRule: 'formRule',
|
|
2139
2173
|
},
|
|
2140
2174
|
props: {
|
|
@@ -2167,6 +2201,7 @@ var people = {
|
|
|
2167
2201
|
field: fieldsMap$5['props.placeholder'],
|
|
2168
2202
|
props: {
|
|
2169
2203
|
placeholder: '请输入',
|
|
2204
|
+
maxlength: 30,
|
|
2170
2205
|
},
|
|
2171
2206
|
value: rule.props.placeholder,
|
|
2172
2207
|
},
|
|
@@ -2255,7 +2290,7 @@ var department = {
|
|
|
2255
2290
|
},
|
|
2256
2291
|
},
|
|
2257
2292
|
effect: {
|
|
2258
|
-
required:
|
|
2293
|
+
required: false,
|
|
2259
2294
|
formRule: 'formRule',
|
|
2260
2295
|
},
|
|
2261
2296
|
props: {
|
|
@@ -2288,6 +2323,7 @@ var department = {
|
|
|
2288
2323
|
field: fieldsMap$4['props.placeholder'],
|
|
2289
2324
|
props: {
|
|
2290
2325
|
placeholder: '请输入',
|
|
2326
|
+
maxlength: 30,
|
|
2291
2327
|
},
|
|
2292
2328
|
value: rule.props.placeholder,
|
|
2293
2329
|
},
|
|
@@ -3549,7 +3585,8 @@ const _hoisted_2$1 = { class: "bm-table-column-btn-wrap" };
|
|
|
3549
3585
|
const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
3550
3586
|
__name: "table-column",
|
|
3551
3587
|
props: ["formCreateInject"],
|
|
3552
|
-
|
|
3588
|
+
emits: ["change"],
|
|
3589
|
+
setup(__props, { emit: emits }) {
|
|
3553
3590
|
const props = __props;
|
|
3554
3591
|
const handleClass = "bm-table-column__drag-icon";
|
|
3555
3592
|
const btnCom = vue.ref();
|
|
@@ -3574,6 +3611,11 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3574
3611
|
function getPopupContainer() {
|
|
3575
3612
|
return document.body;
|
|
3576
3613
|
}
|
|
3614
|
+
vue.watch(childRules, (val) => {
|
|
3615
|
+
emits("change", val);
|
|
3616
|
+
}, {
|
|
3617
|
+
deep: true
|
|
3618
|
+
});
|
|
3577
3619
|
return (_ctx, _cache) => {
|
|
3578
3620
|
const _component_Delete = vue.resolveComponent("Delete");
|
|
3579
3621
|
const _component_ARow = vue.resolveComponent("ARow");
|
|
@@ -3654,12 +3696,17 @@ var TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "table-co
|
|
|
3654
3696
|
|
|
3655
3697
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
3656
3698
|
__name: "text-color",
|
|
3657
|
-
props: ["
|
|
3658
|
-
|
|
3699
|
+
props: ["color"],
|
|
3700
|
+
emits: ["change"],
|
|
3701
|
+
setup(__props, { emit: emits }) {
|
|
3659
3702
|
const props = __props;
|
|
3703
|
+
const color = vue.ref(props.color);
|
|
3704
|
+
function getColor(curColor) {
|
|
3705
|
+
return curColor === Colors.Black ? Colors.Blue : Colors.Black;
|
|
3706
|
+
}
|
|
3660
3707
|
function handleClick() {
|
|
3661
|
-
|
|
3662
|
-
|
|
3708
|
+
color.value = getColor(color.value);
|
|
3709
|
+
emits("change", color.value);
|
|
3663
3710
|
}
|
|
3664
3711
|
return (_ctx, _cache) => {
|
|
3665
3712
|
const _component_ColorPanel = vue.resolveComponent("ColorPanel");
|
|
@@ -3671,16 +3718,11 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3671
3718
|
width: "1em",
|
|
3672
3719
|
height: "1em",
|
|
3673
3720
|
fontSize: "20px",
|
|
3674
|
-
color:
|
|
3721
|
+
color: getColor(color.value),
|
|
3675
3722
|
cursor: "pointer"
|
|
3676
3723
|
}),
|
|
3677
3724
|
onClick: vue.withModifiers(handleClick, ["prevent", "stop"])
|
|
3678
|
-
},
|
|
3679
|
-
default: vue.withCtx(() => [
|
|
3680
|
-
vue.createTextVNode("change")
|
|
3681
|
-
]),
|
|
3682
|
-
_: 1
|
|
3683
|
-
}, 8, ["style", "onClick"]);
|
|
3725
|
+
}, null, 8, ["style", "onClick"]);
|
|
3684
3726
|
};
|
|
3685
3727
|
}
|
|
3686
3728
|
});
|
|
@@ -3970,6 +4012,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3970
4012
|
return rule.config.config.parse(rule);
|
|
3971
4013
|
}
|
|
3972
4014
|
function edit(formRules) {
|
|
4015
|
+
widgetFormRules.splice(0);
|
|
3973
4016
|
formRules.forEach((item) => {
|
|
3974
4017
|
const rule = makeRule(ruleList[item.name]);
|
|
3975
4018
|
delete item.name;
|
|
@@ -3987,22 +4030,70 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3987
4030
|
function getRule(name) {
|
|
3988
4031
|
return makeRule(ruleList[name]);
|
|
3989
4032
|
}
|
|
4033
|
+
function validate() {
|
|
4034
|
+
let pass = true;
|
|
4035
|
+
for (const rule of widgetFormRules) {
|
|
4036
|
+
const config = rule.config.config || {};
|
|
4037
|
+
const childRules = rule.config.childRules || [];
|
|
4038
|
+
if (!rule?.title?.title && config.name !== "instruction") {
|
|
4039
|
+
pass = false;
|
|
4040
|
+
}
|
|
4041
|
+
if (config.name === "table" && !childRules.length) {
|
|
4042
|
+
pass = false;
|
|
4043
|
+
}
|
|
4044
|
+
if (!pass && rule.field !== activeRule.value.field) {
|
|
4045
|
+
setActiveRule(rule);
|
|
4046
|
+
}
|
|
4047
|
+
if (pass && childRules.length) {
|
|
4048
|
+
for (const childRule of childRules) {
|
|
4049
|
+
if (!childRule?.title?.title) {
|
|
4050
|
+
pass = false;
|
|
4051
|
+
if (childRule.field !== activeRule.value.field) {
|
|
4052
|
+
setActiveRule(childRule, rule);
|
|
4053
|
+
}
|
|
4054
|
+
break;
|
|
4055
|
+
}
|
|
4056
|
+
}
|
|
4057
|
+
}
|
|
4058
|
+
if (!pass) {
|
|
4059
|
+
vue.nextTick(() => {
|
|
4060
|
+
fApi.value.validate();
|
|
4061
|
+
});
|
|
4062
|
+
break;
|
|
4063
|
+
}
|
|
4064
|
+
}
|
|
4065
|
+
return pass;
|
|
4066
|
+
}
|
|
4067
|
+
function flowConditionEffect(activeProps2, flowCondition) {
|
|
4068
|
+
const requiredRule = activeProps2?.find((rule) => rule.field === "effect.required");
|
|
4069
|
+
if (requiredRule) {
|
|
4070
|
+
if (!requiredRule.props) {
|
|
4071
|
+
requiredRule.props = {};
|
|
4072
|
+
}
|
|
4073
|
+
requiredRule.props.disabled = !!flowCondition[activeRule.value.field];
|
|
4074
|
+
}
|
|
4075
|
+
}
|
|
3990
4076
|
vue.watch(() => props.presetRules, (presetRules) => {
|
|
3991
4077
|
widgetFormRules.push(...presetRules);
|
|
3992
|
-
}, {
|
|
3993
|
-
immediate: true
|
|
3994
4078
|
});
|
|
3995
4079
|
vue.watch(() => props.formRules, (formRules) => {
|
|
3996
4080
|
edit(formRules);
|
|
4081
|
+
});
|
|
4082
|
+
vue.watch(activeProps, (activeProps2) => {
|
|
4083
|
+
flowConditionEffect(activeProps2, props.flowCondition);
|
|
4084
|
+
});
|
|
4085
|
+
vue.watch(() => props.flowCondition, (flowCondition) => {
|
|
4086
|
+
flowConditionEffect(activeProps.value, flowCondition);
|
|
3997
4087
|
}, {
|
|
3998
|
-
|
|
4088
|
+
deep: true
|
|
3999
4089
|
});
|
|
4000
4090
|
vue.onBeforeUnmount(() => {
|
|
4001
4091
|
resetIndex();
|
|
4002
4092
|
});
|
|
4003
4093
|
expose({
|
|
4004
4094
|
getFormRule,
|
|
4005
|
-
getRule
|
|
4095
|
+
getRule,
|
|
4096
|
+
validate
|
|
4006
4097
|
});
|
|
4007
4098
|
return (_ctx, _cache) => {
|
|
4008
4099
|
const _component_ACol = vue.resolveComponent("ACol");
|
|
@@ -4045,7 +4136,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4045
4136
|
move: moveMenuItem,
|
|
4046
4137
|
"force-fallback": true,
|
|
4047
4138
|
"scroll-sensitivity": 100,
|
|
4048
|
-
delay: 50,
|
|
4049
4139
|
onStart: handleMenuItemDragStart,
|
|
4050
4140
|
onEnd: handleMenuItemDragEnd
|
|
4051
4141
|
}, {
|