bm-admin-ui 1.1.0-alpha → 1.1.2-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.
@@ -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 = { class: "bm-condition-node" };
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
- ...__default__,
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", _hoisted_1, [
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\r\n @click.stop="\r\n () => {\r\n copyCallback()\r\n }\r\n " />&nbsp;\u6682\u65F6\u5173\u95ED\u590D\u5236\u8282\u70B9 '),
261
273
  createVNode(unref(CloseOutlined), {
262
- onClick: _cache[0] || (_cache[0] = () => {
263
- __props.deleteCallback();
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
  readonly CloseOutlined: import("@ant-design/icons-vue/lib/icons/CloseOutlined").CloseOutlinedIconType;
54
63
  readonly RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
55
64
  readonly 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
  }>;
@@ -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
- widgetsTableAccept[key] = config;
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
- rules[key] = config;
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 ruleName = rule.config.config.name;
4177
- rule.config.fieldRatio = ruleName === "table" || ruleName === "product" ? 24 : 12;
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
- rule.config.fieldRatio = "140px";
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() {
@@ -211,6 +211,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
211
211
  () => props.modelValue,
212
212
  (val) => {
213
213
  selectValue.value = val;
214
+ if (!selectValue.value || selectValue.value.length <= 0) {
215
+ state.search = {
216
+ indeterminate: false,
217
+ checkedAll: false,
218
+ checkedReverse: false,
219
+ searchList: []
220
+ };
221
+ }
214
222
  },
215
223
  {
216
224
  immediate: true
@@ -221,9 +229,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
221
229
  if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
222
230
  key = (instance?.attrs).fieldNames?.value || (instance?.attrs)["field-names"].value;
223
231
  let value = checkAll(selectValue.value, key);
224
- state.search.checkedReverse = false;
225
232
  state.search.indeterminate = !!value.length && value.length < (instance?.attrs.options).length;
226
233
  state.search.checkedAll = value.length === (instance?.attrs.options).length;
234
+ state.search.checkedReverse = false;
227
235
  selectValue.value = value.map((v) => {
228
236
  return v[key];
229
237
  }) || [];
@@ -246,7 +254,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
246
254
  (ele) => select.indexOf(ele[key]) <= -1
247
255
  ) : search = state.search.searchList;
248
256
  } else {
249
- search = instance?.attrs.options;
257
+ state.search.checkedAll ? search = [] : search = instance?.attrs.options;
250
258
  }
251
259
  list = [...list, ...search];
252
260
  return list;
@@ -280,6 +288,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
280
288
  state.search.checkedReverse = false;
281
289
  state.search.indeterminate = !!value.length && value.length < (instance?.attrs.options).length;
282
290
  state.search.checkedAll = value.length === (instance?.attrs.options).length;
291
+ state.search.searchList = [];
283
292
  emit("update:modelValue", value);
284
293
  emit("onChange", {
285
294
  value,
@@ -90,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
90
  (ele) => select.indexOf(ele[key]) <= -1
91
91
  ) : search = state.search.searchList;
92
92
  } else {
93
- search = instance?.attrs.options;
93
+ state.search.checkedAll ? search = [] : search = instance?.attrs.options;
94
94
  }
95
95
  list = [...list, ...search];
96
96
  return list;
@@ -124,6 +124,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
124
124
  state.search.checkedReverse = false;
125
125
  state.search.indeterminate = !!value.length && value.length < (instance?.attrs.options).length;
126
126
  state.search.checkedAll = value.length === (instance?.attrs.options).length;
127
+ state.search.searchList = [];
127
128
  emit("update:value", value);
128
129
  emit("onChange", {
129
130
  value,
@@ -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 = { class: "bm-condition-node" };
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
- ...__default__,
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", _hoisted_1, [
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\r\n @click.stop="\r\n () => {\r\n copyCallback()\r\n }\r\n " />&nbsp;\u6682\u65F6\u5173\u95ED\u590D\u5236\u8282\u70B9 '),
272
284
  vue.createVNode(vue.unref(iconsVue.CloseOutlined), {
273
- onClick: _cache[0] || (_cache[0] = () => {
274
- __props.deleteCallback();
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
  readonly CloseOutlined: import("@ant-design/icons-vue/lib/icons/CloseOutlined").CloseOutlinedIconType;
54
63
  readonly RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
55
64
  readonly 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
  }>;
@@ -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
- widgetsTableAccept[key] = config;
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
- rules[key] = config;
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 ruleName = rule.config.config.name;
4187
- rule.config.fieldRatio = ruleName === "table" || ruleName === "product" ? 24 : 12;
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
- rule.config.fieldRatio = "140px";
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() {
@@ -221,6 +221,14 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
221
221
  () => props.modelValue,
222
222
  (val) => {
223
223
  selectValue.value = val;
224
+ if (!selectValue.value || selectValue.value.length <= 0) {
225
+ state.search = {
226
+ indeterminate: false,
227
+ checkedAll: false,
228
+ checkedReverse: false,
229
+ searchList: []
230
+ };
231
+ }
224
232
  },
225
233
  {
226
234
  immediate: true
@@ -231,9 +239,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
231
239
  if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
232
240
  key = (instance?.attrs).fieldNames?.value || (instance?.attrs)["field-names"].value;
233
241
  let value = checkAll(selectValue.value, key);
234
- state.search.checkedReverse = false;
235
242
  state.search.indeterminate = !!value.length && value.length < (instance?.attrs.options).length;
236
243
  state.search.checkedAll = value.length === (instance?.attrs.options).length;
244
+ state.search.checkedReverse = false;
237
245
  selectValue.value = value.map((v) => {
238
246
  return v[key];
239
247
  }) || [];
@@ -256,7 +264,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
256
264
  (ele) => select.indexOf(ele[key]) <= -1
257
265
  ) : search = state.search.searchList;
258
266
  } else {
259
- search = instance?.attrs.options;
267
+ state.search.checkedAll ? search = [] : search = instance?.attrs.options;
260
268
  }
261
269
  list = [...list, ...search];
262
270
  return list;
@@ -290,6 +298,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
290
298
  state.search.checkedReverse = false;
291
299
  state.search.indeterminate = !!value.length && value.length < (instance?.attrs.options).length;
292
300
  state.search.checkedAll = value.length === (instance?.attrs.options).length;
301
+ state.search.searchList = [];
293
302
  emit("update:modelValue", value);
294
303
  emit("onChange", {
295
304
  value,
@@ -98,7 +98,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
98
98
  (ele) => select.indexOf(ele[key]) <= -1
99
99
  ) : search = state.search.searchList;
100
100
  } else {
101
- search = instance?.attrs.options;
101
+ state.search.checkedAll ? search = [] : search = instance?.attrs.options;
102
102
  }
103
103
  list = [...list, ...search];
104
104
  return list;
@@ -132,6 +132,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
132
132
  state.search.checkedReverse = false;
133
133
  state.search.indeterminate = !!value.length && value.length < (instance?.attrs.options).length;
134
134
  state.search.checkedAll = value.length === (instance?.attrs.options).length;
135
+ state.search.searchList = [];
135
136
  emit("update:value", value);
136
137
  emit("onChange", {
137
138
  value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bm-admin-ui",
3
- "version": "1.1.0-alpha",
3
+ "version": "1.1.2-alpha",
4
4
  "private": false,
5
5
  "description": "An Admin Component Library for Bm",
6
6
  "license": "UNLICENSED",
@@ -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
  readonly CloseOutlined: import("@ant-design/icons-vue/lib/icons/CloseOutlined").CloseOutlinedIconType;
54
63
  readonly RightOutlined: import("@ant-design/icons-vue/lib/icons/RightOutlined").RightOutlinedIconType;
55
64
  readonly 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
  }>;