bm-admin-ui 1.1.1-alpha → 1.1.3-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/feedback/index.d.ts +1 -1
- package/es/components/feedback/src/bmModal.vue.d.ts +1 -1
- package/es/components/flow-designer/index.js +25 -10
- package/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +14 -0
- package/es/components/form-create/index.js +1 -0
- package/es/components/form-designer/index.js +59 -6
- package/es/components/staffs-selector/index.d.ts +2 -2
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
- package/lib/components/feedback/index.d.ts +1 -1
- package/lib/components/feedback/src/bmModal.vue.d.ts +1 -1
- package/lib/components/flow-designer/index.js +25 -10
- package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +14 -0
- package/lib/components/form-create/index.js +1 -0
- package/lib/components/form-designer/index.js +58 -5
- package/lib/components/staffs-selector/index.d.ts +2 -2
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
- package/package.json +1 -1
- package/types/components/feedback/index.d.ts +1 -1
- package/types/components/feedback/src/bmModal.vue.d.ts +1 -1
- package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +14 -0
- package/types/components/staffs-selector/index.d.ts +2 -2
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +2 -2
|
@@ -232,7 +232,7 @@ declare const BmModal: import("bm-admin-ui/es/utils/with-install").SFCWithInstal
|
|
|
232
232
|
modalRender: import("vue").PropType<(arg: {
|
|
233
233
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
234
234
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
235
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
235
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
236
236
|
$attrs: {
|
|
237
237
|
[x: string]: unknown;
|
|
238
238
|
};
|
|
@@ -226,7 +226,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
226
226
|
modalRender: import("vue").PropType<(arg: {
|
|
227
227
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
228
228
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
229
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
229
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
230
230
|
$attrs: {
|
|
231
231
|
[x: string]: unknown;
|
|
232
232
|
};
|
|
@@ -196,18 +196,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
196
196
|
}
|
|
197
197
|
var BmHtmlNode = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render], ["__file", "BmHtmlNode.vue"]]);
|
|
198
198
|
|
|
199
|
-
const _hoisted_1 =
|
|
199
|
+
const _hoisted_1 = ["onClick"];
|
|
200
200
|
const _hoisted_2 = { class: "bm-condition-node-box" };
|
|
201
201
|
const _hoisted_3 = { class: "condition-header" };
|
|
202
202
|
const _hoisted_4 = { key: 0 };
|
|
203
203
|
const _hoisted_5 = { class: "condition-desc" };
|
|
204
204
|
const _hoisted_6 = { class: "desc" };
|
|
205
205
|
const _hoisted_7 = { key: 0 };
|
|
206
|
-
const __default__ = {
|
|
207
|
-
name: "BmConditionNode"
|
|
208
|
-
};
|
|
209
206
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
210
|
-
|
|
207
|
+
__name: "BmConditionNode",
|
|
211
208
|
props: {
|
|
212
209
|
isCustom: {
|
|
213
210
|
type: Boolean,
|
|
@@ -225,6 +222,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
225
222
|
type: String,
|
|
226
223
|
default: " "
|
|
227
224
|
},
|
|
225
|
+
nodeClick: {
|
|
226
|
+
type: Function,
|
|
227
|
+
default: () => {
|
|
228
|
+
console.info("\u70B9\u51FB\u8282\u70B9\u56DE\u8C03");
|
|
229
|
+
}
|
|
230
|
+
},
|
|
228
231
|
copyCallback: {
|
|
229
232
|
type: Function,
|
|
230
233
|
default: () => {
|
|
@@ -239,8 +242,17 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
239
242
|
}
|
|
240
243
|
},
|
|
241
244
|
setup(__props) {
|
|
245
|
+
const props = __props;
|
|
246
|
+
function callback() {
|
|
247
|
+
if (props.isCustom) {
|
|
248
|
+
props.nodeClick();
|
|
249
|
+
}
|
|
250
|
+
}
|
|
242
251
|
return (_ctx, _cache) => {
|
|
243
|
-
return openBlock(), createElementBlock("div",
|
|
252
|
+
return openBlock(), createElementBlock("div", {
|
|
253
|
+
class: "bm-condition-node",
|
|
254
|
+
onClick: withModifiers(callback, ["stop"])
|
|
255
|
+
}, [
|
|
244
256
|
createElementVNode("div", _hoisted_2, [
|
|
245
257
|
createElementVNode("div", _hoisted_3, [
|
|
246
258
|
createElementVNode("span", {
|
|
@@ -259,9 +271,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
259
271
|
}, [
|
|
260
272
|
createCommentVNode(' <CopyOutlined\n @click.stop="\n () => {\n copyCallback()\n }\n " /> \u6682\u65F6\u5173\u95ED\u590D\u5236\u8282\u70B9 '),
|
|
261
273
|
createVNode(unref(CloseOutlined), {
|
|
262
|
-
onClick: _cache[0] || (_cache[0] = (
|
|
263
|
-
|
|
264
|
-
|
|
274
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(
|
|
275
|
+
() => {
|
|
276
|
+
__props.deleteCallback();
|
|
277
|
+
},
|
|
278
|
+
["stop"]
|
|
279
|
+
))
|
|
265
280
|
})
|
|
266
281
|
], 2)
|
|
267
282
|
]),
|
|
@@ -272,7 +287,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
272
287
|
])) : createCommentVNode("v-if", true)
|
|
273
288
|
])
|
|
274
289
|
])
|
|
275
|
-
]);
|
|
290
|
+
], 8, _hoisted_1);
|
|
276
291
|
};
|
|
277
292
|
}
|
|
278
293
|
});
|
|
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: StringConstructor;
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
|
+
nodeClick: {
|
|
19
|
+
type: FunctionConstructor;
|
|
20
|
+
default: () => void;
|
|
21
|
+
};
|
|
18
22
|
copyCallback: {
|
|
19
23
|
type: FunctionConstructor;
|
|
20
24
|
default: () => void;
|
|
@@ -41,6 +45,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
41
45
|
type: StringConstructor;
|
|
42
46
|
default: string;
|
|
43
47
|
};
|
|
48
|
+
nodeClick: {
|
|
49
|
+
type: FunctionConstructor;
|
|
50
|
+
default: () => void;
|
|
51
|
+
};
|
|
44
52
|
copyCallback: {
|
|
45
53
|
type: FunctionConstructor;
|
|
46
54
|
default: () => void;
|
|
@@ -50,6 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
58
|
default: () => void;
|
|
51
59
|
};
|
|
52
60
|
}>> & {}>>;
|
|
61
|
+
callback: () => void;
|
|
53
62
|
CloseOutlined: import("@ant-design/icons-vue/lib/icons/CloseOutlined").CloseOutlinedIconType;
|
|
54
63
|
RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
|
|
55
64
|
Tag: {
|
|
@@ -227,6 +236,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
236
|
type: StringConstructor;
|
|
228
237
|
default: string;
|
|
229
238
|
};
|
|
239
|
+
nodeClick: {
|
|
240
|
+
type: FunctionConstructor;
|
|
241
|
+
default: () => void;
|
|
242
|
+
};
|
|
230
243
|
copyCallback: {
|
|
231
244
|
type: FunctionConstructor;
|
|
232
245
|
default: () => void;
|
|
@@ -240,6 +253,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
240
253
|
desc: string;
|
|
241
254
|
isCustom: boolean;
|
|
242
255
|
priority: number;
|
|
256
|
+
nodeClick: Function;
|
|
243
257
|
copyCallback: Function;
|
|
244
258
|
deleteCallback: Function;
|
|
245
259
|
}>;
|
|
@@ -18767,6 +18767,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
18767
18767
|
const columns = reactive([]);
|
|
18768
18768
|
const data = reactive([]);
|
|
18769
18769
|
const config = computed(() => ({
|
|
18770
|
+
...props.rule?.config?.formConfig,
|
|
18770
18771
|
columns: [...columns],
|
|
18771
18772
|
data: [...data],
|
|
18772
18773
|
columnConfig: {
|
|
@@ -5,7 +5,7 @@ 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';
|
|
6
6
|
import { HolderOutlined, EditOutlined, PlusOutlined, QuestionCircleOutlined, InfoCircleFilled, ExclamationCircleFilled } from '@ant-design/icons-vue';
|
|
7
7
|
import { BmUpload } from 'bm-admin-ui/es/components';
|
|
8
|
-
import { cloneDeep } from 'lodash-es';
|
|
8
|
+
import { isObject, cloneDeep } from 'lodash-es';
|
|
9
9
|
import FC from '@form-create/ant-design-vue';
|
|
10
10
|
|
|
11
11
|
var WidgetType;
|
|
@@ -3564,6 +3564,10 @@ const formDesignerProps = {
|
|
|
3564
3564
|
type: Function,
|
|
3565
3565
|
default: (targetRule, parentRule) => true,
|
|
3566
3566
|
},
|
|
3567
|
+
resetCmpRatio: {
|
|
3568
|
+
type: Function,
|
|
3569
|
+
default: (ruleName, parentRuleName) => 0,
|
|
3570
|
+
},
|
|
3567
3571
|
};
|
|
3568
3572
|
|
|
3569
3573
|
const _hoisted_1$3 = {
|
|
@@ -3634,6 +3638,18 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
3634
3638
|
});
|
|
3635
3639
|
var CheckboxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "checkbox-switch.vue"]]);
|
|
3636
3640
|
|
|
3641
|
+
function checkRuleConfigObj(obj) {
|
|
3642
|
+
if (!isObject(obj))
|
|
3643
|
+
return false;
|
|
3644
|
+
const parses = ['icon', 'label', 'name', 'parse', 'props', 'rule'];
|
|
3645
|
+
for (const parse of parses) {
|
|
3646
|
+
if (!obj[parse]) {
|
|
3647
|
+
console.error(`控件配置对象缺少【${parse}】字段,请补充完整`);
|
|
3648
|
+
return false;
|
|
3649
|
+
}
|
|
3650
|
+
}
|
|
3651
|
+
return true;
|
|
3652
|
+
}
|
|
3637
3653
|
const widgetsTableAccept = {
|
|
3638
3654
|
[input.name]: input,
|
|
3639
3655
|
[textarea.name]: textarea,
|
|
@@ -3665,8 +3681,20 @@ const widgetNamesRowAccept = [
|
|
|
3665
3681
|
shop.name,
|
|
3666
3682
|
materialType.name,
|
|
3667
3683
|
];
|
|
3684
|
+
const tableWidgetsProxy = new Proxy(widgetsTableAccept, {
|
|
3685
|
+
get(target, prop) {
|
|
3686
|
+
return target[String(prop)];
|
|
3687
|
+
},
|
|
3688
|
+
set(target, prop, value) {
|
|
3689
|
+
if (!checkRuleConfigObj(value)) {
|
|
3690
|
+
return false;
|
|
3691
|
+
}
|
|
3692
|
+
target[String(prop)] = value;
|
|
3693
|
+
return true;
|
|
3694
|
+
},
|
|
3695
|
+
});
|
|
3668
3696
|
function pushTableWidgets(key, config) {
|
|
3669
|
-
|
|
3697
|
+
tableWidgetsProxy[key] = config;
|
|
3670
3698
|
}
|
|
3671
3699
|
function pushRowWidgets(key) {
|
|
3672
3700
|
widgetNamesRowAccept.push(key);
|
|
@@ -3691,8 +3719,20 @@ const rules = {
|
|
|
3691
3719
|
[shop.name]: shop,
|
|
3692
3720
|
[materialType.name]: materialType,
|
|
3693
3721
|
};
|
|
3722
|
+
const rulesProxy = new Proxy(rules, {
|
|
3723
|
+
get(target, prop) {
|
|
3724
|
+
return target[String(prop)];
|
|
3725
|
+
},
|
|
3726
|
+
set(target, prop, value) {
|
|
3727
|
+
if (!checkRuleConfigObj(value)) {
|
|
3728
|
+
return false;
|
|
3729
|
+
}
|
|
3730
|
+
target[String(prop)] = value;
|
|
3731
|
+
return true;
|
|
3732
|
+
},
|
|
3733
|
+
});
|
|
3694
3734
|
function pushRuleWidgets(key, config) {
|
|
3695
|
-
|
|
3735
|
+
rulesProxy[key] = config;
|
|
3696
3736
|
}
|
|
3697
3737
|
|
|
3698
3738
|
const _hoisted_1$1 = {
|
|
@@ -4173,10 +4213,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4173
4213
|
if (!parentRuleType) {
|
|
4174
4214
|
rule.config.fieldRatio = "100%";
|
|
4175
4215
|
} else if (parentRuleType === WidgetType.RowWidget) {
|
|
4176
|
-
const
|
|
4177
|
-
|
|
4216
|
+
const customRadio = props.resetCmpRatio(
|
|
4217
|
+
rule.config.config.name,
|
|
4218
|
+
parentRuleType
|
|
4219
|
+
);
|
|
4220
|
+
if (customRadio) {
|
|
4221
|
+
rule.config.fieldRatio = customRadio;
|
|
4222
|
+
return;
|
|
4223
|
+
}
|
|
4224
|
+
rule.config.fieldRatio = ["table", "product"].includes(
|
|
4225
|
+
rule.config.config.name
|
|
4226
|
+
) ? 24 : 12;
|
|
4178
4227
|
} else if (parentRuleType === WidgetType.TableWidget) {
|
|
4179
|
-
|
|
4228
|
+
const customRadio = props.resetCmpRatio(
|
|
4229
|
+
rule.config.config.name,
|
|
4230
|
+
parentRuleType
|
|
4231
|
+
);
|
|
4232
|
+
rule.config.fieldRatio = customRadio || "140px";
|
|
4180
4233
|
}
|
|
4181
4234
|
}
|
|
4182
4235
|
function getFormRule() {
|
|
@@ -290,7 +290,7 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
290
290
|
modalRender: import("vue").PropType<(arg: {
|
|
291
291
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
292
292
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
293
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
293
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
294
294
|
$attrs: {
|
|
295
295
|
[x: string]: unknown;
|
|
296
296
|
};
|
|
@@ -1048,9 +1048,9 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
1048
1048
|
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
1049
1049
|
}, {
|
|
1050
1050
|
title: string;
|
|
1051
|
-
visible: boolean;
|
|
1052
1051
|
mode: string;
|
|
1053
1052
|
showCount: boolean;
|
|
1053
|
+
visible: boolean;
|
|
1054
1054
|
unitStr: string;
|
|
1055
1055
|
limit: number;
|
|
1056
1056
|
load: Function;
|
|
@@ -290,7 +290,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
290
290
|
modalRender: import("vue").PropType<(arg: {
|
|
291
291
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
292
292
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
293
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
293
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
294
294
|
$attrs: {
|
|
295
295
|
[x: string]: unknown;
|
|
296
296
|
};
|
|
@@ -1048,9 +1048,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1048
1048
|
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
1049
1049
|
}, {
|
|
1050
1050
|
title: string;
|
|
1051
|
-
visible: boolean;
|
|
1052
1051
|
mode: string;
|
|
1053
1052
|
showCount: boolean;
|
|
1053
|
+
visible: boolean;
|
|
1054
1054
|
unitStr: string;
|
|
1055
1055
|
limit: number;
|
|
1056
1056
|
load: Function;
|
|
@@ -232,7 +232,7 @@ declare const BmModal: import("bm-admin-ui/es/utils/with-install").SFCWithInstal
|
|
|
232
232
|
modalRender: import("vue").PropType<(arg: {
|
|
233
233
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
234
234
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
235
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
235
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
236
236
|
$attrs: {
|
|
237
237
|
[x: string]: unknown;
|
|
238
238
|
};
|
|
@@ -226,7 +226,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
226
226
|
modalRender: import("vue").PropType<(arg: {
|
|
227
227
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
228
228
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
229
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
229
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
230
230
|
$attrs: {
|
|
231
231
|
[x: string]: unknown;
|
|
232
232
|
};
|
|
@@ -207,18 +207,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
207
207
|
}
|
|
208
208
|
var BmHtmlNode = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render], ["__file", "BmHtmlNode.vue"]]);
|
|
209
209
|
|
|
210
|
-
const _hoisted_1 =
|
|
210
|
+
const _hoisted_1 = ["onClick"];
|
|
211
211
|
const _hoisted_2 = { class: "bm-condition-node-box" };
|
|
212
212
|
const _hoisted_3 = { class: "condition-header" };
|
|
213
213
|
const _hoisted_4 = { key: 0 };
|
|
214
214
|
const _hoisted_5 = { class: "condition-desc" };
|
|
215
215
|
const _hoisted_6 = { class: "desc" };
|
|
216
216
|
const _hoisted_7 = { key: 0 };
|
|
217
|
-
const __default__ = {
|
|
218
|
-
name: "BmConditionNode"
|
|
219
|
-
};
|
|
220
217
|
const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
221
|
-
|
|
218
|
+
__name: "BmConditionNode",
|
|
222
219
|
props: {
|
|
223
220
|
isCustom: {
|
|
224
221
|
type: Boolean,
|
|
@@ -236,6 +233,12 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
236
233
|
type: String,
|
|
237
234
|
default: " "
|
|
238
235
|
},
|
|
236
|
+
nodeClick: {
|
|
237
|
+
type: Function,
|
|
238
|
+
default: () => {
|
|
239
|
+
console.info("\u70B9\u51FB\u8282\u70B9\u56DE\u8C03");
|
|
240
|
+
}
|
|
241
|
+
},
|
|
239
242
|
copyCallback: {
|
|
240
243
|
type: Function,
|
|
241
244
|
default: () => {
|
|
@@ -250,8 +253,17 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
250
253
|
}
|
|
251
254
|
},
|
|
252
255
|
setup(__props) {
|
|
256
|
+
const props = __props;
|
|
257
|
+
function callback() {
|
|
258
|
+
if (props.isCustom) {
|
|
259
|
+
props.nodeClick();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
253
262
|
return (_ctx, _cache) => {
|
|
254
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
263
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
264
|
+
class: "bm-condition-node",
|
|
265
|
+
onClick: vue.withModifiers(callback, ["stop"])
|
|
266
|
+
}, [
|
|
255
267
|
vue.createElementVNode("div", _hoisted_2, [
|
|
256
268
|
vue.createElementVNode("div", _hoisted_3, [
|
|
257
269
|
vue.createElementVNode("span", {
|
|
@@ -270,9 +282,12 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
270
282
|
}, [
|
|
271
283
|
vue.createCommentVNode(' <CopyOutlined\n @click.stop="\n () => {\n copyCallback()\n }\n " /> \u6682\u65F6\u5173\u95ED\u590D\u5236\u8282\u70B9 '),
|
|
272
284
|
vue.createVNode(vue.unref(iconsVue.CloseOutlined), {
|
|
273
|
-
onClick: _cache[0] || (_cache[0] = (
|
|
274
|
-
|
|
275
|
-
|
|
285
|
+
onClick: _cache[0] || (_cache[0] = vue.withModifiers(
|
|
286
|
+
() => {
|
|
287
|
+
__props.deleteCallback();
|
|
288
|
+
},
|
|
289
|
+
["stop"]
|
|
290
|
+
))
|
|
276
291
|
})
|
|
277
292
|
], 2)
|
|
278
293
|
]),
|
|
@@ -283,7 +298,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
283
298
|
])) : vue.createCommentVNode("v-if", true)
|
|
284
299
|
])
|
|
285
300
|
])
|
|
286
|
-
]);
|
|
301
|
+
], 8, _hoisted_1);
|
|
287
302
|
};
|
|
288
303
|
}
|
|
289
304
|
});
|
|
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: StringConstructor;
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
|
+
nodeClick: {
|
|
19
|
+
type: FunctionConstructor;
|
|
20
|
+
default: () => void;
|
|
21
|
+
};
|
|
18
22
|
copyCallback: {
|
|
19
23
|
type: FunctionConstructor;
|
|
20
24
|
default: () => void;
|
|
@@ -41,6 +45,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
41
45
|
type: StringConstructor;
|
|
42
46
|
default: string;
|
|
43
47
|
};
|
|
48
|
+
nodeClick: {
|
|
49
|
+
type: FunctionConstructor;
|
|
50
|
+
default: () => void;
|
|
51
|
+
};
|
|
44
52
|
copyCallback: {
|
|
45
53
|
type: FunctionConstructor;
|
|
46
54
|
default: () => void;
|
|
@@ -50,6 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
58
|
default: () => void;
|
|
51
59
|
};
|
|
52
60
|
}>> & {}>>;
|
|
61
|
+
callback: () => void;
|
|
53
62
|
CloseOutlined: import("@ant-design/icons-vue/lib/icons/CloseOutlined").CloseOutlinedIconType;
|
|
54
63
|
RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
|
|
55
64
|
Tag: {
|
|
@@ -227,6 +236,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
236
|
type: StringConstructor;
|
|
228
237
|
default: string;
|
|
229
238
|
};
|
|
239
|
+
nodeClick: {
|
|
240
|
+
type: FunctionConstructor;
|
|
241
|
+
default: () => void;
|
|
242
|
+
};
|
|
230
243
|
copyCallback: {
|
|
231
244
|
type: FunctionConstructor;
|
|
232
245
|
default: () => void;
|
|
@@ -240,6 +253,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
240
253
|
desc: string;
|
|
241
254
|
isCustom: boolean;
|
|
242
255
|
priority: number;
|
|
256
|
+
nodeClick: Function;
|
|
243
257
|
copyCallback: Function;
|
|
244
258
|
deleteCallback: Function;
|
|
245
259
|
}>;
|
|
@@ -18778,6 +18778,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
18778
18778
|
const columns = vue.reactive([]);
|
|
18779
18779
|
const data = vue.reactive([]);
|
|
18780
18780
|
const config = vue.computed(() => ({
|
|
18781
|
+
...props.rule?.config?.formConfig,
|
|
18781
18782
|
columns: [...columns],
|
|
18782
18783
|
data: [...data],
|
|
18783
18784
|
columnConfig: {
|
|
@@ -3574,6 +3574,10 @@ const formDesignerProps = {
|
|
|
3574
3574
|
type: Function,
|
|
3575
3575
|
default: (targetRule, parentRule) => true,
|
|
3576
3576
|
},
|
|
3577
|
+
resetCmpRatio: {
|
|
3578
|
+
type: Function,
|
|
3579
|
+
default: (ruleName, parentRuleName) => 0,
|
|
3580
|
+
},
|
|
3577
3581
|
};
|
|
3578
3582
|
|
|
3579
3583
|
const _hoisted_1$3 = {
|
|
@@ -3644,6 +3648,18 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3644
3648
|
});
|
|
3645
3649
|
var CheckboxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "checkbox-switch.vue"]]);
|
|
3646
3650
|
|
|
3651
|
+
function checkRuleConfigObj(obj) {
|
|
3652
|
+
if (!lodashEs.isObject(obj))
|
|
3653
|
+
return false;
|
|
3654
|
+
const parses = ['icon', 'label', 'name', 'parse', 'props', 'rule'];
|
|
3655
|
+
for (const parse of parses) {
|
|
3656
|
+
if (!obj[parse]) {
|
|
3657
|
+
console.error(`控件配置对象缺少【${parse}】字段,请补充完整`);
|
|
3658
|
+
return false;
|
|
3659
|
+
}
|
|
3660
|
+
}
|
|
3661
|
+
return true;
|
|
3662
|
+
}
|
|
3647
3663
|
const widgetsTableAccept = {
|
|
3648
3664
|
[input.name]: input,
|
|
3649
3665
|
[textarea.name]: textarea,
|
|
@@ -3675,8 +3691,20 @@ const widgetNamesRowAccept = [
|
|
|
3675
3691
|
shop.name,
|
|
3676
3692
|
materialType.name,
|
|
3677
3693
|
];
|
|
3694
|
+
const tableWidgetsProxy = new Proxy(widgetsTableAccept, {
|
|
3695
|
+
get(target, prop) {
|
|
3696
|
+
return target[String(prop)];
|
|
3697
|
+
},
|
|
3698
|
+
set(target, prop, value) {
|
|
3699
|
+
if (!checkRuleConfigObj(value)) {
|
|
3700
|
+
return false;
|
|
3701
|
+
}
|
|
3702
|
+
target[String(prop)] = value;
|
|
3703
|
+
return true;
|
|
3704
|
+
},
|
|
3705
|
+
});
|
|
3678
3706
|
function pushTableWidgets(key, config) {
|
|
3679
|
-
|
|
3707
|
+
tableWidgetsProxy[key] = config;
|
|
3680
3708
|
}
|
|
3681
3709
|
function pushRowWidgets(key) {
|
|
3682
3710
|
widgetNamesRowAccept.push(key);
|
|
@@ -3701,8 +3729,20 @@ const rules = {
|
|
|
3701
3729
|
[shop.name]: shop,
|
|
3702
3730
|
[materialType.name]: materialType,
|
|
3703
3731
|
};
|
|
3732
|
+
const rulesProxy = new Proxy(rules, {
|
|
3733
|
+
get(target, prop) {
|
|
3734
|
+
return target[String(prop)];
|
|
3735
|
+
},
|
|
3736
|
+
set(target, prop, value) {
|
|
3737
|
+
if (!checkRuleConfigObj(value)) {
|
|
3738
|
+
return false;
|
|
3739
|
+
}
|
|
3740
|
+
target[String(prop)] = value;
|
|
3741
|
+
return true;
|
|
3742
|
+
},
|
|
3743
|
+
});
|
|
3704
3744
|
function pushRuleWidgets(key, config) {
|
|
3705
|
-
|
|
3745
|
+
rulesProxy[key] = config;
|
|
3706
3746
|
}
|
|
3707
3747
|
|
|
3708
3748
|
const _hoisted_1$1 = {
|
|
@@ -4183,10 +4223,23 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4183
4223
|
if (!parentRuleType) {
|
|
4184
4224
|
rule.config.fieldRatio = "100%";
|
|
4185
4225
|
} else if (parentRuleType === WidgetType.RowWidget) {
|
|
4186
|
-
const
|
|
4187
|
-
|
|
4226
|
+
const customRadio = props.resetCmpRatio(
|
|
4227
|
+
rule.config.config.name,
|
|
4228
|
+
parentRuleType
|
|
4229
|
+
);
|
|
4230
|
+
if (customRadio) {
|
|
4231
|
+
rule.config.fieldRatio = customRadio;
|
|
4232
|
+
return;
|
|
4233
|
+
}
|
|
4234
|
+
rule.config.fieldRatio = ["table", "product"].includes(
|
|
4235
|
+
rule.config.config.name
|
|
4236
|
+
) ? 24 : 12;
|
|
4188
4237
|
} else if (parentRuleType === WidgetType.TableWidget) {
|
|
4189
|
-
|
|
4238
|
+
const customRadio = props.resetCmpRatio(
|
|
4239
|
+
rule.config.config.name,
|
|
4240
|
+
parentRuleType
|
|
4241
|
+
);
|
|
4242
|
+
rule.config.fieldRatio = customRadio || "140px";
|
|
4190
4243
|
}
|
|
4191
4244
|
}
|
|
4192
4245
|
function getFormRule() {
|
|
@@ -290,7 +290,7 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
290
290
|
modalRender: import("vue").PropType<(arg: {
|
|
291
291
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
292
292
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
293
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
293
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
294
294
|
$attrs: {
|
|
295
295
|
[x: string]: unknown;
|
|
296
296
|
};
|
|
@@ -1048,9 +1048,9 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
1048
1048
|
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
1049
1049
|
}, {
|
|
1050
1050
|
title: string;
|
|
1051
|
-
visible: boolean;
|
|
1052
1051
|
mode: string;
|
|
1053
1052
|
showCount: boolean;
|
|
1053
|
+
visible: boolean;
|
|
1054
1054
|
unitStr: string;
|
|
1055
1055
|
limit: number;
|
|
1056
1056
|
load: Function;
|
|
@@ -290,7 +290,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
290
290
|
modalRender: import("vue").PropType<(arg: {
|
|
291
291
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
292
292
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
293
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
293
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
294
294
|
$attrs: {
|
|
295
295
|
[x: string]: unknown;
|
|
296
296
|
};
|
|
@@ -1048,9 +1048,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1048
1048
|
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
1049
1049
|
}, {
|
|
1050
1050
|
title: string;
|
|
1051
|
-
visible: boolean;
|
|
1052
1051
|
mode: string;
|
|
1053
1052
|
showCount: boolean;
|
|
1053
|
+
visible: boolean;
|
|
1054
1054
|
unitStr: string;
|
|
1055
1055
|
limit: number;
|
|
1056
1056
|
load: Function;
|
package/package.json
CHANGED
|
@@ -232,7 +232,7 @@ declare const BmModal: import("bm-admin-ui/es/utils/with-install").SFCWithInstal
|
|
|
232
232
|
modalRender: import("vue").PropType<(arg: {
|
|
233
233
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
234
234
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
235
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
235
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
236
236
|
$attrs: {
|
|
237
237
|
[x: string]: unknown;
|
|
238
238
|
};
|
|
@@ -226,7 +226,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
226
226
|
modalRender: import("vue").PropType<(arg: {
|
|
227
227
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
228
228
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
229
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
229
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
230
230
|
$attrs: {
|
|
231
231
|
[x: string]: unknown;
|
|
232
232
|
};
|
|
@@ -15,6 +15,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: StringConstructor;
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
|
+
nodeClick: {
|
|
19
|
+
type: FunctionConstructor;
|
|
20
|
+
default: () => void;
|
|
21
|
+
};
|
|
18
22
|
copyCallback: {
|
|
19
23
|
type: FunctionConstructor;
|
|
20
24
|
default: () => void;
|
|
@@ -41,6 +45,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
41
45
|
type: StringConstructor;
|
|
42
46
|
default: string;
|
|
43
47
|
};
|
|
48
|
+
nodeClick: {
|
|
49
|
+
type: FunctionConstructor;
|
|
50
|
+
default: () => void;
|
|
51
|
+
};
|
|
44
52
|
copyCallback: {
|
|
45
53
|
type: FunctionConstructor;
|
|
46
54
|
default: () => void;
|
|
@@ -50,6 +58,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
58
|
default: () => void;
|
|
51
59
|
};
|
|
52
60
|
}>> & {}>>;
|
|
61
|
+
callback: () => void;
|
|
53
62
|
CloseOutlined: import("@ant-design/icons-vue/lib/icons/CloseOutlined").CloseOutlinedIconType;
|
|
54
63
|
RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
|
|
55
64
|
Tag: {
|
|
@@ -227,6 +236,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
236
|
type: StringConstructor;
|
|
228
237
|
default: string;
|
|
229
238
|
};
|
|
239
|
+
nodeClick: {
|
|
240
|
+
type: FunctionConstructor;
|
|
241
|
+
default: () => void;
|
|
242
|
+
};
|
|
230
243
|
copyCallback: {
|
|
231
244
|
type: FunctionConstructor;
|
|
232
245
|
default: () => void;
|
|
@@ -240,6 +253,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
240
253
|
desc: string;
|
|
241
254
|
isCustom: boolean;
|
|
242
255
|
priority: number;
|
|
256
|
+
nodeClick: Function;
|
|
243
257
|
copyCallback: Function;
|
|
244
258
|
deleteCallback: Function;
|
|
245
259
|
}>;
|
|
@@ -290,7 +290,7 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
290
290
|
modalRender: import("vue").PropType<(arg: {
|
|
291
291
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
292
292
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
293
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
293
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
294
294
|
$attrs: {
|
|
295
295
|
[x: string]: unknown;
|
|
296
296
|
};
|
|
@@ -1048,9 +1048,9 @@ declare const BmStaffsSelector: import("bm-admin-ui/es/utils/with-install").SFCW
|
|
|
1048
1048
|
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
1049
1049
|
}, {
|
|
1050
1050
|
title: string;
|
|
1051
|
-
visible: boolean;
|
|
1052
1051
|
mode: string;
|
|
1053
1052
|
showCount: boolean;
|
|
1053
|
+
visible: boolean;
|
|
1054
1054
|
unitStr: string;
|
|
1055
1055
|
limit: number;
|
|
1056
1056
|
load: Function;
|
|
@@ -290,7 +290,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
290
290
|
modalRender: import("vue").PropType<(arg: {
|
|
291
291
|
originVNode: import("ant-design-vue/lib/_util/type").VueNode;
|
|
292
292
|
}) => import("ant-design-vue/lib/_util/type").VueNode>;
|
|
293
|
-
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
|
293
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "keyboard" | "visible" | "confirmLoading" | "closable" | "centered" | "maskClosable" | "forceRender" | "destroyOnClose" | "getContainer" | "bodyStyle" | "maskStyle" | "mask" | "focusTriggerAfterClose">;
|
|
294
294
|
$attrs: {
|
|
295
295
|
[x: string]: unknown;
|
|
296
296
|
};
|
|
@@ -1048,9 +1048,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1048
1048
|
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
1049
1049
|
}, {
|
|
1050
1050
|
title: string;
|
|
1051
|
-
visible: boolean;
|
|
1052
1051
|
mode: string;
|
|
1053
1052
|
showCount: boolean;
|
|
1053
|
+
visible: boolean;
|
|
1054
1054
|
unitStr: string;
|
|
1055
1055
|
limit: number;
|
|
1056
1056
|
load: Function;
|