wui-components-v2 1.2.58 → 1.2.60
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.
|
@@ -88,9 +88,18 @@ const {
|
|
|
88
88
|
} = useMenus(props, pagingRef)
|
|
89
89
|
|
|
90
90
|
// 统一菜单项点击:调用方传了 itemClick 且返回 true 表示已处理,否则走内置 gotoPage
|
|
91
|
+
// 注意:必须 return true/false 透传结果,供上层(如快速访问 section-menus)判断是否已处理,避免重复跳转
|
|
91
92
|
function handleItemClick(item: any) {
|
|
92
|
-
if (props.itemClick && props.itemClick(item) === true) return
|
|
93
|
+
if (props.itemClick && props.itemClick(item) === true) return true
|
|
93
94
|
gotoPage(item)
|
|
95
|
+
return true
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// 动作面板子项点击:同样先走调用方的 itemClick,返回 true 表示已处理,否则走内置 sheetGotoPage
|
|
99
|
+
function handleSheetItemClick(item: any) {
|
|
100
|
+
if (props.itemClick && props.itemClick(item) === true) return true
|
|
101
|
+
sheetGotoPage(item)
|
|
102
|
+
return true
|
|
94
103
|
}
|
|
95
104
|
|
|
96
105
|
// 当 tile 为 true 时,将 filtermenu 中所有分类的 items 平铺到一个数组中
|
|
@@ -242,7 +251,7 @@ onMounted(() => {
|
|
|
242
251
|
:title="title"
|
|
243
252
|
@select="
|
|
244
253
|
({ item }) => {
|
|
245
|
-
|
|
254
|
+
handleSheetItemClick(item)
|
|
246
255
|
}
|
|
247
256
|
"
|
|
248
257
|
/>
|