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.
Files changed (64) hide show
  1. package/es/components/__tests__/util/domHook.d.ts +6 -0
  2. package/es/components/feedback/index.js +2 -2
  3. package/es/components/float-table/index.js +36 -27
  4. package/es/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
  5. package/es/components/form-create/index.js +215 -107
  6. package/es/components/form-designer/index.js +86 -47
  7. package/es/components/input-tags-display/index.js +30 -13
  8. package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +9 -0
  9. package/es/components/over-tooltips/index.js +27 -20
  10. package/es/components/search-filter/index.js +18 -10
  11. package/es/components/select-all/index.js +17 -9
  12. package/es/components/shops-filter/index.js +19 -13
  13. package/es/components/staffs-selector/index.js +116 -82
  14. package/es/components/timeline/__tests__/index.test.d.ts +1 -0
  15. package/es/components/timeline/index.js +8 -7
  16. package/es/components/upload/__tests__/mock.d.ts +2 -0
  17. package/es/components/upload/__tests__/requests.d.ts +7 -0
  18. package/es/components/upload/__tests__/upload.test.d.ts +1 -0
  19. package/es/components/upload/index.js +115 -78
  20. package/index.esm.js +41000 -4676
  21. package/index.js +40999 -4675
  22. package/lib/components/__tests__/util/domHook.d.ts +6 -0
  23. package/lib/components/feedback/index.js +1 -1
  24. package/lib/components/float-table/index.js +36 -27
  25. package/lib/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
  26. package/lib/components/form-create/index.js +214 -106
  27. package/lib/components/form-designer/index.js +86 -47
  28. package/lib/components/input-tags-display/index.js +30 -13
  29. package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +9 -0
  30. package/lib/components/over-tooltips/index.js +27 -20
  31. package/lib/components/search-filter/index.js +18 -10
  32. package/lib/components/select-all/index.js +17 -9
  33. package/lib/components/shops-filter/index.js +19 -13
  34. package/lib/components/staffs-selector/index.js +116 -82
  35. package/lib/components/timeline/__tests__/index.test.d.ts +1 -0
  36. package/lib/components/timeline/index.js +8 -7
  37. package/lib/components/upload/__tests__/mock.d.ts +2 -0
  38. package/lib/components/upload/__tests__/requests.d.ts +7 -0
  39. package/lib/components/upload/__tests__/upload.test.d.ts +1 -0
  40. package/lib/components/upload/index.js +115 -78
  41. package/package.json +1 -1
  42. package/theme-chalk/button.css +1 -1
  43. package/theme-chalk/feedback.css +1 -1
  44. package/theme-chalk/float-table.css +1 -1
  45. package/theme-chalk/floating-vue.css +1 -1
  46. package/theme-chalk/flow-designer.css +1 -1
  47. package/theme-chalk/form-create.css +1 -1
  48. package/theme-chalk/form-designer.css +1 -1
  49. package/theme-chalk/index.css +1 -1
  50. package/theme-chalk/input-tags-display.css +1 -1
  51. package/theme-chalk/modal.css +1 -1
  52. package/theme-chalk/over-tooltips.css +1 -1
  53. package/theme-chalk/search-filter.css +1 -1
  54. package/theme-chalk/select-all.css +1 -1
  55. package/theme-chalk/staffs-selector.css +1 -1
  56. package/theme-chalk/timeline.css +1 -1
  57. package/theme-chalk/upload.css +1 -1
  58. package/types/components/__tests__/util/domHook.d.ts +6 -0
  59. package/types/components/flow-designer/src/bm-nodes/BmConditionNode.vue.d.ts +4 -4
  60. package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +9 -0
  61. package/types/components/timeline/__tests__/index.test.d.ts +1 -0
  62. package/types/components/upload/__tests__/mock.d.ts +2 -0
  63. package/types/components/upload/__tests__/requests.d.ts +7 -0
  64. package/types/components/upload/__tests__/upload.test.d.ts +1 -0
@@ -834,10 +834,14 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
834
834
  function emitSetValue(val) {
835
835
  emits("setValue", val);
836
836
  }
837
- watch(props.options, (val) => {
838
- handleRepeatOption(val);
839
- emitSetValue(val);
840
- }, { deep: true });
837
+ watch(
838
+ props.options,
839
+ (val) => {
840
+ handleRepeatOption(val);
841
+ emitSetValue(val);
842
+ },
843
+ { deep: true }
844
+ );
841
845
  return (_ctx, _cache) => {
842
846
  const _component_Delete = resolveComponent("Delete");
843
847
  const _component_ARow = resolveComponent("ARow");
@@ -2488,10 +2492,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
2488
2492
  uploadPicRule.hidden = uploadPictureRule.hidden;
2489
2493
  rules.value = [...rules.value];
2490
2494
  }
2491
- watch(() => props.formCreateInject.rule.config.uploadPictureRule, handleUploadPicRule, {
2492
- deep: true,
2493
- immediate: true
2494
- });
2495
+ watch(
2496
+ () => props.formCreateInject.rule.config.uploadPictureRule,
2497
+ handleUploadPicRule,
2498
+ {
2499
+ deep: true,
2500
+ immediate: true
2501
+ }
2502
+ );
2495
2503
  return (_ctx, _cache) => {
2496
2504
  const _component_FormCreate = resolveComponent("FormCreate");
2497
2505
  return openBlock(), createBlock(unref(Tabs), {
@@ -2779,7 +2787,10 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
2779
2787
  }
2780
2788
  ];
2781
2789
  function emitChangeEvt() {
2782
- emits("change", options.filter((op) => checkList.value.includes(op.value)));
2790
+ emits(
2791
+ "change",
2792
+ options.filter((op) => checkList.value.includes(op.value))
2793
+ );
2783
2794
  }
2784
2795
  function handOk() {
2785
2796
  visible.value = false;
@@ -2912,17 +2923,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
2912
2923
  const props = __props;
2913
2924
  const checkedValue = ref(!!props.defaultSelectValue);
2914
2925
  const selectValue = ref(props.defaultSelectValue);
2915
- const shopRules = computed(() => props.widgetFormRules.reduce((pre, cur) => {
2916
- const name = cur.config.config.name;
2917
- if (name === "row" || name === "table") {
2918
- cur.config.childRules.forEach((rule) => {
2919
- getShop(rule, pre);
2920
- });
2921
- } else {
2922
- getShop(cur, pre);
2923
- }
2924
- return pre;
2925
- }, []));
2926
+ const shopRules = computed(
2927
+ () => props.widgetFormRules.reduce((pre, cur) => {
2928
+ const name = cur.config.config.name;
2929
+ if (name === "row" || name === "table") {
2930
+ cur.config.childRules.forEach((rule) => {
2931
+ getShop(rule, pre);
2932
+ });
2933
+ } else {
2934
+ getShop(cur, pre);
2935
+ }
2936
+ return pre;
2937
+ }, [])
2938
+ );
2926
2939
  const shops = computed(() => {
2927
2940
  return shopRules.value.map((shopRule) => ({
2928
2941
  value: shopRule.field,
@@ -3467,11 +3480,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
3467
3480
  props: ["childRules"],
3468
3481
  setup(__props) {
3469
3482
  const props = __props;
3470
- const text = computed(() => props.childRules.filter((rule) => rule.type === "inputNumber" && rule.config.count).reduce((pre, item, index) => {
3471
- if (index > 0)
3472
- pre += "\u3001";
3473
- return pre + `${item.title.title}: 0`;
3474
- }, ""));
3483
+ const text = computed(
3484
+ () => props.childRules.filter((rule) => rule.type === "inputNumber" && rule.config.count).reduce((pre, item, index) => {
3485
+ if (index > 0)
3486
+ pre += "\u3001";
3487
+ return pre + `${item.title.title}: 0`;
3488
+ }, "")
3489
+ );
3475
3490
  return (_ctx, _cache) => {
3476
3491
  return openBlock(), createElementBlock("div", null, [
3477
3492
  renderSlot(_ctx.$slots, "default"),
@@ -3601,11 +3616,15 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3601
3616
  function getPopupContainer() {
3602
3617
  return document.body;
3603
3618
  }
3604
- watch(childRules, (val) => {
3605
- emits("change", val);
3606
- }, {
3607
- deep: true
3608
- });
3619
+ watch(
3620
+ childRules,
3621
+ (val) => {
3622
+ emits("change", val);
3623
+ },
3624
+ {
3625
+ deep: true
3626
+ }
3627
+ );
3609
3628
  return (_ctx, _cache) => {
3610
3629
  const _component_Delete = resolveComponent("Delete");
3611
3630
  const _component_ARow = resolveComponent("ARow");
@@ -3771,9 +3790,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3771
3790
  const cacheProps = reactive({});
3772
3791
  const fApi = ref();
3773
3792
  const activeParentRule = ref();
3774
- const menuList = computed(() => tabData.find((tab) => tab.key === activeKey.value).menuList);
3793
+ const menuList = computed(
3794
+ () => tabData.find((tab) => tab.key === activeKey.value).menuList
3795
+ );
3775
3796
  const activeProps = computed(() => cacheProps[activeRule.value.field]);
3776
- const activeRuleInList = computed(() => activeParentRule.value?.config?.childRules || widgetFormRules);
3797
+ const activeRuleInList = computed(
3798
+ () => activeParentRule.value?.config?.childRules || widgetFormRules
3799
+ );
3777
3800
  function hideShowDragTip() {
3778
3801
  showDragTip.value = false;
3779
3802
  }
@@ -3828,7 +3851,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3828
3851
  if (!widgetNamesRowAccept.includes(config.name) && activeParentRuleName === "row" || !Object.keys(widgetsTableAccept).includes(config.name) && activeParentRuleName === "table") {
3829
3852
  disabledTip(activeParentRule.value.config.config.name);
3830
3853
  } else {
3831
- const index = activeRuleInList.value.findIndex((item) => item.field === activeRule.value.field);
3854
+ const index = activeRuleInList.value.findIndex(
3855
+ (item) => item.field === activeRule.value.field
3856
+ );
3832
3857
  activeRuleInList.value.splice(index + 1, 0, rule);
3833
3858
  setActiveRule(rule, activeParentRule.value);
3834
3859
  hideShowDragTip();
@@ -3907,7 +3932,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3907
3932
  } else {
3908
3933
  activeRule.value = {};
3909
3934
  }
3910
- } else if (targetRule?.config?.childRules?.some((rule) => rule.field === activeRule.value.field)) {
3935
+ } else if (targetRule?.config?.childRules?.some(
3936
+ (rule) => rule.field === activeRule.value.field
3937
+ )) {
3911
3938
  const newIndex = Math.min(parentList.length - 1, index);
3912
3939
  if (newIndex >= 0) {
3913
3940
  setActiveRule(parentList[newIndex]);
@@ -4055,7 +4082,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4055
4082
  return pass;
4056
4083
  }
4057
4084
  function flowConditionEffect(activeProps2, flowCondition) {
4058
- const requiredRule = activeProps2?.find((rule) => rule.field === "effect.required");
4085
+ const requiredRule = activeProps2?.find(
4086
+ (rule) => rule.field === "effect.required"
4087
+ );
4059
4088
  if (requiredRule) {
4060
4089
  if (!requiredRule.props) {
4061
4090
  requiredRule.props = {};
@@ -4063,20 +4092,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4063
4092
  requiredRule.props.disabled = !!flowCondition[activeRule.value.field];
4064
4093
  }
4065
4094
  }
4066
- watch(() => props.presetRules, (presetRules) => {
4067
- widgetFormRules.push(...presetRules);
4068
- });
4069
- watch(() => props.formRules, (formRules) => {
4070
- edit(formRules);
4071
- });
4095
+ watch(
4096
+ () => props.presetRules,
4097
+ (presetRules) => {
4098
+ widgetFormRules.push(...presetRules);
4099
+ }
4100
+ );
4101
+ watch(
4102
+ () => props.formRules,
4103
+ (formRules) => {
4104
+ formRules && edit(formRules);
4105
+ }
4106
+ );
4072
4107
  watch(activeProps, (activeProps2) => {
4073
4108
  flowConditionEffect(activeProps2, props.flowCondition);
4074
4109
  });
4075
- watch(() => props.flowCondition, (flowCondition) => {
4076
- flowConditionEffect(activeProps.value, flowCondition);
4077
- }, {
4078
- deep: true
4079
- });
4110
+ watch(
4111
+ () => props.flowCondition,
4112
+ (flowCondition) => {
4113
+ flowConditionEffect(activeProps.value, flowCondition);
4114
+ },
4115
+ {
4116
+ deep: true
4117
+ }
4118
+ );
4080
4119
  onBeforeUnmount(() => {
4081
4120
  resetIndex();
4082
4121
  });
@@ -4190,7 +4229,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4190
4229
  ]),
4191
4230
  _: 1
4192
4231
  }, 8, ["list"]),
4193
- showDragTip.value && !_ctx.formRules.length ? (openBlock(), createBlock(NoDataTip, {
4232
+ showDragTip.value && !_ctx.formRules?.length ? (openBlock(), createBlock(NoDataTip, {
4194
4233
  key: 0,
4195
4234
  class: "bm-no-data-tip"
4196
4235
  })) : createCommentVNode("v-if", true)
@@ -16,6 +16,10 @@ var _export_sfc = (sfc, props) => {
16
16
  const _sfc_main = defineComponent({
17
17
  components: { ToolTip, CloseCircleFilled, Button, Tag },
18
18
  props: {
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false
22
+ },
19
23
  list: {
20
24
  type: Array,
21
25
  default: () => []
@@ -26,7 +30,7 @@ const _sfc_main = defineComponent({
26
30
  },
27
31
  placeholder: {
28
32
  type: String,
29
- default: "top"
33
+ default: "\u8BF7\u9009\u62E9"
30
34
  },
31
35
  showEmptyBtn: {
32
36
  type: Boolean,
@@ -66,13 +70,21 @@ const _sfc_main = defineComponent({
66
70
  return document.querySelector(`#${containId}`);
67
71
  }
68
72
  function clear() {
73
+ if (props.disabled) {
74
+ return;
75
+ }
69
76
  emit("update:list", []);
70
77
  emit("clear");
71
78
  if (!props.showEmptyBtn && !props.showEmpty) {
72
- console.error("\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1");
79
+ console.error(
80
+ "\u4E0D\u5E94\u5C06showEmptyBtn\u4E0EshowEmpty\u90FD\u7F6E\u4E3Afalse,\u8282\u70B9\u5E76\u672A\u5B9E\u9645\u9500\u6BC1"
81
+ );
73
82
  }
74
83
  }
75
84
  function toAddTags() {
85
+ if (props.disabled) {
86
+ return;
87
+ }
76
88
  if (!props.list.length || props.alwaysInvoke)
77
89
  emit("addClick");
78
90
  }
@@ -91,15 +103,19 @@ const _sfc_main = defineComponent({
91
103
  placement: props.placement,
92
104
  trigger: "hover"
93
105
  });
94
- watch(() => props.toolTipProps, (tooltipprop) => {
95
- tooltipConfig.value = {
96
- ...tooltipConfig.value,
97
- ...tooltipprop
98
- };
99
- }, {
100
- immediate: true,
101
- deep: true
102
- });
106
+ watch(
107
+ () => props.toolTipProps,
108
+ (tooltipprop) => {
109
+ tooltipConfig.value = {
110
+ ...tooltipConfig.value,
111
+ ...tooltipprop
112
+ };
113
+ },
114
+ {
115
+ immediate: true,
116
+ deep: true
117
+ }
118
+ );
103
119
  return {
104
120
  containId,
105
121
  clear,
@@ -166,7 +182,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
166
182
  _: 2
167
183
  }, 1024);
168
184
  }), 128)),
169
- createElementVNode("div", {
185
+ !_ctx.disabled ? (openBlock(), createElementBlock("div", {
186
+ key: 0,
170
187
  class: "list-clear",
171
188
  onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.clear && _ctx.clear(...args), ["stop"])),
172
189
  onMouseenter: _cache[2] || (_cache[2] = withModifiers(() => {
@@ -175,7 +192,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
175
192
  }, ["stop"]))
176
193
  }, [
177
194
  createVNode(_component_CloseCircleFilled)
178
- ], 32)
195
+ ], 32)) : createCommentVNode("v-if", true)
179
196
  ])
180
197
  ]),
181
198
  _: 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[];
@@ -39,16 +39,19 @@ const _sfc_main = {
39
39
  isShow: false,
40
40
  openShow: false
41
41
  });
42
- const observer = new IntersectionObserver((entries) => {
43
- entries.forEach((item) => {
44
- if (item.intersectionRatio > 0.3) {
45
- observerDom();
46
- observer.disconnect();
47
- }
48
- });
49
- }, {
50
- threshold: 0.3
51
- });
42
+ const observer = new IntersectionObserver(
43
+ (entries) => {
44
+ entries.forEach((item) => {
45
+ if (item.intersectionRatio > 0.3) {
46
+ observerDom();
47
+ observer.disconnect();
48
+ }
49
+ });
50
+ },
51
+ {
52
+ threshold: 0.3
53
+ }
54
+ );
52
55
  function observerDom() {
53
56
  if (props.line === 1) {
54
57
  if (mySelf.value.scrollWidth > mySelf.value.clientWidth) {
@@ -64,16 +67,20 @@ const _sfc_main = {
64
67
  observer.disconnect();
65
68
  });
66
69
  let mySelf = ref();
67
- watch(() => props.showAlways, function(showAlways) {
68
- if (showAlways)
69
- state.openShow = showAlways;
70
- mySelf.value && observer.unobserve(mySelf.value);
71
- nextTick(function() {
72
- mySelf.value && observer.observe(mySelf.value);
73
- });
74
- }, {
75
- immediate: true
76
- });
70
+ watch(
71
+ () => props.showAlways,
72
+ function(showAlways) {
73
+ if (showAlways)
74
+ state.openShow = showAlways;
75
+ mySelf.value && observer.unobserve(mySelf.value);
76
+ nextTick(function() {
77
+ mySelf.value && observer.observe(mySelf.value);
78
+ });
79
+ },
80
+ {
81
+ immediate: true
82
+ }
83
+ );
77
84
  const handleVisibleChange = (val) => {
78
85
  state.isShow = !state.openShow ? false : val;
79
86
  };
@@ -222,11 +222,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
222
222
  onBeforeUnmount(() => {
223
223
  window.removeEventListener("resize", handleResize);
224
224
  });
225
- watch(() => props.showExpandBtn, (val) => {
226
- handleShowExpandBtn(val);
227
- }, {
228
- immediate: true
229
- });
225
+ watch(
226
+ () => props.showExpandBtn,
227
+ (val) => {
228
+ handleShowExpandBtn(val);
229
+ },
230
+ {
231
+ immediate: true
232
+ }
233
+ );
230
234
  const expandRule = computed(() => {
231
235
  const fixedCount = props.fixedCount && props.fixedCount >= 0 ? props.fixedCount : 0;
232
236
  const fixedFields = props.fixedFields?.length ? props.fixedFields : [];
@@ -245,11 +249,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
245
249
  });
246
250
  }
247
251
  }
248
- watch(isExpand, (val) => {
249
- nextTick(() => handleChangeExpand(val));
250
- }, {
251
- immediate: true
252
- });
252
+ watch(
253
+ isExpand,
254
+ (val) => {
255
+ nextTick(() => handleChangeExpand(val));
256
+ },
257
+ {
258
+ immediate: true
259
+ }
260
+ );
253
261
  expose({
254
262
  fApi
255
263
  });
@@ -41,11 +41,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  }
42
42
  });
43
43
  let selectValue = ref([]);
44
- watch(() => props.value, (val) => {
45
- selectValue.value = val;
46
- }, {
47
- immediate: true
48
- });
44
+ watch(
45
+ () => props.value,
46
+ (val) => {
47
+ selectValue.value = val;
48
+ },
49
+ {
50
+ immediate: true
51
+ }
52
+ );
49
53
  const selectAll = (e) => {
50
54
  let key = "value";
51
55
  if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
@@ -54,9 +58,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
58
  state.search.indeterminate = false;
55
59
  state.search.checkedReverse = false;
56
60
  if (state.search.checkedAll) {
57
- selectValue.value = (instance?.attrs.options).map((v) => {
58
- return v[key];
59
- });
61
+ selectValue.value = (instance?.attrs.options).map(
62
+ (v) => {
63
+ return v[key];
64
+ }
65
+ );
60
66
  } else {
61
67
  selectValue.value = [];
62
68
  }
@@ -80,7 +86,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
80
86
  state.search.indeterminate = !!selectValue.value.length && selectValue.value.length < (instance?.attrs.options).length;
81
87
  state.search.checkedAll = selectValue.value.length === (instance?.attrs.options).length;
82
88
  }
83
- selectValue.value = (instance?.attrs.options).filter((v) => !selectValue.value.some((ele) => ele === v[key])).map((x) => x[key]);
89
+ selectValue.value = (instance?.attrs.options).filter(
90
+ (v) => !selectValue.value.some((ele) => ele === v[key])
91
+ ).map((x) => x[key]);
84
92
  emit("update:value", selectValue.value);
85
93
  emit("onSelectAll", {
86
94
  type: "reverse",
@@ -175,22 +175,28 @@ const _sfc_main = defineComponent({
175
175
  };
176
176
  props.loadFilter().then((data) => {
177
177
  state.filterArr = data;
178
- state.filterSelects = state.filterArr.map((item) => {
179
- return item.multiple ? [] : "";
180
- });
178
+ state.filterSelects = state.filterArr.map(
179
+ (item) => {
180
+ return item.multiple ? [] : "";
181
+ }
182
+ );
181
183
  }).finally(() => {
182
184
  methods.fetchData();
183
185
  });
184
- watch(() => state.shopCheck, () => {
185
- let list = [];
186
- for (let [key, value] of Object.entries(state.shopCheck)) {
187
- value && list.push(key);
188
- }
189
- state.selected = list;
190
- emit("update:selected", list);
191
- emit("change", list);
192
- methods.checkboxChange();
193
- }, { deep: true });
186
+ watch(
187
+ () => state.shopCheck,
188
+ () => {
189
+ let list = [];
190
+ for (let [key, value] of Object.entries(state.shopCheck)) {
191
+ value && list.push(key);
192
+ }
193
+ state.selected = list;
194
+ emit("update:selected", list);
195
+ emit("change", list);
196
+ methods.checkboxChange();
197
+ },
198
+ { deep: true }
199
+ );
194
200
  if (props.showAlways) {
195
201
  state.isActive = true;
196
202
  }