stellar-ui-plus 1.24.25 → 1.24.26

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.
@@ -26,6 +26,7 @@ export default dropDownMenuProps;
26
26
  export const dropDownMenuEmits = {
27
27
  close: () => true,
28
28
  open: () => true,
29
+ maskClick: () => true,
29
30
  change: (value: Array<any>) => Array.isArray(value),
30
31
  'item-choose': (item: any) => item,
31
32
  'update:modelValue': (value: Array<any>) => Array.isArray(value),
@@ -235,6 +235,7 @@ function choose(item: DropdownItem) {
235
235
  function handleMaskClick() {
236
236
  if (props.isMaskClick) {
237
237
  close();
238
+ emits('maskClick');
238
239
  }
239
240
  }
240
241
  function handleMenuConentClick() {}
@@ -15,3 +15,4 @@
15
15
  | `confirm` | 点击确认按钮时触发 | `values`:当前所有选中的值 | - |
16
16
  | `reset` | 点击重置按钮时触发 | - | - |
17
17
  | `itemClick` | 点击任意筛选项时触发(实时) | `item`:当前操作的筛选项数据 | - |
18
+ | `maskClose` | 点击蒙层关闭了弹窗后触发 | - | - |
@@ -35,6 +35,7 @@ export const filterToolEmits = {
35
35
  // 值变化(实时)
36
36
  'update:value': (values: FilterValue[]) => Array.isArray(values),
37
37
  itemClick: (item: FilterValue) => item instanceof Object,
38
+ maskClose: () => true,
38
39
  };
39
40
 
40
41
  export type FilterToolProps = ExtractPropTypes<typeof props>;
@@ -67,6 +67,12 @@
67
67
  "description": "当前操作的筛选项数据"
68
68
  }
69
69
  ]
70
+ },
71
+ {
72
+ "name": "[event]maskClose",
73
+ "description": "点击蒙层关闭了弹窗后触发",
74
+ "type": "() => void",
75
+ "params": []
70
76
  }
71
77
  ]
72
78
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <view class="ste-filter-tool--root" :style="[rootStyleVar, { '--category-count': categoryData.length }]">
3
- <ste-dropdown-menu ref="steDropMenu" class="filter-box-menu" :activeColor="activeColor" dropDownIconColor="#000" v-model:showPopup="showMenu">
3
+ <ste-dropdown-menu ref="steDropMenu" class="filter-box-menu" :activeColor="activeColor" dropDownIconColor="#000" v-model:showPopup="showMenu" @maskClick="handleMaskClick">
4
4
  <template #title>
5
5
  <slot>
6
6
  <view></view>
@@ -146,7 +146,7 @@ const rootStyleVar = computed(() => ({
146
146
  }));
147
147
 
148
148
  // 使用简化的筛选逻辑组合式函数
149
- const { handleFilterClick, handleCheckboxChange, handleReset, handleConfirm } = useData(props, emits, filtersData);
149
+ const { handleFilterClick, handleCheckboxChange, handleReset, handleConfirm, handleMaskClose } = useData(props, emits, filtersData);
150
150
 
151
151
  // 工具类实例
152
152
  const calculator = new ScrollCalculator(instance, filtersData);
@@ -217,6 +217,10 @@ const toggleExpand = (item: FilterItem) => {
217
217
  item.expand = !item.expand;
218
218
  };
219
219
 
220
+ function handleMaskClick() {
221
+ handleMaskClose();
222
+ }
223
+
220
224
  // 监听器
221
225
  watch(
222
226
  () => props.data,
@@ -138,6 +138,13 @@ export default function useSimpleFilterLogic(props: FilterToolProps, emits: Setu
138
138
  emits('confirm', currentValues);
139
139
  };
140
140
 
141
+ /**
142
+ * 点击蒙层关闭了弹窗后触发
143
+ */
144
+ const handleMaskClose = () => {
145
+ emits('maskClose');
146
+ };
147
+
141
148
  // 监听props.value变化,同步到组件内部状态
142
149
  watch(
143
150
  () => props.value,
@@ -156,6 +163,7 @@ export default function useSimpleFilterLogic(props: FilterToolProps, emits: Setu
156
163
  handleCheckboxChange,
157
164
  handleReset,
158
165
  handleConfirm,
166
+ handleMaskClose,
159
167
  collectCurrentValues,
160
168
  setValuesFromProps,
161
169
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stellar-ui-plus",
3
- "version": "1.24.25",
3
+ "version": "1.24.26",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",