Bug Type: Component
Environment
- Vue Version:
3.2.31
- Element Plus Version:
2.3.1
- Browser / OS:
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
- Build Tool:
Vite
Reproduction
Related Component
el-table
Reproduction Link
Element Plus Playground
Steps to reproduce
Open the web console and find the slot DOM elements inserted in App.vue that are nested under the .hidden-columns DOM.
What is Expected?
.hidden-columns don`t has the slot DOM
What is actually happening?
Open the web console and find the slot DOM elements inserted in App.vue that are nested under the .hidden-columns DOM.
Additional comments
The reason for this issue may be due to the unnecessary DOM elements that I inserted in the custom columns component, which are being rendered in the .hidden-columns class. However, I don't want this extra component to be rendered on the page. What should I do?
element-plus/packages/components/table/src/table.vue
Line 31 in 167582d
| | |
1条答案
按热度按时间s4n0splo1#
组件设计本如此,通过写
template
来收集列数据,不然就要像antD
那样传一个数组进去了。详细了解可以看: table的基础源码解析