Skip to content
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

[bug report] problems in using El radio group through component component #20793

Open
Linindoo opened this issue Feb 23, 2021 · 5 comments
Open

Comments

@Linindoo
Copy link

Element UI version

2.15.0

OS/Browsers version

Google Chrome 版本 88.0.4324.182(正式版本) (64 位)

Vue version

2.6.12

Reproduction Link

https://codepen.io/lindoo/pen/jOVabPN

Steps to reproduce

使用component组件来引用el-radio-group,控制台会提示错误

这个错误是因为element升级后el-radio-group改变导致的,初步排查是el-radio-group中也使用了component 组件,而其is属性的值获取的是 this.$vnode.data.tag的值,也就是'component',这也就导致了这个错误,是否应该添加判断,如果tag='component'而应该取默认的值'div'

What is Expected?

正常运行,控制台无错误日志

What is actually happening?

控制台有报错

@element-bot element-bot changed the title [Bug Report] 通过component组件使用el-radio-group存在的问题 [bug report] problems in using El radio group through component component Feb 23, 2021
@element-bot
Copy link
Member

Translation of this issue:

Element UI version

2.15.0

OS/Browsers version

Google Chrome version 88.0.4324.182 (official version) (64 bit)

Vue version

2.6.12

Reproduction Link

https://codepen.io/lindoo/pen/jOVabPN

Steps to reproduce

If you use the component component to refer to El radio group, the console will prompt an error

This error is caused by the change of El radio group after the upgrade of element. The preliminary investigation shows that the El radio group also uses the component component, and the value of its is attribute gets this$ vnode.data.tag This also leads to this error. Whether to add a judgment or not, if tag ='component ', the default value of' div 'should be taken

What is Expected?

Normal operation, console no error log

What is actually happening?

There is an error on the console

@HuRuilin
Copy link

问题有好的解决方案了吗?

@Linindoo
Copy link
Author

问题有好的解决方案了吗?

没有,暂时解决办法是不用component来渲染el-radio-group组件,改成if else判断来选择要渲染的组件

@HuRuilin
Copy link

问题有好的解决方案了吗?

没有,暂时解决办法是不用component来渲染el-radio-group组件,改成if else判断来选择要渲染的组件

已经有人提了和并请求了,不过官方好像没有合并发版? #20783

@Linindoo
Copy link
Author

问题有好的解决方案了吗?

没有,暂时解决办法是不用component来渲染el-radio-group组件,改成if else判断来选择要渲染的组件

已经有人提了和并请求了,不过官方好像没有合并发版? #20783

这个不清楚了,官方基本上是半死不活的

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

3 participants