element-plus [Bug Report] [Component] [table] table-layout not work when max-height is set

raogr8fs  于 2023-03-19  发布在  其他
关注(0)|答案(2)|浏览(257)

Bug Type: Component

Environment

  • Vue Version: 3.2.25
  • Element Plus Version: 2.1.2
  • Browser / OS: Chrome 99.0.4844.51
  • Build Tool: Vite

Reproduction

  • el-table

Element Plus Playground

Steps to reproduce

What is Expected?

table layout auto

What is actually happening?

table layout fixed

Additional comments

(empty)

jyztefdp

jyztefdp1#

I found code:

// table/style-helper.ts
  const tableLayout = computed(() => {
    if (props.maxHeight) return 'fixed'
    return props.tableLayout
  })

but why?

3z6pesqy

3z6pesqy2#

遇到了类似的问题:
1、表格的 table-layout 属性,设置为:auto;
2、表格的 height 属性,设置为100;
3、应该实现固定表头,但是没有生效;
"element-plus": "^2.2.12",

相关问题