w-ui-v1 1.1.25 → 1.1.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.
- package/package.json +1 -1
- package/w-menu/w-menu.vue +13 -8
package/package.json
CHANGED
package/w-menu/w-menu.vue
CHANGED
|
@@ -20,17 +20,16 @@
|
|
|
20
20
|
name: 'WMenu',
|
|
21
21
|
})
|
|
22
22
|
const props = defineProps({
|
|
23
|
-
|
|
24
|
-
type:
|
|
25
|
-
default:
|
|
26
|
-
|
|
27
|
-
}
|
|
23
|
+
icons: {
|
|
24
|
+
type: Array,
|
|
25
|
+
default: []
|
|
28
26
|
}
|
|
29
27
|
})
|
|
30
28
|
const menuList = ref([])
|
|
31
29
|
const title = ref('')
|
|
32
30
|
const filtermenu = computed(() => {
|
|
33
|
-
|
|
31
|
+
let arr=filterHiddenTree(menuList.value, 'items', true)
|
|
32
|
+
return arr
|
|
34
33
|
})
|
|
35
34
|
const sheetShow = ref(false)
|
|
36
35
|
const actions = ref([])
|
|
@@ -134,7 +133,13 @@
|
|
|
134
133
|
if (Array.isArray(node[childKey])) {
|
|
135
134
|
node[childKey] = filterHiddenTree(node[childKey], childKey, deepClone)
|
|
136
135
|
}
|
|
137
|
-
|
|
136
|
+
let icon= props.icons.find((item:any)=>{
|
|
137
|
+
return item.id===node.id
|
|
138
|
+
})
|
|
139
|
+
return {
|
|
140
|
+
...node,
|
|
141
|
+
iconPath:(icon as any)?.path
|
|
142
|
+
}
|
|
138
143
|
})
|
|
139
144
|
}
|
|
140
145
|
|
|
@@ -174,7 +179,7 @@
|
|
|
174
179
|
@itemclick="gotoPage(subItem)" use-text-slot>
|
|
175
180
|
<template #default>
|
|
176
181
|
<view class="grid-item">
|
|
177
|
-
<view v-if="
|
|
182
|
+
<view v-if="subItem.iconPath" class="grid-item-icon"
|
|
178
183
|
style="display: flex;justify-content: center;align-items: center;">
|
|
179
184
|
<image style="height: 30px;width: 30px;" src="/static/home.png" mode="">
|
|
180
185
|
</image>
|