Skip to content

useIcon在使用上的问题,希望大家避免踩坑 #612

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

Open
wangshouren507 opened this issue Mar 19, 2025 · 0 comments
Open

useIcon在使用上的问题,希望大家避免踩坑 #612

wangshouren507 opened this issue Mar 19, 2025 · 0 comments

Comments

@wangshouren507
Copy link

在子组件中,直接把useIcon的值作用在ElButton组件的icon属性上,有可能导致router.push、replace方法失效,原因未知。下面是错误使用截图和报错截图

Image

Image
解决办法:把useIcon返回的值用一个变量保存下来,在赋值给icon属性就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant