element-plus [bug report] Why is the table formatter called multiple times

a64a0gku  于 2022-10-22  发布在  其他
关注(0)|答案(3)|浏览(201)

Element Plus version

1.2.0-beta.5

OS/Browsers version

win10

Vue version

3.2.23

https://codepen.io/aliang888/pen/oNemxjJ

Steps to reproduce

打开控制台就能看到多次调用结果了

What is Expected?

cityID=2
cityID=1
cityID=22

What is actually happening?

cityID=2
cityID=1
cityID=22
cityID=2
cityID=1
cityID=22

laawzig2

laawzig21#

Translation of this issue:

Element Plus version

1.2.0-beta.5

OS/Browsers version

win10

Vue version

3.2.23

https://codepen.io/aliang888/pen/oNemxjJ

Steps to reproduce

Open the console and you can see the results of multiple calls

What is Expected?

cityID=2

cityID=1
cityID=22

What is actually happening?

cityID=2

cityID=1
cityID=22

cityID=2
cityID=1

cityID=22

68de4m5k

68de4m5k3#

h(
    ElTableColumn,
    {
      label: header.name,
      prop: header.prop,
      width: header.width,
      showOverflowTooltip: true,
      align: header.align ? header.align : 'center'
    },
    {
      default: (props) => header.render(props.row)
    }
  )

试试这个, header.render(props.row) 调用6次
"element-plus": "^1.1.0-beta.24"
"vue": "^3.2.20"
"vite": "^2.5.1"
"typescript": "~4.1.5"

相关问题