Skip to content

The .my-menu style of <a-menu class="my-menu"> + <style scoped> is invalid #5578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
lin09 opened this issue May 7, 2022 · 2 comments
Closed
1 task

Comments

@lin09
Copy link

lin09 commented May 7, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.3

Environment

win10 / Chrome 96.0.4664.110(正式版本) (64 位) / vue 3.2.33

Reproduction link

Edit on CodeSandbox

Steps to reproduce

1、打开实例

2、查看a-menu elements : <ul class="ant-menu ant-menu-root ant-menu-vertical ant-menu-light my-menu" role="menu" data-menu-list="true"> 可以看到 <style scoped> 生成 data-v-xxxxxxx 没了, 使 .my-menu 样式无效

What is expected?

a-menu 能支持 <style scoped>

What is actually happening?

<a-menu class="my-menu"> + <style scoped> 的.my-menu样式无效

@github-actions github-actions bot changed the title <a-menu class="my-menu"> + <style scoped> 的.my-menu样式无效 The .my-menu style of <a-menu class="my-menu"> + <style scoped> is invalid May 7, 2022
@tangjinzhou
Copy link
Member

menu 根节点不是唯一节点,目前 vue 尚不支持,vuejs/core#2669

另外:或许可以直接从 vnode上取 scopeId (getCurrentInstance().vnode.scopeId), 担心未来会变化,等 Vue 官方明确API在支持

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants