bm-admin-ui 1.0.38-alpha → 1.0.40-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/__tests__/util/domHook.d.ts +6 -0
- package/es/components/feedback/index.js +2 -2
- package/es/components/float-table/index.js +36 -27
- package/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
- package/es/components/form-create/index.js +215 -107
- package/es/components/form-designer/index.js +86 -47
- package/es/components/input-tags-display/index.js +30 -13
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +9 -0
- package/es/components/over-tooltips/index.js +27 -20
- package/es/components/search-filter/index.js +18 -10
- package/es/components/select-all/index.js +17 -9
- package/es/components/shops-filter/index.js +19 -13
- package/es/components/staffs-selector/index.js +116 -82
- package/es/components/timeline/__tests__/index.test.d.ts +1 -0
- package/es/components/timeline/index.js +8 -7
- package/es/components/upload/__tests__/mock.d.ts +2 -0
- package/es/components/upload/__tests__/requests.d.ts +7 -0
- package/es/components/upload/__tests__/upload.test.d.ts +1 -0
- package/es/components/upload/index.js +115 -78
- package/index.esm.js +41000 -4676
- package/index.js +40999 -4675
- package/lib/components/__tests__/util/domHook.d.ts +6 -0
- package/lib/components/feedback/index.js +1 -1
- package/lib/components/float-table/index.js +36 -27
- package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
- package/lib/components/form-create/index.js +214 -106
- package/lib/components/form-designer/index.js +86 -47
- package/lib/components/input-tags-display/index.js +30 -13
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +9 -0
- package/lib/components/over-tooltips/index.js +27 -20
- package/lib/components/search-filter/index.js +18 -10
- package/lib/components/select-all/index.js +17 -9
- package/lib/components/shops-filter/index.js +19 -13
- package/lib/components/staffs-selector/index.js +116 -82
- package/lib/components/timeline/__tests__/index.test.d.ts +1 -0
- package/lib/components/timeline/index.js +8 -7
- package/lib/components/upload/__tests__/mock.d.ts +2 -0
- package/lib/components/upload/__tests__/requests.d.ts +7 -0
- package/lib/components/upload/__tests__/upload.test.d.ts +1 -0
- package/lib/components/upload/index.js +115 -78
- package/package.json +1 -1
- package/theme-chalk/button.css +1 -1
- package/theme-chalk/feedback.css +1 -1
- package/theme-chalk/float-table.css +1 -1
- package/theme-chalk/floating-vue.css +1 -1
- package/theme-chalk/flow-designer.css +1 -1
- package/theme-chalk/form-create.css +1 -1
- package/theme-chalk/form-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/input-tags-display.css +1 -1
- package/theme-chalk/modal.css +1 -1
- package/theme-chalk/over-tooltips.css +1 -1
- package/theme-chalk/search-filter.css +1 -1
- package/theme-chalk/select-all.css +1 -1
- package/theme-chalk/staffs-selector.css +1 -1
- package/theme-chalk/timeline.css +1 -1
- package/theme-chalk/upload.css +1 -1
- package/types/components/__tests__/util/domHook.d.ts +6 -0
- package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +9 -0
- package/types/components/timeline/__tests__/index.test.d.ts +1 -0
- package/types/components/upload/__tests__/mock.d.ts +2 -0
- package/types/components/upload/__tests__/requests.d.ts +7 -0
- package/types/components/upload/__tests__/upload.test.d.ts +1 -0
|
@@ -844,10 +844,14 @@ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
|
|
|
844
844
|
function emitSetValue(val) {
|
|
845
845
|
emits("setValue", val);
|
|
846
846
|
}
|
|
847
|
-
vue.watch(
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
847
|
+
vue.watch(
|
|
848
|
+
props.options,
|
|
849
|
+
(val) => {
|
|
850
|
+
handleRepeatOption(val);
|
|
851
|
+
emitSetValue(val);
|
|
852
|
+
},
|
|
853
|
+
{ deep: true }
|
|
854
|
+
);
|
|
851
855
|
return (_ctx, _cache) => {
|
|
852
856
|
const _component_Delete = vue.resolveComponent("Delete");
|
|
853
857
|
const _component_ARow = vue.resolveComponent("ARow");
|
|
@@ -2498,10 +2502,14 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
|
|
|
2498
2502
|
uploadPicRule.hidden = uploadPictureRule.hidden;
|
|
2499
2503
|
rules.value = [...rules.value];
|
|
2500
2504
|
}
|
|
2501
|
-
vue.watch(
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
+
vue.watch(
|
|
2506
|
+
() => props.formCreateInject.rule.config.uploadPictureRule,
|
|
2507
|
+
handleUploadPicRule,
|
|
2508
|
+
{
|
|
2509
|
+
deep: true,
|
|
2510
|
+
immediate: true
|
|
2511
|
+
}
|
|
2512
|
+
);
|
|
2505
2513
|
return (_ctx, _cache) => {
|
|
2506
2514
|
const _component_FormCreate = vue.resolveComponent("FormCreate");
|
|
2507
2515
|
return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Tabs), {
|
|
@@ -2789,7 +2797,10 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2789
2797
|
}
|
|
2790
2798
|
];
|
|
2791
2799
|
function emitChangeEvt() {
|
|
2792
|
-
emits(
|
|
2800
|
+
emits(
|
|
2801
|
+
"change",
|
|
2802
|
+
options.filter((op) => checkList.value.includes(op.value))
|
|
2803
|
+
);
|
|
2793
2804
|
}
|
|
2794
2805
|
function handOk() {
|
|
2795
2806
|
visible.value = false;
|
|
@@ -2922,17 +2933,19 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
|
|
|
2922
2933
|
const props = __props;
|
|
2923
2934
|
const checkedValue = vue.ref(!!props.defaultSelectValue);
|
|
2924
2935
|
const selectValue = vue.ref(props.defaultSelectValue);
|
|
2925
|
-
const shopRules = vue.computed(
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
+
const shopRules = vue.computed(
|
|
2937
|
+
() => props.widgetFormRules.reduce((pre, cur) => {
|
|
2938
|
+
const name = cur.config.config.name;
|
|
2939
|
+
if (name === "row" || name === "table") {
|
|
2940
|
+
cur.config.childRules.forEach((rule) => {
|
|
2941
|
+
getShop(rule, pre);
|
|
2942
|
+
});
|
|
2943
|
+
} else {
|
|
2944
|
+
getShop(cur, pre);
|
|
2945
|
+
}
|
|
2946
|
+
return pre;
|
|
2947
|
+
}, [])
|
|
2948
|
+
);
|
|
2936
2949
|
const shops = vue.computed(() => {
|
|
2937
2950
|
return shopRules.value.map((shopRule) => ({
|
|
2938
2951
|
value: shopRule.field,
|
|
@@ -3477,11 +3490,13 @@ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3477
3490
|
props: ["childRules"],
|
|
3478
3491
|
setup(__props) {
|
|
3479
3492
|
const props = __props;
|
|
3480
|
-
const text = vue.computed(
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3493
|
+
const text = vue.computed(
|
|
3494
|
+
() => props.childRules.filter((rule) => rule.type === "inputNumber" && rule.config.count).reduce((pre, item, index) => {
|
|
3495
|
+
if (index > 0)
|
|
3496
|
+
pre += "\u3001";
|
|
3497
|
+
return pre + `${item.title.title}: 0`;
|
|
3498
|
+
}, "")
|
|
3499
|
+
);
|
|
3485
3500
|
return (_ctx, _cache) => {
|
|
3486
3501
|
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
3487
3502
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
@@ -3611,11 +3626,15 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
|
|
|
3611
3626
|
function getPopupContainer() {
|
|
3612
3627
|
return document.body;
|
|
3613
3628
|
}
|
|
3614
|
-
vue.watch(
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3629
|
+
vue.watch(
|
|
3630
|
+
childRules,
|
|
3631
|
+
(val) => {
|
|
3632
|
+
emits("change", val);
|
|
3633
|
+
},
|
|
3634
|
+
{
|
|
3635
|
+
deep: true
|
|
3636
|
+
}
|
|
3637
|
+
);
|
|
3619
3638
|
return (_ctx, _cache) => {
|
|
3620
3639
|
const _component_Delete = vue.resolveComponent("Delete");
|
|
3621
3640
|
const _component_ARow = vue.resolveComponent("ARow");
|
|
@@ -3781,9 +3800,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3781
3800
|
const cacheProps = vue.reactive({});
|
|
3782
3801
|
const fApi = vue.ref();
|
|
3783
3802
|
const activeParentRule = vue.ref();
|
|
3784
|
-
const menuList = vue.computed(
|
|
3803
|
+
const menuList = vue.computed(
|
|
3804
|
+
() => tabData.find((tab) => tab.key === activeKey.value).menuList
|
|
3805
|
+
);
|
|
3785
3806
|
const activeProps = vue.computed(() => cacheProps[activeRule.value.field]);
|
|
3786
|
-
const activeRuleInList = vue.computed(
|
|
3807
|
+
const activeRuleInList = vue.computed(
|
|
3808
|
+
() => activeParentRule.value?.config?.childRules || widgetFormRules
|
|
3809
|
+
);
|
|
3787
3810
|
function hideShowDragTip() {
|
|
3788
3811
|
showDragTip.value = false;
|
|
3789
3812
|
}
|
|
@@ -3838,7 +3861,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3838
3861
|
if (!widgetNamesRowAccept.includes(config.name) && activeParentRuleName === "row" || !Object.keys(widgetsTableAccept).includes(config.name) && activeParentRuleName === "table") {
|
|
3839
3862
|
disabledTip(activeParentRule.value.config.config.name);
|
|
3840
3863
|
} else {
|
|
3841
|
-
const index = activeRuleInList.value.findIndex(
|
|
3864
|
+
const index = activeRuleInList.value.findIndex(
|
|
3865
|
+
(item) => item.field === activeRule.value.field
|
|
3866
|
+
);
|
|
3842
3867
|
activeRuleInList.value.splice(index + 1, 0, rule);
|
|
3843
3868
|
setActiveRule(rule, activeParentRule.value);
|
|
3844
3869
|
hideShowDragTip();
|
|
@@ -3917,7 +3942,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
3917
3942
|
} else {
|
|
3918
3943
|
activeRule.value = {};
|
|
3919
3944
|
}
|
|
3920
|
-
} else if (targetRule?.config?.childRules?.some(
|
|
3945
|
+
} else if (targetRule?.config?.childRules?.some(
|
|
3946
|
+
(rule) => rule.field === activeRule.value.field
|
|
3947
|
+
)) {
|
|
3921
3948
|
const newIndex = Math.min(parentList.length - 1, index);
|
|
3922
3949
|
if (newIndex >= 0) {
|
|
3923
3950
|
setActiveRule(parentList[newIndex]);
|
|
@@ -4065,7 +4092,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4065
4092
|
return pass;
|
|
4066
4093
|
}
|
|
4067
4094
|
function flowConditionEffect(activeProps2, flowCondition) {
|
|
4068
|
-
const requiredRule = activeProps2?.find(
|
|
4095
|
+
const requiredRule = activeProps2?.find(
|
|
4096
|
+
(rule) => rule.field === "effect.required"
|
|
4097
|
+
);
|
|
4069
4098
|
if (requiredRule) {
|
|
4070
4099
|
if (!requiredRule.props) {
|
|
4071
4100
|
requiredRule.props = {};
|
|
@@ -4073,20 +4102,30 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4073
4102
|
requiredRule.props.disabled = !!flowCondition[activeRule.value.field];
|
|
4074
4103
|
}
|
|
4075
4104
|
}
|
|
4076
|
-
vue.watch(
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4105
|
+
vue.watch(
|
|
4106
|
+
() => props.presetRules,
|
|
4107
|
+
(presetRules) => {
|
|
4108
|
+
widgetFormRules.push(...presetRules);
|
|
4109
|
+
}
|
|
4110
|
+
);
|
|
4111
|
+
vue.watch(
|
|
4112
|
+
() => props.formRules,
|
|
4113
|
+
(formRules) => {
|
|
4114
|
+
formRules && edit(formRules);
|
|
4115
|
+
}
|
|
4116
|
+
);
|
|
4082
4117
|
vue.watch(activeProps, (activeProps2) => {
|
|
4083
4118
|
flowConditionEffect(activeProps2, props.flowCondition);
|
|
4084
4119
|
});
|
|
4085
|
-
vue.watch(
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4120
|
+
vue.watch(
|
|
4121
|
+
() => props.flowCondition,
|
|
4122
|
+
(flowCondition) => {
|
|
4123
|
+
flowConditionEffect(activeProps.value, flowCondition);
|
|
4124
|
+
},
|
|
4125
|
+
{
|
|
4126
|
+
deep: true
|
|
4127
|
+
}
|
|
4128
|
+
);
|
|
4090
4129
|
vue.onBeforeUnmount(() => {
|
|
4091
4130
|
resetIndex();
|
|
4092
4131
|
});
|
|
@@ -4200,7 +4239,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4200
4239
|
]),
|
|
4201
4240
|
_: 1
|
|
4202
4241
|
}, 8, ["list"]),
|
|
4203
|
-
showDragTip.value && !_ctx.formRules
|
|
4242
|
+
showDragTip.value && !_ctx.formRules?.length ? (vue.openBlock(), vue.createBlock(NoDataTip, {
|
|
4204
4243
|
key: 0,
|
|
4205
4244
|
class: "bm-no-data-tip"
|
|
4206
4245
|
})) : vue.createCommentVNode("v-if", true)
|
|
@@ -26,6 +26,10 @@ var _export_sfc = (sfc, props) => {
|
|
|
26
26
|
const _sfc_main = vue.defineComponent({
|
|
27
27
|
components: { ToolTip: ToolTip__default["default"], CloseCircleFilled: iconsVue.CloseCircleFilled, Button: Button__default["default"], Tag: Tag__default["default"] },
|
|
28
28
|
props: {
|
|
29
|
+
disabled: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
},
|
|
29
33
|
list: {
|
|
30
34
|
type: Array,
|
|
31
35
|
default: () => []
|
|
@@ -36,7 +40,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
36
40
|
},
|
|
37
41
|
placeholder: {
|
|
38
42
|
type: String,
|
|
39
|
-
default: "
|
|
43
|
+
default: "\u8BF7\u9009\u62E9"
|
|
40
44
|
},
|
|
41
45
|
showEmptyBtn: {
|
|
42
46
|
type: Boolean,
|
|
@@ -76,13 +80,21 @@ const _sfc_main = vue.defineComponent({
|
|
|
76
80
|
return document.querySelector(`#${containId}`);
|
|
77
81
|
}
|
|
78
82
|
function clear() {
|
|
83
|
+
if (props.disabled) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
79
86
|
emit("update:list", []);
|
|
80
87
|
emit("clear");
|
|
81
88
|
if (!props.showEmptyBtn && !props.showEmpty) {
|
|
82
|
-
console.error(
|
|
89
|
+
console.error(
|
|
90
|
+
"\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1"
|
|
91
|
+
);
|
|
83
92
|
}
|
|
84
93
|
}
|
|
85
94
|
function toAddTags() {
|
|
95
|
+
if (props.disabled) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
86
98
|
if (!props.list.length || props.alwaysInvoke)
|
|
87
99
|
emit("addClick");
|
|
88
100
|
}
|
|
@@ -101,15 +113,19 @@ const _sfc_main = vue.defineComponent({
|
|
|
101
113
|
placement: props.placement,
|
|
102
114
|
trigger: "hover"
|
|
103
115
|
});
|
|
104
|
-
vue.watch(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
vue.watch(
|
|
117
|
+
() => props.toolTipProps,
|
|
118
|
+
(tooltipprop) => {
|
|
119
|
+
tooltipConfig.value = {
|
|
120
|
+
...tooltipConfig.value,
|
|
121
|
+
...tooltipprop
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
immediate: true,
|
|
126
|
+
deep: true
|
|
127
|
+
}
|
|
128
|
+
);
|
|
113
129
|
return {
|
|
114
130
|
containId,
|
|
115
131
|
clear,
|
|
@@ -176,7 +192,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
176
192
|
_: 2
|
|
177
193
|
}, 1024);
|
|
178
194
|
}), 128)),
|
|
179
|
-
vue.
|
|
195
|
+
!_ctx.disabled ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
196
|
+
key: 0,
|
|
180
197
|
class: "list-clear",
|
|
181
198
|
onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => _ctx.clear && _ctx.clear(...args), ["stop"])),
|
|
182
199
|
onMouseenter: _cache[2] || (_cache[2] = vue.withModifiers(() => {
|
|
@@ -185,7 +202,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
185
202
|
}, ["stop"]))
|
|
186
203
|
}, [
|
|
187
204
|
vue.createVNode(_component_CloseCircleFilled)
|
|
188
|
-
], 32)
|
|
205
|
+
], 32)) : vue.createCommentVNode("v-if", true)
|
|
189
206
|
])
|
|
190
207
|
]),
|
|
191
208
|
_: 1
|
|
@@ -3,6 +3,10 @@ declare type ItemType = {
|
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
declare const _default: import("vue").DefineComponent<{
|
|
6
|
+
disabled: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
6
10
|
list: {
|
|
7
11
|
type: ArrayConstructor;
|
|
8
12
|
default: () => ItemType[];
|
|
@@ -66,6 +70,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
70
|
trigger: string;
|
|
67
71
|
}>;
|
|
68
72
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "update:list" | "addClick")[], "clear" | "update:list" | "addClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
73
|
+
disabled: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
69
77
|
list: {
|
|
70
78
|
type: ArrayConstructor;
|
|
71
79
|
default: () => ItemType[];
|
|
@@ -114,6 +122,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
114
122
|
"onUpdate:list"?: ((...args: any[]) => any) | undefined;
|
|
115
123
|
onAddClick?: ((...args: any[]) => any) | undefined;
|
|
116
124
|
}, {
|
|
125
|
+
disabled: boolean;
|
|
117
126
|
placeholder: string;
|
|
118
127
|
placement: string;
|
|
119
128
|
list: unknown[];
|
|
@@ -43,16 +43,19 @@ const _sfc_main = {
|
|
|
43
43
|
isShow: false,
|
|
44
44
|
openShow: false
|
|
45
45
|
});
|
|
46
|
-
const observer = new IntersectionObserver(
|
|
47
|
-
entries
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
const observer = new IntersectionObserver(
|
|
47
|
+
(entries) => {
|
|
48
|
+
entries.forEach((item) => {
|
|
49
|
+
if (item.intersectionRatio > 0.3) {
|
|
50
|
+
observerDom();
|
|
51
|
+
observer.disconnect();
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
threshold: 0.3
|
|
57
|
+
}
|
|
58
|
+
);
|
|
56
59
|
function observerDom() {
|
|
57
60
|
if (props.line === 1) {
|
|
58
61
|
if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
|
|
@@ -68,16 +71,20 @@ const _sfc_main = {
|
|
|
68
71
|
observer.disconnect();
|
|
69
72
|
});
|
|
70
73
|
let mySelf = vue.ref();
|
|
71
|
-
vue.watch(
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
mySelf.value && observer.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
vue.watch(
|
|
75
|
+
() => props.showAlways,
|
|
76
|
+
function(showAlways) {
|
|
77
|
+
if (showAlways)
|
|
78
|
+
state.openShow = showAlways;
|
|
79
|
+
mySelf.value && observer.unobserve(mySelf.value);
|
|
80
|
+
vue.nextTick(function() {
|
|
81
|
+
mySelf.value && observer.observe(mySelf.value);
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
immediate: true
|
|
86
|
+
}
|
|
87
|
+
);
|
|
81
88
|
const handleVisibleChange = (val) => {
|
|
82
89
|
state.isShow = !state.openShow ? false : val;
|
|
83
90
|
};
|
|
@@ -230,11 +230,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
230
230
|
vue.onBeforeUnmount(() => {
|
|
231
231
|
window.removeEventListener("resize", handleResize);
|
|
232
232
|
});
|
|
233
|
-
vue.watch(
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
vue.watch(
|
|
234
|
+
() => props.showExpandBtn,
|
|
235
|
+
(val) => {
|
|
236
|
+
handleShowExpandBtn(val);
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
immediate: true
|
|
240
|
+
}
|
|
241
|
+
);
|
|
238
242
|
const expandRule = vue.computed(() => {
|
|
239
243
|
const fixedCount = props.fixedCount && props.fixedCount >= 0 ? props.fixedCount : 0;
|
|
240
244
|
const fixedFields = props.fixedFields?.length ? props.fixedFields : [];
|
|
@@ -253,11 +257,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
253
257
|
});
|
|
254
258
|
}
|
|
255
259
|
}
|
|
256
|
-
vue.watch(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
260
|
+
vue.watch(
|
|
261
|
+
isExpand,
|
|
262
|
+
(val) => {
|
|
263
|
+
vue.nextTick(() => handleChangeExpand(val));
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
immediate: true
|
|
267
|
+
}
|
|
268
|
+
);
|
|
261
269
|
expose({
|
|
262
270
|
fApi
|
|
263
271
|
});
|
|
@@ -49,11 +49,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
let selectValue = vue.ref([]);
|
|
52
|
-
vue.watch(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
vue.watch(
|
|
53
|
+
() => props.value,
|
|
54
|
+
(val) => {
|
|
55
|
+
selectValue.value = val;
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
immediate: true
|
|
59
|
+
}
|
|
60
|
+
);
|
|
57
61
|
const selectAll = (e) => {
|
|
58
62
|
let key = "value";
|
|
59
63
|
if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
|
|
@@ -62,9 +66,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
62
66
|
state.search.indeterminate = false;
|
|
63
67
|
state.search.checkedReverse = false;
|
|
64
68
|
if (state.search.checkedAll) {
|
|
65
|
-
selectValue.value = (instance?.attrs.options).map(
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
selectValue.value = (instance?.attrs.options).map(
|
|
70
|
+
(v) => {
|
|
71
|
+
return v[key];
|
|
72
|
+
}
|
|
73
|
+
);
|
|
68
74
|
} else {
|
|
69
75
|
selectValue.value = [];
|
|
70
76
|
}
|
|
@@ -88,7 +94,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
88
94
|
state.search.indeterminate = !!selectValue.value.length && selectValue.value.length < (instance?.attrs.options).length;
|
|
89
95
|
state.search.checkedAll = selectValue.value.length === (instance?.attrs.options).length;
|
|
90
96
|
}
|
|
91
|
-
selectValue.value = (instance?.attrs.options).filter(
|
|
97
|
+
selectValue.value = (instance?.attrs.options).filter(
|
|
98
|
+
(v) => !selectValue.value.some((ele) => ele === v[key])
|
|
99
|
+
).map((x) => x[key]);
|
|
92
100
|
emit("update:value", selectValue.value);
|
|
93
101
|
emit("onSelectAll", {
|
|
94
102
|
type: "reverse",
|
|
@@ -186,22 +186,28 @@ const _sfc_main = vue.defineComponent({
|
|
|
186
186
|
};
|
|
187
187
|
props.loadFilter().then((data) => {
|
|
188
188
|
state.filterArr = data;
|
|
189
|
-
state.filterSelects = state.filterArr.map(
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
state.filterSelects = state.filterArr.map(
|
|
190
|
+
(item) => {
|
|
191
|
+
return item.multiple ? [] : "";
|
|
192
|
+
}
|
|
193
|
+
);
|
|
192
194
|
}).finally(() => {
|
|
193
195
|
methods.fetchData();
|
|
194
196
|
});
|
|
195
|
-
vue.watch(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
197
|
+
vue.watch(
|
|
198
|
+
() => state.shopCheck,
|
|
199
|
+
() => {
|
|
200
|
+
let list = [];
|
|
201
|
+
for (let [key, value] of Object.entries(state.shopCheck)) {
|
|
202
|
+
value && list.push(key);
|
|
203
|
+
}
|
|
204
|
+
state.selected = list;
|
|
205
|
+
emit("update:selected", list);
|
|
206
|
+
emit("change", list);
|
|
207
|
+
methods.checkboxChange();
|
|
208
|
+
},
|
|
209
|
+
{ deep: true }
|
|
210
|
+
);
|
|
205
211
|
if (props.showAlways) {
|
|
206
212
|
state.isActive = true;
|
|
207
213
|
}
|