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] el-table type=selection, Unknown custom element el-checkbox | 表格控件 type为selection el-checkbox报未注册错误 #21796

Open
demonskp opened this issue Apr 14, 2022 · 4 comments

Comments

@demonskp
Copy link

demonskp commented Apr 14, 2022

Element UI version

2.15.8 2.15.7

OS/Browsers version

100.0.4896.75

Vue version

2.6.14

Steps to reproduce

1、按需引用el-table组件(不全局注册el-checkbox)
2、将第一列设为type="selection"
3、直接观察到表格中的勾选列 不显示勾选框

What is Expected?

正常显示el-checkbox

What is actually happening?

el-checkbox没被el-table引用

微信截图_20220414114011

@demonskp
Copy link
Author

按需引用 才能复现,但是没看到element-ui怎么用cdn按需引用复现

@403NotFound
Copy link

我也遇到这个问题了,需要手动引入checkbox组件或者降低版本到2.15.6才能解决。

@demonskp
Copy link
Author

我也遇到这个问题了,需要手动引入checkbox组件或者降低版本到2.15.6才能解决。

是的 暂时是这样解决的。通过全局手动引入 或者降低版本 可以解决。

bobohuochai pushed a commit to bobohuochai/element that referenced this issue Apr 25, 2022
@imingdev
Copy link

imingdev commented Apr 27, 2022

尝试使用这种临时方案解决:
const TableRow = Table.components.TableBody.components?.TableRow;
if (TableRow && !TableRow.components?.ElCheckbox) {
TableRow.components = {
...TableRow.components,
ElCheckbox: Checkbox,
};
}
image
兼容低版本和高版本

xinguanhua pushed a commit that referenced this issue Jun 2, 2022
Co-authored-by: 徐军 <xujun@pingpongx.com>
hzsrc pushed a commit to hzsrc/element that referenced this issue Feb 2, 2023
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