element-plus [Component] [table] Content inserted into slot of the Table component is added to the .hidden-columns DOM

llew8vvj  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(46)

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

  • el-table

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

| | |

s4n0splo

s4n0splo1#

组件设计本如此,通过写 template 来收集列数据,不然就要像 antD 那样传一个数组进去了。详细了解可以看: table的基础源码解析

相关问题