fix(components): [menu] change declartion of ulStyle to setup function (#12319)

Co-authored-by: guoweijian <wudizhanche1000@gmail.com>
This commit is contained in:
WeiJian 2023-04-15 09:48:31 +08:00 committed by GitHub
parent 208160d993
commit 20486bf545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,6 +195,7 @@ export default defineComponent({
active,
})
const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)
const titleStyle = computed<CSSProperties>(() => {
if (mode.value !== 'horizontal') {
return {
@ -353,8 +354,6 @@ export default defineComponent({
),
]
const ulStyle = useMenuCssVar(rootMenu.props, subMenu.level + 1)
// this render function is only used for bypass `Vue`'s compiler caused patching issue.
// temporarily mark ElPopper as any due to type inconsistency.
const child = rootMenu.isMenuPopup