There was an error while loading. Please reload this page.
1 parent a204c41 commit 529824eCopy full SHA for 529824e
1 file changed
src/components/ui/SDropdownMenu.vue
@@ -45,12 +45,14 @@ const emit = defineEmits<{
45
46
/** 显示的项 */
47
const visibleItems = computed(() =>
48
- props.items.map((item) => {
49
- if (item.children) {
50
- return { ...item, children: item.children.filter((child) => child.show !== false) };
51
- }
52
- return item;
53
- }),
+ props.items
+ .filter((item) => item.show !== false)
+ .map((item) => {
+ if (item.children) {
+ return { ...item, children: item.children.filter((child) => child.show !== false) };
+ }
54
+ return item;
55
+ }),
56
);
57
58
const handleSelect = (item: DropdownMenuItem): void => {
0 commit comments