bm-admin-ui 1.0.41-alpha → 1.0.43-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/attachment/index.d.ts +70 -0
- package/es/components/attachment/index.js +273 -0
- package/es/components/attachment/src/attachment.vue.d.ts +69 -0
- package/es/components/editor/index.js +12 -6
- package/es/components/float-table/__test__/index.test.d.ts +1 -0
- package/es/components/float-table/index.d.ts +2 -2
- package/es/components/float-table/src/float-table.vue.d.ts +2 -2
- package/es/components/form-create/index.js +211 -100
- package/es/components/form-designer/index.js +173 -42
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/staffs-selector/index.d.ts +2 -2
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
- package/es/components/upload/index.js +12 -6
- 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 +1225 -818
- package/index.js +1225 -817
- package/lib/components/attachment/index.d.ts +70 -0
- package/lib/components/attachment/index.js +278 -0
- package/lib/components/attachment/src/attachment.vue.d.ts +69 -0
- package/lib/components/editor/index.js +12 -6
- package/lib/components/float-table/__test__/index.test.d.ts +1 -0
- package/lib/components/float-table/index.d.ts +2 -2
- package/lib/components/float-table/src/float-table.vue.d.ts +2 -2
- package/lib/components/form-create/index.js +210 -99
- package/lib/components/form-designer/index.js +172 -41
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +7 -0
- package/lib/components/staffs-selector/index.d.ts +2 -2
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
- package/lib/components/upload/index.js +12 -6
- 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/attachment.css +1 -0
- package/theme-chalk/form-create.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/types/components/attachment/index.d.ts +70 -0
- package/types/components/attachment/src/attachment.vue.d.ts +69 -0
- package/types/components/float-table/__test__/index.test.d.ts +1 -0
- package/types/components/float-table/index.d.ts +2 -2
- package/types/components/float-table/src/float-table.vue.d.ts +2 -2
- package/types/components/index.d.ts +1 -0
- package/types/components/staffs-selector/index.d.ts +2 -2
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +2 -2
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
- package/types/utils/bm-admin-ui-resolver.d.ts +3 -1
|
@@ -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';
|
|
@@ -135,8 +135,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
135
135
|
function handleRowWidgetMouseleave() {
|
|
136
136
|
props.rule.config.isHover = true;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
emits("setActiveRule", element, props.rule);
|
|
138
|
+
function handleNestSetActiveRule(element, parentRule) {
|
|
139
|
+
emits("setActiveRule", element, parentRule || props.rule);
|
|
140
140
|
}
|
|
141
141
|
function handleRowWidgetCopy(rule) {
|
|
142
142
|
emitCopyEvt(rule, props.rule);
|
|
@@ -144,7 +144,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
144
144
|
function handleRowWidgetDelete(rule) {
|
|
145
145
|
emitDeleteEvt(rule, props.rule);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function handleNestAdd(rule) {
|
|
148
148
|
emits("widgetAdd", rule, props.rule);
|
|
149
149
|
}
|
|
150
150
|
return (_ctx, _cache) => {
|
|
@@ -169,10 +169,10 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
169
169
|
rule: [__props.rule],
|
|
170
170
|
onNestMouseenter: handleRowWidgetMouseenter,
|
|
171
171
|
onNestMouseleave: handleRowWidgetMouseleave,
|
|
172
|
-
onNestSetActiveRule:
|
|
172
|
+
onNestSetActiveRule: handleNestSetActiveRule,
|
|
173
173
|
onNestCopy: handleRowWidgetCopy,
|
|
174
174
|
onNestDelete: handleRowWidgetDelete,
|
|
175
|
-
onNestAdd:
|
|
175
|
+
onNestAdd: handleNestAdd
|
|
176
176
|
}, null, 8, ["option", "rule"])) : (openBlock(), createBlock(WidgetInstruction, {
|
|
177
177
|
key: 1,
|
|
178
178
|
rule: __props.rule
|
|
@@ -264,8 +264,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
264
264
|
function handleMouseleave() {
|
|
265
265
|
emits("mouseleave");
|
|
266
266
|
}
|
|
267
|
-
function emitSetActiveRuleEvt(rule) {
|
|
268
|
-
emits("set-active-rule", rule);
|
|
267
|
+
function emitSetActiveRuleEvt(rule, parentRule = void 0) {
|
|
268
|
+
emits("set-active-rule", rule, parentRule);
|
|
269
269
|
}
|
|
270
270
|
function handleClick(element) {
|
|
271
271
|
emitSetActiveRuleEvt(element);
|
|
@@ -284,6 +284,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
284
284
|
function handleDelete(rule) {
|
|
285
285
|
emits("delete", rule);
|
|
286
286
|
}
|
|
287
|
+
function handleWidgetInTableActive(rule, parentRule) {
|
|
288
|
+
emitSetActiveRuleEvt(rule, parentRule);
|
|
289
|
+
}
|
|
287
290
|
return (_ctx, _cache) => {
|
|
288
291
|
const _component_ACol = resolveComponent("ACol");
|
|
289
292
|
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
@@ -322,7 +325,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
322
325
|
onMouseleave: handleMouseleave,
|
|
323
326
|
onClick: withModifiers(($event) => handleClick(element), ["stop"]),
|
|
324
327
|
onCopy: handleCopy,
|
|
325
|
-
onDelete: handleDelete
|
|
328
|
+
onDelete: handleDelete,
|
|
329
|
+
onSetActiveRule: handleWidgetInTableActive
|
|
326
330
|
}, null, 8, ["rule", "active-rule", "parent-rule", "onClick"]),
|
|
327
331
|
createVNode(DragPlaceholder)
|
|
328
332
|
]),
|
|
@@ -466,7 +470,7 @@ var input = {
|
|
|
466
470
|
},
|
|
467
471
|
},
|
|
468
472
|
effect: {
|
|
469
|
-
required:
|
|
473
|
+
required: false,
|
|
470
474
|
formRule: 'formRule',
|
|
471
475
|
},
|
|
472
476
|
props: {
|
|
@@ -499,6 +503,7 @@ var input = {
|
|
|
499
503
|
field: fieldsMap$g['props.placeholder'],
|
|
500
504
|
props: {
|
|
501
505
|
placeholder: '请输入',
|
|
506
|
+
maxlength: 30,
|
|
502
507
|
},
|
|
503
508
|
value: rule.props.placeholder,
|
|
504
509
|
},
|
|
@@ -508,6 +513,7 @@ var input = {
|
|
|
508
513
|
field: fieldsMap$g['value'],
|
|
509
514
|
props: {
|
|
510
515
|
placeholder: '请输入',
|
|
516
|
+
maxlength: 200,
|
|
511
517
|
},
|
|
512
518
|
value: rule.value,
|
|
513
519
|
},
|
|
@@ -567,7 +573,7 @@ var textarea = {
|
|
|
567
573
|
},
|
|
568
574
|
},
|
|
569
575
|
effect: {
|
|
570
|
-
required:
|
|
576
|
+
required: false,
|
|
571
577
|
formRule: 'formRule',
|
|
572
578
|
},
|
|
573
579
|
props: {
|
|
@@ -601,6 +607,7 @@ var textarea = {
|
|
|
601
607
|
field: fieldsMap$f['props.placeholder'],
|
|
602
608
|
props: {
|
|
603
609
|
placeholder: '请输入',
|
|
610
|
+
maxlength: 30,
|
|
604
611
|
},
|
|
605
612
|
value: rule.props.placeholder,
|
|
606
613
|
},
|
|
@@ -610,6 +617,7 @@ var textarea = {
|
|
|
610
617
|
field: fieldsMap$f['value'],
|
|
611
618
|
props: {
|
|
612
619
|
placeholder: '请输入',
|
|
620
|
+
maxlength: 5000,
|
|
613
621
|
},
|
|
614
622
|
value: rule.value,
|
|
615
623
|
},
|
|
@@ -670,7 +678,7 @@ var numInput = {
|
|
|
670
678
|
},
|
|
671
679
|
},
|
|
672
680
|
effect: {
|
|
673
|
-
required:
|
|
681
|
+
required: false,
|
|
674
682
|
formRule: 'formRule',
|
|
675
683
|
},
|
|
676
684
|
props: {
|
|
@@ -705,6 +713,7 @@ var numInput = {
|
|
|
705
713
|
field: fieldsMap$e['props.placeholder'],
|
|
706
714
|
props: {
|
|
707
715
|
placeholder: '请输入',
|
|
716
|
+
maxlength: 30,
|
|
708
717
|
},
|
|
709
718
|
value: rule.props.placeholder,
|
|
710
719
|
},
|
|
@@ -778,6 +787,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
778
787
|
const visible = ref(false);
|
|
779
788
|
const text = ref("");
|
|
780
789
|
const repeatOption = ref([]);
|
|
790
|
+
const maxlength = 500;
|
|
781
791
|
function edit() {
|
|
782
792
|
visible.value = true;
|
|
783
793
|
text.value = makeText(props.options);
|
|
@@ -799,6 +809,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
799
809
|
function handleOk() {
|
|
800
810
|
const options = text.value.split("\n").reduce((pre, cur) => {
|
|
801
811
|
if (cur) {
|
|
812
|
+
cur = cur.substring(0, maxlength - 1);
|
|
802
813
|
pre.push({ value: cur, label: cur });
|
|
803
814
|
}
|
|
804
815
|
return pre;
|
|
@@ -867,6 +878,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
867
878
|
"bm-handle-options__input",
|
|
868
879
|
repeatOption.value.length && repeatOption.value.includes(element.value) ? "is-error" : ""
|
|
869
880
|
]),
|
|
881
|
+
maxlength,
|
|
870
882
|
onBlur: ($event) => handleBlur(element)
|
|
871
883
|
}, null, 8, ["value", "onUpdate:value", "class", "onBlur"])
|
|
872
884
|
]),
|
|
@@ -963,7 +975,7 @@ var radio = {
|
|
|
963
975
|
},
|
|
964
976
|
},
|
|
965
977
|
effect: {
|
|
966
|
-
required:
|
|
978
|
+
required: false,
|
|
967
979
|
formRule: 'formRule',
|
|
968
980
|
},
|
|
969
981
|
options: [
|
|
@@ -1009,6 +1021,7 @@ var radio = {
|
|
|
1009
1021
|
field: fieldsMap$d['props.placeholder'],
|
|
1010
1022
|
props: {
|
|
1011
1023
|
placeholder: '请输入',
|
|
1024
|
+
maxlength: 30,
|
|
1012
1025
|
},
|
|
1013
1026
|
value: rule.props.placeholder,
|
|
1014
1027
|
},
|
|
@@ -1101,7 +1114,7 @@ var checkbox = {
|
|
|
1101
1114
|
},
|
|
1102
1115
|
},
|
|
1103
1116
|
effect: {
|
|
1104
|
-
required:
|
|
1117
|
+
required: false,
|
|
1105
1118
|
formRule: 'formRule',
|
|
1106
1119
|
},
|
|
1107
1120
|
options: [
|
|
@@ -1147,6 +1160,7 @@ var checkbox = {
|
|
|
1147
1160
|
field: fieldsMap$c['props.placeholder'],
|
|
1148
1161
|
props: {
|
|
1149
1162
|
placeholder: '请输入',
|
|
1163
|
+
maxlength: 30,
|
|
1150
1164
|
},
|
|
1151
1165
|
value: rule.props.placeholder,
|
|
1152
1166
|
},
|
|
@@ -1308,7 +1322,7 @@ var date = {
|
|
|
1308
1322
|
},
|
|
1309
1323
|
},
|
|
1310
1324
|
effect: {
|
|
1311
|
-
required:
|
|
1325
|
+
required: false,
|
|
1312
1326
|
formRule: 'formRule',
|
|
1313
1327
|
},
|
|
1314
1328
|
props: {
|
|
@@ -1371,6 +1385,7 @@ var date = {
|
|
|
1371
1385
|
field: fieldsMap$b['props.placeholder'],
|
|
1372
1386
|
props: {
|
|
1373
1387
|
placeholder: '请输入',
|
|
1388
|
+
maxlength: 30,
|
|
1374
1389
|
},
|
|
1375
1390
|
value: rule.props.placeholder,
|
|
1376
1391
|
},
|
|
@@ -1452,7 +1467,7 @@ var dateRange = {
|
|
|
1452
1467
|
},
|
|
1453
1468
|
},
|
|
1454
1469
|
effect: {
|
|
1455
|
-
required:
|
|
1470
|
+
required: false,
|
|
1456
1471
|
formRule: 'formRule',
|
|
1457
1472
|
},
|
|
1458
1473
|
props: {
|
|
@@ -1517,6 +1532,7 @@ var dateRange = {
|
|
|
1517
1532
|
field: fieldsMap$a['props.placeholder.0'],
|
|
1518
1533
|
props: {
|
|
1519
1534
|
placeholder: '请输入',
|
|
1535
|
+
maxlength: 30,
|
|
1520
1536
|
},
|
|
1521
1537
|
value: rule.props.placeholder[0],
|
|
1522
1538
|
},
|
|
@@ -1526,6 +1542,7 @@ var dateRange = {
|
|
|
1526
1542
|
field: fieldsMap$a['props.placeholder.1'],
|
|
1527
1543
|
props: {
|
|
1528
1544
|
placeholder: '请输入',
|
|
1545
|
+
maxlength: 30,
|
|
1529
1546
|
},
|
|
1530
1547
|
value: rule.props.placeholder[1],
|
|
1531
1548
|
},
|
|
@@ -1596,13 +1613,29 @@ var instruction = {
|
|
|
1596
1613
|
minRows: 5,
|
|
1597
1614
|
},
|
|
1598
1615
|
},
|
|
1616
|
+
effect: {
|
|
1617
|
+
required: '请输入说明文字',
|
|
1618
|
+
},
|
|
1599
1619
|
title: label$9,
|
|
1600
1620
|
field: fieldsMap$9.value,
|
|
1601
1621
|
value: rule.value,
|
|
1622
|
+
inject: true,
|
|
1602
1623
|
prefix: {
|
|
1603
1624
|
type: 'TextColor',
|
|
1625
|
+
on: {
|
|
1626
|
+
change({ api, self }, color) {
|
|
1627
|
+
api.emit('change', 'style.color', color, self, api, true);
|
|
1628
|
+
},
|
|
1629
|
+
},
|
|
1604
1630
|
props: {
|
|
1605
|
-
rule,
|
|
1631
|
+
color: rule.style.color,
|
|
1632
|
+
},
|
|
1633
|
+
},
|
|
1634
|
+
on: {
|
|
1635
|
+
change({ api, self }, list) {
|
|
1636
|
+
nextTick(() => {
|
|
1637
|
+
api.refresh();
|
|
1638
|
+
});
|
|
1606
1639
|
},
|
|
1607
1640
|
},
|
|
1608
1641
|
},
|
|
@@ -1645,7 +1678,7 @@ var picture = {
|
|
|
1645
1678
|
},
|
|
1646
1679
|
},
|
|
1647
1680
|
effect: {
|
|
1648
|
-
required:
|
|
1681
|
+
required: false,
|
|
1649
1682
|
formRule: 'formRule',
|
|
1650
1683
|
},
|
|
1651
1684
|
props: {
|
|
@@ -1994,7 +2027,15 @@ var table = {
|
|
|
1994
2027
|
effect: {
|
|
1995
2028
|
required: true,
|
|
1996
2029
|
},
|
|
2030
|
+
inject: true,
|
|
1997
2031
|
value: rule.config.childRules,
|
|
2032
|
+
on: {
|
|
2033
|
+
change({ api, self }, list) {
|
|
2034
|
+
nextTick(() => {
|
|
2035
|
+
api.validate();
|
|
2036
|
+
});
|
|
2037
|
+
},
|
|
2038
|
+
},
|
|
1998
2039
|
},
|
|
1999
2040
|
{
|
|
2000
2041
|
type: 'checkbox',
|
|
@@ -2057,7 +2098,7 @@ var file = {
|
|
|
2057
2098
|
},
|
|
2058
2099
|
},
|
|
2059
2100
|
effect: {
|
|
2060
|
-
required:
|
|
2101
|
+
required: false,
|
|
2061
2102
|
formRule: 'formRule',
|
|
2062
2103
|
},
|
|
2063
2104
|
config: {
|
|
@@ -2128,7 +2169,7 @@ var people = {
|
|
|
2128
2169
|
},
|
|
2129
2170
|
},
|
|
2130
2171
|
effect: {
|
|
2131
|
-
required:
|
|
2172
|
+
required: false,
|
|
2132
2173
|
formRule: 'formRule',
|
|
2133
2174
|
},
|
|
2134
2175
|
props: {
|
|
@@ -2161,6 +2202,7 @@ var people = {
|
|
|
2161
2202
|
field: fieldsMap$5['props.placeholder'],
|
|
2162
2203
|
props: {
|
|
2163
2204
|
placeholder: '请输入',
|
|
2205
|
+
maxlength: 30,
|
|
2164
2206
|
},
|
|
2165
2207
|
value: rule.props.placeholder,
|
|
2166
2208
|
},
|
|
@@ -2249,7 +2291,7 @@ var department = {
|
|
|
2249
2291
|
},
|
|
2250
2292
|
},
|
|
2251
2293
|
effect: {
|
|
2252
|
-
required:
|
|
2294
|
+
required: false,
|
|
2253
2295
|
formRule: 'formRule',
|
|
2254
2296
|
},
|
|
2255
2297
|
props: {
|
|
@@ -2282,6 +2324,7 @@ var department = {
|
|
|
2282
2324
|
field: fieldsMap$4['props.placeholder'],
|
|
2283
2325
|
props: {
|
|
2284
2326
|
placeholder: '请输入',
|
|
2327
|
+
maxlength: 30,
|
|
2285
2328
|
},
|
|
2286
2329
|
value: rule.props.placeholder,
|
|
2287
2330
|
},
|
|
@@ -3192,6 +3235,14 @@ var shop = {
|
|
|
3192
3235
|
field: fieldsMap$1['config.isMain'],
|
|
3193
3236
|
value: rule.config.isMain,
|
|
3194
3237
|
hidden: !!parentRule,
|
|
3238
|
+
inject: true,
|
|
3239
|
+
on: {
|
|
3240
|
+
change({ api, self }, value) {
|
|
3241
|
+
if (value) {
|
|
3242
|
+
api.mergeRule(fieldsMap$1['effect.required'], { value: true });
|
|
3243
|
+
}
|
|
3244
|
+
},
|
|
3245
|
+
},
|
|
3195
3246
|
},
|
|
3196
3247
|
{
|
|
3197
3248
|
type: 'switch',
|
|
@@ -3554,7 +3605,8 @@ const _hoisted_2$1 = { class: "bm-table-column-btn-wrap" };
|
|
|
3554
3605
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3555
3606
|
__name: "table-column",
|
|
3556
3607
|
props: ["formCreateInject"],
|
|
3557
|
-
|
|
3608
|
+
emits: ["change"],
|
|
3609
|
+
setup(__props, { emit: emits }) {
|
|
3558
3610
|
const props = __props;
|
|
3559
3611
|
const handleClass = "bm-table-column__drag-icon";
|
|
3560
3612
|
const btnCom = ref();
|
|
@@ -3579,6 +3631,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3579
3631
|
function getPopupContainer() {
|
|
3580
3632
|
return document.body;
|
|
3581
3633
|
}
|
|
3634
|
+
watch(
|
|
3635
|
+
childRules,
|
|
3636
|
+
(val) => {
|
|
3637
|
+
emits("change", val);
|
|
3638
|
+
},
|
|
3639
|
+
{
|
|
3640
|
+
deep: true
|
|
3641
|
+
}
|
|
3642
|
+
);
|
|
3582
3643
|
return (_ctx, _cache) => {
|
|
3583
3644
|
const _component_Delete = resolveComponent("Delete");
|
|
3584
3645
|
const _component_ARow = resolveComponent("ARow");
|
|
@@ -3659,12 +3720,17 @@ var TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "table-co
|
|
|
3659
3720
|
|
|
3660
3721
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3661
3722
|
__name: "text-color",
|
|
3662
|
-
props: ["
|
|
3663
|
-
|
|
3723
|
+
props: ["color"],
|
|
3724
|
+
emits: ["change"],
|
|
3725
|
+
setup(__props, { emit: emits }) {
|
|
3664
3726
|
const props = __props;
|
|
3727
|
+
const color = ref(props.color);
|
|
3728
|
+
function getColor(curColor) {
|
|
3729
|
+
return curColor === Colors.Black ? Colors.Blue : Colors.Black;
|
|
3730
|
+
}
|
|
3665
3731
|
function handleClick() {
|
|
3666
|
-
|
|
3667
|
-
|
|
3732
|
+
color.value = getColor(color.value);
|
|
3733
|
+
emits("change", color.value);
|
|
3668
3734
|
}
|
|
3669
3735
|
return (_ctx, _cache) => {
|
|
3670
3736
|
const _component_ColorPanel = resolveComponent("ColorPanel");
|
|
@@ -3676,16 +3742,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3676
3742
|
width: "1em",
|
|
3677
3743
|
height: "1em",
|
|
3678
3744
|
fontSize: "20px",
|
|
3679
|
-
color:
|
|
3745
|
+
color: getColor(color.value),
|
|
3680
3746
|
cursor: "pointer"
|
|
3681
3747
|
}),
|
|
3682
3748
|
onClick: withModifiers(handleClick, ["prevent", "stop"])
|
|
3683
|
-
},
|
|
3684
|
-
default: withCtx(() => [
|
|
3685
|
-
createTextVNode("change")
|
|
3686
|
-
]),
|
|
3687
|
-
_: 1
|
|
3688
|
-
}, 8, ["style", "onClick"]);
|
|
3749
|
+
}, null, 8, ["style", "onClick"]);
|
|
3689
3750
|
};
|
|
3690
3751
|
}
|
|
3691
3752
|
});
|
|
@@ -3710,7 +3771,8 @@ const __default__ = {
|
|
|
3710
3771
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3711
3772
|
...__default__,
|
|
3712
3773
|
props: formDesignerProps,
|
|
3713
|
-
|
|
3774
|
+
emits: ["initPresetRule"],
|
|
3775
|
+
setup(__props, { expose, emit: emits }) {
|
|
3714
3776
|
const props = __props;
|
|
3715
3777
|
FC.component("TableHeadCount", TableHeadCount);
|
|
3716
3778
|
FC.component("TableColumn", TableColumn);
|
|
@@ -3873,6 +3935,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3873
3935
|
message.error("\u8BE5\u63A7\u4EF6\u5DF2\u88AB\u8BBE\u4E3A\u6570\u636E\u8FC7\u6EE4\u6761\u4EF6\uFF0C\u4E0D\u53EF\u5220\u9664\u3002");
|
|
3874
3936
|
return;
|
|
3875
3937
|
}
|
|
3938
|
+
if (props.flowCondition[targetRule.field]) {
|
|
3939
|
+
message.error("\u8BE5\u7EC4\u4EF6\u5728\u201C\u6761\u4EF6\u5206\u652F\u540D\u79F0\u201D\u5DF2\u88AB\u8BBE\u4E3A\u5BA1\u6279\u6761\u4EF6\uFF0C\u4E0D\u53EF\u5220\u9664\u3002");
|
|
3940
|
+
return;
|
|
3941
|
+
}
|
|
3876
3942
|
const parentList = parentRule?.config?.childRules || widgetFormRules;
|
|
3877
3943
|
const index = parentList.findIndex((rule) => rule.field === targetRule.field);
|
|
3878
3944
|
parentList.splice(index, 1);
|
|
@@ -3909,6 +3975,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3909
3975
|
nextTick(() => {
|
|
3910
3976
|
item.props.activeRule = rule;
|
|
3911
3977
|
});
|
|
3978
|
+
if (item.type === WidgetType.RowWidget && item?.config?.childRules?.length) {
|
|
3979
|
+
item.config.childRules.forEach((childRule) => {
|
|
3980
|
+
if (childRule.type === WidgetType.TableWidget) {
|
|
3981
|
+
nextTick(() => {
|
|
3982
|
+
childRule.props.activeRule = rule;
|
|
3983
|
+
});
|
|
3984
|
+
}
|
|
3985
|
+
});
|
|
3986
|
+
}
|
|
3912
3987
|
}
|
|
3913
3988
|
});
|
|
3914
3989
|
if (!cacheProps[rule.field]) {
|
|
@@ -3983,6 +4058,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3983
4058
|
return rule.config.config.parse(rule);
|
|
3984
4059
|
}
|
|
3985
4060
|
function edit(formRules) {
|
|
4061
|
+
widgetFormRules.splice(0);
|
|
3986
4062
|
formRules.forEach((item) => {
|
|
3987
4063
|
const rule = makeRule(ruleList[item.name]);
|
|
3988
4064
|
delete item.name;
|
|
@@ -4000,22 +4076,77 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4000
4076
|
function getRule(name) {
|
|
4001
4077
|
return makeRule(ruleList[name]);
|
|
4002
4078
|
}
|
|
4079
|
+
function validate() {
|
|
4080
|
+
let pass = true;
|
|
4081
|
+
for (const rule of widgetFormRules) {
|
|
4082
|
+
const config = rule.config.config || {};
|
|
4083
|
+
const childRules = rule.config.childRules || [];
|
|
4084
|
+
if (!rule?.title?.title && config.name !== "instruction") {
|
|
4085
|
+
pass = false;
|
|
4086
|
+
}
|
|
4087
|
+
if (!rule?.value && config.name === "instruction") {
|
|
4088
|
+
pass = false;
|
|
4089
|
+
}
|
|
4090
|
+
if (config.name === "table" && !childRules.length) {
|
|
4091
|
+
pass = false;
|
|
4092
|
+
}
|
|
4093
|
+
if (!pass && rule.field !== activeRule.value.field) {
|
|
4094
|
+
setActiveRule(rule);
|
|
4095
|
+
}
|
|
4096
|
+
if (pass && childRules.length) {
|
|
4097
|
+
for (const childRule of childRules) {
|
|
4098
|
+
if (!childRule?.title?.title) {
|
|
4099
|
+
pass = false;
|
|
4100
|
+
if (childRule.field !== activeRule.value.field) {
|
|
4101
|
+
setActiveRule(childRule, rule);
|
|
4102
|
+
}
|
|
4103
|
+
break;
|
|
4104
|
+
}
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
if (!pass) {
|
|
4108
|
+
nextTick(() => {
|
|
4109
|
+
fApi.value.validate();
|
|
4110
|
+
});
|
|
4111
|
+
break;
|
|
4112
|
+
}
|
|
4113
|
+
}
|
|
4114
|
+
return pass;
|
|
4115
|
+
}
|
|
4116
|
+
function flowConditionEffect(activeProps2, flowCondition) {
|
|
4117
|
+
const requiredRule = activeProps2?.find(
|
|
4118
|
+
(rule) => rule.field === "effect.required"
|
|
4119
|
+
);
|
|
4120
|
+
if (requiredRule) {
|
|
4121
|
+
if (!requiredRule.props) {
|
|
4122
|
+
requiredRule.props = {};
|
|
4123
|
+
}
|
|
4124
|
+
requiredRule.props.disabled = !!flowCondition[activeRule.value.field];
|
|
4125
|
+
}
|
|
4126
|
+
}
|
|
4003
4127
|
watch(
|
|
4004
4128
|
() => props.presetRules,
|
|
4005
4129
|
(presetRules) => {
|
|
4006
4130
|
widgetFormRules.push(...presetRules);
|
|
4007
|
-
|
|
4008
|
-
{
|
|
4009
|
-
immediate: true
|
|
4131
|
+
emits("initPresetRule", widgetFormRules);
|
|
4010
4132
|
}
|
|
4011
4133
|
);
|
|
4012
4134
|
watch(
|
|
4013
4135
|
() => props.formRules,
|
|
4014
4136
|
(formRules) => {
|
|
4015
|
-
edit(formRules);
|
|
4137
|
+
formRules && edit(formRules);
|
|
4138
|
+
}
|
|
4139
|
+
);
|
|
4140
|
+
watch(activeProps, (activeProps2) => {
|
|
4141
|
+
flowConditionEffect(activeProps2, props.flowCondition);
|
|
4142
|
+
});
|
|
4143
|
+
watch(
|
|
4144
|
+
() => props.flowCondition,
|
|
4145
|
+
(flowCondition) => {
|
|
4146
|
+
flowConditionEffect(activeProps.value, flowCondition);
|
|
4016
4147
|
},
|
|
4017
4148
|
{
|
|
4018
|
-
|
|
4149
|
+
deep: true
|
|
4019
4150
|
}
|
|
4020
4151
|
);
|
|
4021
4152
|
onBeforeUnmount(() => {
|
|
@@ -4023,7 +4154,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4023
4154
|
});
|
|
4024
4155
|
expose({
|
|
4025
4156
|
getFormRule,
|
|
4026
|
-
getRule
|
|
4157
|
+
getRule,
|
|
4158
|
+
validate
|
|
4027
4159
|
});
|
|
4028
4160
|
return (_ctx, _cache) => {
|
|
4029
4161
|
const _component_ACol = resolveComponent("ACol");
|
|
@@ -4066,7 +4198,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4066
4198
|
move: moveMenuItem,
|
|
4067
4199
|
"force-fallback": true,
|
|
4068
4200
|
"scroll-sensitivity": 100,
|
|
4069
|
-
delay: 50,
|
|
4070
4201
|
onStart: handleMenuItemDragStart,
|
|
4071
4202
|
onEnd: handleMenuItemDragEnd
|
|
4072
4203
|
}, {
|
|
@@ -4131,7 +4262,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4131
4262
|
]),
|
|
4132
4263
|
_: 1
|
|
4133
4264
|
}, 8, ["list"]),
|
|
4134
|
-
showDragTip.value && !_ctx.formRules
|
|
4265
|
+
showDragTip.value && !_ctx.formRules?.length ? (openBlock(), createBlock(NoDataTip, {
|
|
4135
4266
|
key: 0,
|
|
4136
4267
|
class: "bm-no-data-tip"
|
|
4137
4268
|
})) : createCommentVNode("v-if", true)
|
package/es/components/index.d.ts
CHANGED
package/es/components/index.js
CHANGED
|
@@ -910,9 +910,9 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
910
910
|
searchVal: import("vue").Ref<string>;
|
|
911
911
|
selectAll: import("vue").Ref<boolean>;
|
|
912
912
|
indeterminate: import("vue").Ref<boolean>;
|
|
913
|
-
emptyPic: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
913
|
+
emptyPic: import("vue").Ref<JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
914
914
|
[key: string]: any;
|
|
915
|
-
}> | null | undefined) |
|
|
915
|
+
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
916
916
|
[key: string]: any;
|
|
917
917
|
}> | null | undefined)[]>;
|
|
918
918
|
isFulfill: import("vue").Ref<boolean>;
|
|
@@ -28,9 +28,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
28
28
|
searchVal: import("vue").Ref<string>;
|
|
29
29
|
selectAll: import("vue").Ref<boolean>;
|
|
30
30
|
indeterminate: import("vue").Ref<boolean>;
|
|
31
|
-
emptyPic: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
31
|
+
emptyPic: import("vue").Ref<JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
32
32
|
[key: string]: any;
|
|
33
|
-
}> | null | undefined) |
|
|
33
|
+
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
34
34
|
[key: string]: any;
|
|
35
35
|
}> | null | undefined)[]>;
|
|
36
36
|
isFulfill: import("vue").Ref<boolean>;
|
|
@@ -910,9 +910,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
910
910
|
searchVal: import("vue").Ref<string>;
|
|
911
911
|
selectAll: import("vue").Ref<boolean>;
|
|
912
912
|
indeterminate: import("vue").Ref<boolean>;
|
|
913
|
-
emptyPic: import("vue").Ref<(string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
913
|
+
emptyPic: import("vue").Ref<JSX.Element | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
914
914
|
[key: string]: any;
|
|
915
|
-
}> | null | undefined) |
|
|
915
|
+
}> | null | undefined) | (string | number | boolean | void | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
916
916
|
[key: string]: any;
|
|
917
917
|
}> | null | undefined)[]>;
|
|
918
918
|
isFulfill: import("vue").Ref<boolean>;
|
|
@@ -318,6 +318,9 @@ const _sfc_main = {
|
|
|
318
318
|
status: ""
|
|
319
319
|
};
|
|
320
320
|
setTimeout(function() {
|
|
321
|
+
if (methods.fileIsDelete(file)) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
321
324
|
state.fileList[file.uid].isDoneDeloy = true;
|
|
322
325
|
}, 1e3);
|
|
323
326
|
methods.customUploadRequest(file);
|
|
@@ -596,7 +599,10 @@ const _hoisted_17 = {
|
|
|
596
599
|
key: 0,
|
|
597
600
|
class: "bm-upload__picture__name"
|
|
598
601
|
};
|
|
599
|
-
const _hoisted_18 = {
|
|
602
|
+
const _hoisted_18 = {
|
|
603
|
+
key: 1,
|
|
604
|
+
class: "bm-upload__button__wrapper"
|
|
605
|
+
};
|
|
600
606
|
const _hoisted_19 = { key: 0 };
|
|
601
607
|
const _hoisted_20 = { class: "ant-upload-text bm-upload__text" };
|
|
602
608
|
const _hoisted_21 = {
|
|
@@ -618,7 +624,7 @@ const _hoisted_26 = {
|
|
|
618
624
|
class: "bm-upload__tips"
|
|
619
625
|
};
|
|
620
626
|
const _hoisted_27 = {
|
|
621
|
-
key:
|
|
627
|
+
key: 2,
|
|
622
628
|
class: "bm-upload__file-list"
|
|
623
629
|
};
|
|
624
630
|
const _hoisted_28 = { class: "bm-upload__file__detail" };
|
|
@@ -790,8 +796,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
790
796
|
}), 128)),
|
|
791
797
|
createCommentVNode(" </a-image-preview-group> ")
|
|
792
798
|
], 64)) : createCommentVNode("v-if", true),
|
|
793
|
-
|
|
794
|
-
|
|
799
|
+
!($setup.uploadDisabled && _ctx.extraConfigs?.hideDisabledBtn) ? (openBlock(), createElementBlock("div", _hoisted_18, [
|
|
800
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.extraConfigs.drag ? "a-upload-dragger" : "a-upload"), mergeProps(_ctx.uploadConfigs, {
|
|
795
801
|
disabled: $setup.uploadDisabled,
|
|
796
802
|
class: { "bm--upload__custom-button": _ctx.extraConfigs.myBtn },
|
|
797
803
|
onReject: _ctx.handleReject
|
|
@@ -822,8 +828,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
822
828
|
], 64))
|
|
823
829
|
]),
|
|
824
830
|
_: 3
|
|
825
|
-
}, 16, ["disabled", "class", "onReject"]))
|
|
826
|
-
]),
|
|
831
|
+
}, 16, ["disabled", "class", "onReject"]))
|
|
832
|
+
])) : createCommentVNode("v-if", true),
|
|
827
833
|
_ctx.uploadConfigs.listType === "text" && !_ctx.uploadConfigs.showSlotList ? (openBlock(), createElementBlock("div", _hoisted_27, [
|
|
828
834
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.fileList, (item) => {
|
|
829
835
|
return openBlock(), createElementBlock("div", {
|
|
@@ -2,7 +2,7 @@ function kebabCase(key) {
|
|
|
2
2
|
const result = key.replace(/([A-Z])/g, ' $1').trim();
|
|
3
3
|
return result.split(' ').join('-').toLowerCase();
|
|
4
4
|
}
|
|
5
|
-
export function BmAdminUiResolver(options) {
|
|
5
|
+
export function BmAdminUiResolver(options = { importStyle: false }) {
|
|
6
6
|
return [
|
|
7
7
|
{
|
|
8
8
|
type: 'component',
|