ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.11k stars 14.64k forks source link

[bug report] the larger the padding left is when the El table tree data is loaded dynamically #19978

Closed zhangyuepeng86 closed 2 years ago

zhangyuepeng86 commented 4 years ago

Element UI version

2.4.6

OS/Browsers version

macOS15/Chrome 83.0.4103.116(正式版本)

Vue version

2.6.10

Reproduction Link

https://codepen.io/pen

Steps to reproduce

load (tree, treeNode, resolve) { resolve(tree.children) }, add (row) { let insertValue = { id: this.uuid(), edit: false, date: '', name: '', address: '' } row.hasChildren = true if (row.children) { row.children.push(insertValue) } else { row.children = [insertValue] }

  this.$set(this.$refs.myTable.store.states.lazyTreeNodeMap, row.id, row.children)
  // this.tableData = JSON.parse(JSON.stringify(this.tableData))
}

What is Expected?

indent = 16

What is actually happening?

el-table__indent = 176

截屏2020-07-31 上午11 59 23
element-bot commented 4 years ago

Translation of this issue:

Element UI version

2.4.6

OS/Browsers version

Mac OS 15 / Chrome 83.0.4103.116 (official version)

Vue version

2.6.10

Reproduction Link

https://codepen.io/pen

Steps to reproduce

load (tree, treeNode, resolve) {

resolve( tree.children ) }

add (row) { let insertValue = {

id: this.uuid () edit: false,

date: '', name: '',

address: '' }

row.hasChildren = true if ( row.children {

row.children.push (insertValue) } else {

row.children = [insertValue] }

this.$set(this.$ refs.myTable.store . states.lazyTreeNodeMap , row.id , row.children ) / / this.tableData = JSON.parse ( JSON.stringify ( this.tableData )

}

What is Expected?

indent = 16

What is actually happening?

el-table__ indent = 176 < img width = "1164" ALT = screenshot 2020-07-31 am 11 59 23 "SRC=“ https://user-images.githubusercontent.com/3301772/89001273-536e9800-d32c-11ea-88fe-d2da79653cce.png >

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.