wui-components-v2 1.2.59 → 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,15 +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
|
|
94
96
|
}
|
|
95
97
|
|
|
96
98
|
// 动作面板子项点击:同样先走调用方的 itemClick,返回 true 表示已处理,否则走内置 sheetGotoPage
|
|
97
99
|
function handleSheetItemClick(item: any) {
|
|
98
|
-
if (props.itemClick && props.itemClick(item) === true) return
|
|
100
|
+
if (props.itemClick && props.itemClick(item) === true) return true
|
|
99
101
|
sheetGotoPage(item)
|
|
102
|
+
return true
|
|
100
103
|
}
|
|
101
104
|
|
|
102
105
|
// 当 tile 为 true 时,将 filtermenu 中所有分类的 items 平铺到一个数组中
|