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;
|
|
@@ -18,7 +18,10 @@ const fieldRatioMap = {
|
|
|
18
18
|
12: 12,
|
|
19
19
|
18: 18,
|
|
20
20
|
24: 24,
|
|
21
|
-
};
|
|
21
|
+
};
|
|
22
|
+
function getContainer() {
|
|
23
|
+
return document.body;
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
var input = {
|
|
24
27
|
name: 'input',
|
|
@@ -66,7 +69,7 @@ var input = {
|
|
|
66
69
|
field,
|
|
67
70
|
title: data.title.title,
|
|
68
71
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
69
|
-
|
|
72
|
+
minWidth: data.config.fieldRatio,
|
|
70
73
|
slots: {
|
|
71
74
|
default({ row }) {
|
|
72
75
|
return h(Input, {
|
|
@@ -131,7 +134,7 @@ var textarea = {
|
|
|
131
134
|
field,
|
|
132
135
|
title: data.title.title,
|
|
133
136
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
134
|
-
|
|
137
|
+
minWidth: data.config.fieldRatio,
|
|
135
138
|
slots: {
|
|
136
139
|
default({ row }) {
|
|
137
140
|
return h(Input, {
|
|
@@ -200,7 +203,7 @@ var numInput = {
|
|
|
200
203
|
field,
|
|
201
204
|
title: data.title.title,
|
|
202
205
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
203
|
-
|
|
206
|
+
minWidth: data.config.fieldRatio,
|
|
204
207
|
slots: {
|
|
205
208
|
default({ row }) {
|
|
206
209
|
return h(InputNumber, {
|
|
@@ -265,13 +268,14 @@ var radio = {
|
|
|
265
268
|
field,
|
|
266
269
|
title: data.title.title,
|
|
267
270
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
268
|
-
|
|
271
|
+
minWidth: data.config.fieldRatio,
|
|
269
272
|
slots: {
|
|
270
273
|
default({ row }) {
|
|
271
274
|
return h(Select, {
|
|
272
275
|
value: row[field],
|
|
273
276
|
placeholder: data.props.placeholder,
|
|
274
277
|
options: data.options,
|
|
278
|
+
getPopupContainer: getContainer,
|
|
275
279
|
'onUpdate:value': (value) => {
|
|
276
280
|
row[field] = value;
|
|
277
281
|
},
|
|
@@ -326,7 +330,7 @@ var checkbox = {
|
|
|
326
330
|
field,
|
|
327
331
|
title: data.title.title,
|
|
328
332
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
329
|
-
|
|
333
|
+
minWidth: data.config.fieldRatio,
|
|
330
334
|
slots: {
|
|
331
335
|
default({ row }) {
|
|
332
336
|
return h(Select, {
|
|
@@ -334,6 +338,7 @@ var checkbox = {
|
|
|
334
338
|
placeholder: data.props.placeholder,
|
|
335
339
|
options: data.options,
|
|
336
340
|
mode: 'multiple',
|
|
341
|
+
getPopupContainer: getContainer,
|
|
337
342
|
'onUpdate:value': (value) => {
|
|
338
343
|
row[field] = value;
|
|
339
344
|
},
|
|
@@ -407,7 +412,7 @@ var date = {
|
|
|
407
412
|
field,
|
|
408
413
|
title: data.title.title,
|
|
409
414
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
410
|
-
|
|
415
|
+
minWidth: data.config.fieldRatio,
|
|
411
416
|
slots: {
|
|
412
417
|
default({ row }) {
|
|
413
418
|
return h(DatePicker, {
|
|
@@ -423,6 +428,7 @@ var date = {
|
|
|
423
428
|
style: {
|
|
424
429
|
width: '100%',
|
|
425
430
|
},
|
|
431
|
+
getCalendarContainer: getContainer,
|
|
426
432
|
});
|
|
427
433
|
},
|
|
428
434
|
},
|
|
@@ -442,7 +448,7 @@ var dateRange = {
|
|
|
442
448
|
type: 'datePicker',
|
|
443
449
|
field: data.field,
|
|
444
450
|
title: data.title.title,
|
|
445
|
-
props: Object.assign({ range: true, separator: '~', format, valueFormat: format, placeholder: data.props.placeholder }, extraProps),
|
|
451
|
+
props: Object.assign({ range: true, separator: '~', format, valueFormat: format, placeholder: data.props.placeholder, getCalendarContainer: getContainer }, extraProps),
|
|
446
452
|
effect: {
|
|
447
453
|
required: data.effect.required && '请选择',
|
|
448
454
|
},
|
|
@@ -487,7 +493,7 @@ var dateRange = {
|
|
|
487
493
|
field,
|
|
488
494
|
title: data.title.title,
|
|
489
495
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
490
|
-
|
|
496
|
+
minWidth: data.config.fieldRatio,
|
|
491
497
|
slots: {
|
|
492
498
|
default({ row }) {
|
|
493
499
|
return h(RangePicker, {
|
|
@@ -503,6 +509,7 @@ var dateRange = {
|
|
|
503
509
|
style: {
|
|
504
510
|
width: '100%',
|
|
505
511
|
},
|
|
512
|
+
getCalendarContainer: getContainer,
|
|
506
513
|
});
|
|
507
514
|
},
|
|
508
515
|
},
|
|
@@ -879,7 +886,7 @@ var people = {
|
|
|
879
886
|
field,
|
|
880
887
|
title: data.title.title,
|
|
881
888
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
882
|
-
|
|
889
|
+
minWidth: data.config.fieldRatio,
|
|
883
890
|
slots: {
|
|
884
891
|
default({ row }) {
|
|
885
892
|
return h(StaffSelector, Object.assign({ title: '添加员工', mode: data.props.limit ? 'radio' : 'multiple', placeholder: data.props.placeholder, onChange: (value) => {
|
|
@@ -1278,7 +1285,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1278
1285
|
field,
|
|
1279
1286
|
title: "\u5546\u54C1\u7F16\u7801",
|
|
1280
1287
|
headerClassName: rule.effect.required ? "is-required" : "",
|
|
1281
|
-
|
|
1288
|
+
minWidth: "138px",
|
|
1282
1289
|
slots: {
|
|
1283
1290
|
default({ row }) {
|
|
1284
1291
|
return h(Input, {
|
|
@@ -1301,7 +1308,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1301
1308
|
columns2.push({
|
|
1302
1309
|
field: childField,
|
|
1303
1310
|
title: item.label,
|
|
1304
|
-
|
|
1311
|
+
minWidth: "138px",
|
|
1305
1312
|
slots: {
|
|
1306
1313
|
default({ row }) {
|
|
1307
1314
|
if (item.value === "\u5546\u54C1\u56FE\u7247" && row[childField]) {
|
|
@@ -2157,9 +2164,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
2157
2164
|
"filter-option": false,
|
|
2158
2165
|
"not-found-content": null,
|
|
2159
2166
|
options: options.value,
|
|
2167
|
+
"get-popup-container": unref(getContainer),
|
|
2160
2168
|
onChange: handleChange,
|
|
2161
2169
|
onSearch: handleSearch
|
|
2162
|
-
}, null, 8, ["value", "options"]);
|
|
2170
|
+
}, null, 8, ["value", "options", "get-popup-container"]);
|
|
2163
2171
|
};
|
|
2164
2172
|
}
|
|
2165
2173
|
});
|
|
@@ -2236,7 +2244,7 @@ var shop = {
|
|
|
2236
2244
|
field,
|
|
2237
2245
|
title: data.title.title,
|
|
2238
2246
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
2239
|
-
|
|
2247
|
+
minWidth: '138px',
|
|
2240
2248
|
slots: {
|
|
2241
2249
|
default({ row }) {
|
|
2242
2250
|
return h(ShopWidget, {
|
|
@@ -2295,8 +2303,9 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2295
2303
|
multiple: __props.multiple,
|
|
2296
2304
|
options: options.value,
|
|
2297
2305
|
"load-data": loadData,
|
|
2306
|
+
"get-popup-container": unref(getContainer),
|
|
2298
2307
|
"onUpdate:value": handleChange
|
|
2299
|
-
}, null, 8, ["value", "multiple", "options"]);
|
|
2308
|
+
}, null, 8, ["value", "multiple", "options", "get-popup-container"]);
|
|
2300
2309
|
};
|
|
2301
2310
|
}
|
|
2302
2311
|
});
|
|
@@ -2437,7 +2446,7 @@ var materialType = {
|
|
|
2437
2446
|
field,
|
|
2438
2447
|
title: '素材类型',
|
|
2439
2448
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
2440
|
-
|
|
2449
|
+
minWidth: '138px',
|
|
2441
2450
|
slots: {
|
|
2442
2451
|
default({ row }) {
|
|
2443
2452
|
return h(materialTypeInTable, {
|
|
@@ -2574,7 +2583,7 @@ var department = {
|
|
|
2574
2583
|
field,
|
|
2575
2584
|
title: data.title.title,
|
|
2576
2585
|
headerClassName: data.effect.required ? 'is-required' : '',
|
|
2577
|
-
|
|
2586
|
+
minWidth: data.config.fieldRatio,
|
|
2578
2587
|
slots: {
|
|
2579
2588
|
default({ row }) {
|
|
2580
2589
|
return h(StaffSelector, Object.assign({ title: '添加部门', mode: data.props.limit ? 'radio' : 'multiple', placeholder: data.props.placeholder, immediateFetch: true, unitStr: '个', onChange: (value) => {
|
|
@@ -2759,7 +2768,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2759
2768
|
props: ["info"],
|
|
2760
2769
|
setup(__props) {
|
|
2761
2770
|
return (_ctx, _cache) => {
|
|
2762
|
-
return openBlock(), createElementBlock(
|
|
2771
|
+
return openBlock(), createElementBlock("div", null, [
|
|
2763
2772
|
!__props.info?.status ? (openBlock(), createElementBlock("div", _hoisted_1, "\u5BA1\u6279\u72B6\u6001")) : (openBlock(), createBlock(ApprovalStatus, {
|
|
2764
2773
|
key: 1,
|
|
2765
2774
|
class: "bm-form-basic-info__approval-status",
|
|
@@ -2768,7 +2777,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2768
2777
|
_hoisted_2,
|
|
2769
2778
|
_hoisted_3,
|
|
2770
2779
|
_hoisted_4
|
|
2771
|
-
]
|
|
2780
|
+
]);
|
|
2772
2781
|
};
|
|
2773
2782
|
}
|
|
2774
2783
|
});
|
|
@@ -2776,7 +2785,7 @@ var FormBasicInfo = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "formBa
|
|
|
2776
2785
|
|
|
2777
2786
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2778
2787
|
__name: "form-create",
|
|
2779
|
-
props: ["fdRule", "extraConfig", "value"],
|
|
2788
|
+
props: ["fdRule", "extraConfig", "value", "info"],
|
|
2780
2789
|
emits: ["update:value"],
|
|
2781
2790
|
setup(__props, { expose, emit: emits }) {
|
|
2782
2791
|
const props = __props;
|
|
@@ -2818,7 +2827,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2818
2827
|
item.value = props.value[item.field];
|
|
2819
2828
|
});
|
|
2820
2829
|
}
|
|
2821
|
-
rule2.value = props.value[rule2.field];
|
|
2830
|
+
rule2.value = props.value[rule2.field] || rule2.value;
|
|
2822
2831
|
});
|
|
2823
2832
|
return ruleData;
|
|
2824
2833
|
}
|
|
@@ -2831,7 +2840,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2831
2840
|
return (_ctx, _cache) => {
|
|
2832
2841
|
const _component_formCreate = resolveComponent("formCreate", true);
|
|
2833
2842
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2834
|
-
createVNode(FormBasicInfo
|
|
2843
|
+
createVNode(FormBasicInfo, {
|
|
2844
|
+
class: "bm-fc-form-basic-info",
|
|
2845
|
+
info: __props.info
|
|
2846
|
+
}, null, 8, ["info"]),
|
|
2835
2847
|
createVNode(_component_formCreate, {
|
|
2836
2848
|
api: fApi.value,
|
|
2837
2849
|
"onUpdate:api": _cache[0] || (_cache[0] = ($event) => fApi.value = $event),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import { defineComponent, openBlock, createElementBlock, normalizeStyle, toDisplayString, computed, resolveComponent, normalizeClass, unref, createBlock, createCommentVNode, withCtx, createVNode, createTextVNode, withModifiers, ref, watch, createElementVNode, Fragment, isRef, renderList, renderSlot,
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, normalizeStyle, toDisplayString, computed, resolveComponent, normalizeClass, unref, createBlock, createCommentVNode, withCtx, createVNode, createTextVNode, withModifiers, ref, watch, createElementVNode, nextTick, Fragment, isRef, renderList, renderSlot, createStaticVNode, reactive, onBeforeUnmount, resolveDynamicComponent } from 'vue';
|
|
3
3
|
import uniqueId from 'bm-admin-ui/es/utils/uniqueId';
|
|
4
4
|
import Draggable from 'vuedraggable';
|
|
5
5
|
import { Tooltip, FormItemRest, Input, Button, RadioGroup, Radio, DatePicker, Checkbox, Tabs, TabPane, Row, Col, Dropdown, Menu, CheckboxGroup, MenuItem, Divider, Switch, Select, Layout, LayoutSider, LayoutContent, message } from 'ant-design-vue';
|
|
@@ -466,7 +466,7 @@ var input = {
|
|
|
466
466
|
},
|
|
467
467
|
},
|
|
468
468
|
effect: {
|
|
469
|
-
required:
|
|
469
|
+
required: false,
|
|
470
470
|
formRule: 'formRule',
|
|
471
471
|
},
|
|
472
472
|
props: {
|
|
@@ -499,6 +499,7 @@ var input = {
|
|
|
499
499
|
field: fieldsMap$g['props.placeholder'],
|
|
500
500
|
props: {
|
|
501
501
|
placeholder: '请输入',
|
|
502
|
+
maxlength: 30,
|
|
502
503
|
},
|
|
503
504
|
value: rule.props.placeholder,
|
|
504
505
|
},
|
|
@@ -508,6 +509,7 @@ var input = {
|
|
|
508
509
|
field: fieldsMap$g['value'],
|
|
509
510
|
props: {
|
|
510
511
|
placeholder: '请输入',
|
|
512
|
+
maxlength: 200,
|
|
511
513
|
},
|
|
512
514
|
value: rule.value,
|
|
513
515
|
},
|
|
@@ -567,7 +569,7 @@ var textarea = {
|
|
|
567
569
|
},
|
|
568
570
|
},
|
|
569
571
|
effect: {
|
|
570
|
-
required:
|
|
572
|
+
required: false,
|
|
571
573
|
formRule: 'formRule',
|
|
572
574
|
},
|
|
573
575
|
props: {
|
|
@@ -601,6 +603,7 @@ var textarea = {
|
|
|
601
603
|
field: fieldsMap$f['props.placeholder'],
|
|
602
604
|
props: {
|
|
603
605
|
placeholder: '请输入',
|
|
606
|
+
maxlength: 30,
|
|
604
607
|
},
|
|
605
608
|
value: rule.props.placeholder,
|
|
606
609
|
},
|
|
@@ -610,6 +613,7 @@ var textarea = {
|
|
|
610
613
|
field: fieldsMap$f['value'],
|
|
611
614
|
props: {
|
|
612
615
|
placeholder: '请输入',
|
|
616
|
+
maxlength: 5000,
|
|
613
617
|
},
|
|
614
618
|
value: rule.value,
|
|
615
619
|
},
|
|
@@ -670,7 +674,7 @@ var numInput = {
|
|
|
670
674
|
},
|
|
671
675
|
},
|
|
672
676
|
effect: {
|
|
673
|
-
required:
|
|
677
|
+
required: false,
|
|
674
678
|
formRule: 'formRule',
|
|
675
679
|
},
|
|
676
680
|
props: {
|
|
@@ -705,6 +709,7 @@ var numInput = {
|
|
|
705
709
|
field: fieldsMap$e['props.placeholder'],
|
|
706
710
|
props: {
|
|
707
711
|
placeholder: '请输入',
|
|
712
|
+
maxlength: 30,
|
|
708
713
|
},
|
|
709
714
|
value: rule.props.placeholder,
|
|
710
715
|
},
|
|
@@ -778,6 +783,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
778
783
|
const visible = ref(false);
|
|
779
784
|
const text = ref("");
|
|
780
785
|
const repeatOption = ref([]);
|
|
786
|
+
const maxlength = 500;
|
|
781
787
|
function edit() {
|
|
782
788
|
visible.value = true;
|
|
783
789
|
text.value = makeText(props.options);
|
|
@@ -799,6 +805,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
799
805
|
function handleOk() {
|
|
800
806
|
const options = text.value.split("\n").reduce((pre, cur) => {
|
|
801
807
|
if (cur) {
|
|
808
|
+
cur = cur.substring(0, maxlength - 1);
|
|
802
809
|
pre.push({ value: cur, label: cur });
|
|
803
810
|
}
|
|
804
811
|
return pre;
|
|
@@ -863,6 +870,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
863
870
|
"bm-handle-options__input",
|
|
864
871
|
repeatOption.value.length && repeatOption.value.includes(element.value) ? "is-error" : ""
|
|
865
872
|
]),
|
|
873
|
+
maxlength,
|
|
866
874
|
onBlur: ($event) => handleBlur(element)
|
|
867
875
|
}, null, 8, ["value", "onUpdate:value", "class", "onBlur"])
|
|
868
876
|
]),
|
|
@@ -959,7 +967,7 @@ var radio = {
|
|
|
959
967
|
},
|
|
960
968
|
},
|
|
961
969
|
effect: {
|
|
962
|
-
required:
|
|
970
|
+
required: false,
|
|
963
971
|
formRule: 'formRule',
|
|
964
972
|
},
|
|
965
973
|
options: [
|
|
@@ -1005,6 +1013,7 @@ var radio = {
|
|
|
1005
1013
|
field: fieldsMap$d['props.placeholder'],
|
|
1006
1014
|
props: {
|
|
1007
1015
|
placeholder: '请输入',
|
|
1016
|
+
maxlength: 30,
|
|
1008
1017
|
},
|
|
1009
1018
|
value: rule.props.placeholder,
|
|
1010
1019
|
},
|
|
@@ -1097,7 +1106,7 @@ var checkbox = {
|
|
|
1097
1106
|
},
|
|
1098
1107
|
},
|
|
1099
1108
|
effect: {
|
|
1100
|
-
required:
|
|
1109
|
+
required: false,
|
|
1101
1110
|
formRule: 'formRule',
|
|
1102
1111
|
},
|
|
1103
1112
|
options: [
|
|
@@ -1143,6 +1152,7 @@ var checkbox = {
|
|
|
1143
1152
|
field: fieldsMap$c['props.placeholder'],
|
|
1144
1153
|
props: {
|
|
1145
1154
|
placeholder: '请输入',
|
|
1155
|
+
maxlength: 30,
|
|
1146
1156
|
},
|
|
1147
1157
|
value: rule.props.placeholder,
|
|
1148
1158
|
},
|
|
@@ -1304,7 +1314,7 @@ var date = {
|
|
|
1304
1314
|
},
|
|
1305
1315
|
},
|
|
1306
1316
|
effect: {
|
|
1307
|
-
required:
|
|
1317
|
+
required: false,
|
|
1308
1318
|
formRule: 'formRule',
|
|
1309
1319
|
},
|
|
1310
1320
|
props: {
|
|
@@ -1367,6 +1377,7 @@ var date = {
|
|
|
1367
1377
|
field: fieldsMap$b['props.placeholder'],
|
|
1368
1378
|
props: {
|
|
1369
1379
|
placeholder: '请输入',
|
|
1380
|
+
maxlength: 30,
|
|
1370
1381
|
},
|
|
1371
1382
|
value: rule.props.placeholder,
|
|
1372
1383
|
},
|
|
@@ -1448,7 +1459,7 @@ var dateRange = {
|
|
|
1448
1459
|
},
|
|
1449
1460
|
},
|
|
1450
1461
|
effect: {
|
|
1451
|
-
required:
|
|
1462
|
+
required: false,
|
|
1452
1463
|
formRule: 'formRule',
|
|
1453
1464
|
},
|
|
1454
1465
|
props: {
|
|
@@ -1513,6 +1524,7 @@ var dateRange = {
|
|
|
1513
1524
|
field: fieldsMap$a['props.placeholder.0'],
|
|
1514
1525
|
props: {
|
|
1515
1526
|
placeholder: '请输入',
|
|
1527
|
+
maxlength: 30,
|
|
1516
1528
|
},
|
|
1517
1529
|
value: rule.props.placeholder[0],
|
|
1518
1530
|
},
|
|
@@ -1522,6 +1534,7 @@ var dateRange = {
|
|
|
1522
1534
|
field: fieldsMap$a['props.placeholder.1'],
|
|
1523
1535
|
props: {
|
|
1524
1536
|
placeholder: '请输入',
|
|
1537
|
+
maxlength: 30,
|
|
1525
1538
|
},
|
|
1526
1539
|
value: rule.props.placeholder[1],
|
|
1527
1540
|
},
|
|
@@ -1595,10 +1608,23 @@ var instruction = {
|
|
|
1595
1608
|
title: label$9,
|
|
1596
1609
|
field: fieldsMap$9.value,
|
|
1597
1610
|
value: rule.value,
|
|
1611
|
+
inject: true,
|
|
1598
1612
|
prefix: {
|
|
1599
1613
|
type: 'TextColor',
|
|
1614
|
+
on: {
|
|
1615
|
+
change({ api, self }, color) {
|
|
1616
|
+
api.emit('change', 'style.color', color, self, api, true);
|
|
1617
|
+
},
|
|
1618
|
+
},
|
|
1600
1619
|
props: {
|
|
1601
|
-
rule,
|
|
1620
|
+
color: rule.style.color,
|
|
1621
|
+
},
|
|
1622
|
+
},
|
|
1623
|
+
on: {
|
|
1624
|
+
change({ api, self }, list) {
|
|
1625
|
+
nextTick(() => {
|
|
1626
|
+
api.refresh();
|
|
1627
|
+
});
|
|
1602
1628
|
},
|
|
1603
1629
|
},
|
|
1604
1630
|
},
|
|
@@ -1641,7 +1667,7 @@ var picture = {
|
|
|
1641
1667
|
},
|
|
1642
1668
|
},
|
|
1643
1669
|
effect: {
|
|
1644
|
-
required:
|
|
1670
|
+
required: false,
|
|
1645
1671
|
formRule: 'formRule',
|
|
1646
1672
|
},
|
|
1647
1673
|
props: {
|
|
@@ -1990,7 +2016,15 @@ var table = {
|
|
|
1990
2016
|
effect: {
|
|
1991
2017
|
required: true,
|
|
1992
2018
|
},
|
|
2019
|
+
inject: true,
|
|
1993
2020
|
value: rule.config.childRules,
|
|
2021
|
+
on: {
|
|
2022
|
+
change({ api, self }, list) {
|
|
2023
|
+
nextTick(() => {
|
|
2024
|
+
api.validate();
|
|
2025
|
+
});
|
|
2026
|
+
},
|
|
2027
|
+
},
|
|
1994
2028
|
},
|
|
1995
2029
|
{
|
|
1996
2030
|
type: 'checkbox',
|
|
@@ -2053,7 +2087,7 @@ var file = {
|
|
|
2053
2087
|
},
|
|
2054
2088
|
},
|
|
2055
2089
|
effect: {
|
|
2056
|
-
required:
|
|
2090
|
+
required: false,
|
|
2057
2091
|
formRule: 'formRule',
|
|
2058
2092
|
},
|
|
2059
2093
|
config: {
|
|
@@ -2124,7 +2158,7 @@ var people = {
|
|
|
2124
2158
|
},
|
|
2125
2159
|
},
|
|
2126
2160
|
effect: {
|
|
2127
|
-
required:
|
|
2161
|
+
required: false,
|
|
2128
2162
|
formRule: 'formRule',
|
|
2129
2163
|
},
|
|
2130
2164
|
props: {
|
|
@@ -2157,6 +2191,7 @@ var people = {
|
|
|
2157
2191
|
field: fieldsMap$5['props.placeholder'],
|
|
2158
2192
|
props: {
|
|
2159
2193
|
placeholder: '请输入',
|
|
2194
|
+
maxlength: 30,
|
|
2160
2195
|
},
|
|
2161
2196
|
value: rule.props.placeholder,
|
|
2162
2197
|
},
|
|
@@ -2245,7 +2280,7 @@ var department = {
|
|
|
2245
2280
|
},
|
|
2246
2281
|
},
|
|
2247
2282
|
effect: {
|
|
2248
|
-
required:
|
|
2283
|
+
required: false,
|
|
2249
2284
|
formRule: 'formRule',
|
|
2250
2285
|
},
|
|
2251
2286
|
props: {
|
|
@@ -2278,6 +2313,7 @@ var department = {
|
|
|
2278
2313
|
field: fieldsMap$4['props.placeholder'],
|
|
2279
2314
|
props: {
|
|
2280
2315
|
placeholder: '请输入',
|
|
2316
|
+
maxlength: 30,
|
|
2281
2317
|
},
|
|
2282
2318
|
value: rule.props.placeholder,
|
|
2283
2319
|
},
|
|
@@ -3539,7 +3575,8 @@ const _hoisted_2$1 = { class: "bm-table-column-btn-wrap" };
|
|
|
3539
3575
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3540
3576
|
__name: "table-column",
|
|
3541
3577
|
props: ["formCreateInject"],
|
|
3542
|
-
|
|
3578
|
+
emits: ["change"],
|
|
3579
|
+
setup(__props, { emit: emits }) {
|
|
3543
3580
|
const props = __props;
|
|
3544
3581
|
const handleClass = "bm-table-column__drag-icon";
|
|
3545
3582
|
const btnCom = ref();
|
|
@@ -3564,6 +3601,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3564
3601
|
function getPopupContainer() {
|
|
3565
3602
|
return document.body;
|
|
3566
3603
|
}
|
|
3604
|
+
watch(childRules, (val) => {
|
|
3605
|
+
emits("change", val);
|
|
3606
|
+
}, {
|
|
3607
|
+
deep: true
|
|
3608
|
+
});
|
|
3567
3609
|
return (_ctx, _cache) => {
|
|
3568
3610
|
const _component_Delete = resolveComponent("Delete");
|
|
3569
3611
|
const _component_ARow = resolveComponent("ARow");
|
|
@@ -3644,12 +3686,17 @@ var TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "table-co
|
|
|
3644
3686
|
|
|
3645
3687
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3646
3688
|
__name: "text-color",
|
|
3647
|
-
props: ["
|
|
3648
|
-
|
|
3689
|
+
props: ["color"],
|
|
3690
|
+
emits: ["change"],
|
|
3691
|
+
setup(__props, { emit: emits }) {
|
|
3649
3692
|
const props = __props;
|
|
3693
|
+
const color = ref(props.color);
|
|
3694
|
+
function getColor(curColor) {
|
|
3695
|
+
return curColor === Colors.Black ? Colors.Blue : Colors.Black;
|
|
3696
|
+
}
|
|
3650
3697
|
function handleClick() {
|
|
3651
|
-
|
|
3652
|
-
|
|
3698
|
+
color.value = getColor(color.value);
|
|
3699
|
+
emits("change", color.value);
|
|
3653
3700
|
}
|
|
3654
3701
|
return (_ctx, _cache) => {
|
|
3655
3702
|
const _component_ColorPanel = resolveComponent("ColorPanel");
|
|
@@ -3661,16 +3708,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3661
3708
|
width: "1em",
|
|
3662
3709
|
height: "1em",
|
|
3663
3710
|
fontSize: "20px",
|
|
3664
|
-
color:
|
|
3711
|
+
color: getColor(color.value),
|
|
3665
3712
|
cursor: "pointer"
|
|
3666
3713
|
}),
|
|
3667
3714
|
onClick: withModifiers(handleClick, ["prevent", "stop"])
|
|
3668
|
-
},
|
|
3669
|
-
default: withCtx(() => [
|
|
3670
|
-
createTextVNode("change")
|
|
3671
|
-
]),
|
|
3672
|
-
_: 1
|
|
3673
|
-
}, 8, ["style", "onClick"]);
|
|
3715
|
+
}, null, 8, ["style", "onClick"]);
|
|
3674
3716
|
};
|
|
3675
3717
|
}
|
|
3676
3718
|
});
|
|
@@ -3960,6 +4002,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3960
4002
|
return rule.config.config.parse(rule);
|
|
3961
4003
|
}
|
|
3962
4004
|
function edit(formRules) {
|
|
4005
|
+
widgetFormRules.splice(0);
|
|
3963
4006
|
formRules.forEach((item) => {
|
|
3964
4007
|
const rule = makeRule(ruleList[item.name]);
|
|
3965
4008
|
delete item.name;
|
|
@@ -3977,22 +4020,70 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3977
4020
|
function getRule(name) {
|
|
3978
4021
|
return makeRule(ruleList[name]);
|
|
3979
4022
|
}
|
|
4023
|
+
function validate() {
|
|
4024
|
+
let pass = true;
|
|
4025
|
+
for (const rule of widgetFormRules) {
|
|
4026
|
+
const config = rule.config.config || {};
|
|
4027
|
+
const childRules = rule.config.childRules || [];
|
|
4028
|
+
if (!rule?.title?.title && config.name !== "instruction") {
|
|
4029
|
+
pass = false;
|
|
4030
|
+
}
|
|
4031
|
+
if (config.name === "table" && !childRules.length) {
|
|
4032
|
+
pass = false;
|
|
4033
|
+
}
|
|
4034
|
+
if (!pass && rule.field !== activeRule.value.field) {
|
|
4035
|
+
setActiveRule(rule);
|
|
4036
|
+
}
|
|
4037
|
+
if (pass && childRules.length) {
|
|
4038
|
+
for (const childRule of childRules) {
|
|
4039
|
+
if (!childRule?.title?.title) {
|
|
4040
|
+
pass = false;
|
|
4041
|
+
if (childRule.field !== activeRule.value.field) {
|
|
4042
|
+
setActiveRule(childRule, rule);
|
|
4043
|
+
}
|
|
4044
|
+
break;
|
|
4045
|
+
}
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
if (!pass) {
|
|
4049
|
+
nextTick(() => {
|
|
4050
|
+
fApi.value.validate();
|
|
4051
|
+
});
|
|
4052
|
+
break;
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
4055
|
+
return pass;
|
|
4056
|
+
}
|
|
4057
|
+
function flowConditionEffect(activeProps2, flowCondition) {
|
|
4058
|
+
const requiredRule = activeProps2?.find((rule) => rule.field === "effect.required");
|
|
4059
|
+
if (requiredRule) {
|
|
4060
|
+
if (!requiredRule.props) {
|
|
4061
|
+
requiredRule.props = {};
|
|
4062
|
+
}
|
|
4063
|
+
requiredRule.props.disabled = !!flowCondition[activeRule.value.field];
|
|
4064
|
+
}
|
|
4065
|
+
}
|
|
3980
4066
|
watch(() => props.presetRules, (presetRules) => {
|
|
3981
4067
|
widgetFormRules.push(...presetRules);
|
|
3982
|
-
}, {
|
|
3983
|
-
immediate: true
|
|
3984
4068
|
});
|
|
3985
4069
|
watch(() => props.formRules, (formRules) => {
|
|
3986
4070
|
edit(formRules);
|
|
4071
|
+
});
|
|
4072
|
+
watch(activeProps, (activeProps2) => {
|
|
4073
|
+
flowConditionEffect(activeProps2, props.flowCondition);
|
|
4074
|
+
});
|
|
4075
|
+
watch(() => props.flowCondition, (flowCondition) => {
|
|
4076
|
+
flowConditionEffect(activeProps.value, flowCondition);
|
|
3987
4077
|
}, {
|
|
3988
|
-
|
|
4078
|
+
deep: true
|
|
3989
4079
|
});
|
|
3990
4080
|
onBeforeUnmount(() => {
|
|
3991
4081
|
resetIndex();
|
|
3992
4082
|
});
|
|
3993
4083
|
expose({
|
|
3994
4084
|
getFormRule,
|
|
3995
|
-
getRule
|
|
4085
|
+
getRule,
|
|
4086
|
+
validate
|
|
3996
4087
|
});
|
|
3997
4088
|
return (_ctx, _cache) => {
|
|
3998
4089
|
const _component_ACol = resolveComponent("ACol");
|
|
@@ -4035,7 +4126,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4035
4126
|
move: moveMenuItem,
|
|
4036
4127
|
"force-fallback": true,
|
|
4037
4128
|
"scroll-sensitivity": 100,
|
|
4038
|
-
delay: 50,
|
|
4039
4129
|
onStart: handleMenuItemDragStart,
|
|
4040
4130
|
onEnd: handleMenuItemDragEnd
|
|
4041
4131
|
}, {
|