Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag-table报错Cannot read property 'reduce' of null #3022

Open
BiaoGe2399 opened this issue Mar 2, 2020 · 3 comments
Open

Drag-table报错Cannot read property 'reduce' of null #3022

BiaoGe2399 opened this issue Mar 2, 2020 · 3 comments

Comments

@BiaoGe2399
Copy link

Bug report(问题描述)

Drag-table报错Cannot read property 'reduce' of null,但不影响正常使用,看起来不舒服。。。

Steps to reproduce(问题复现步骤)

点击Drag-table就会报错

Screenshot or Gif(截图或动态图)

image

Link to minimal reproduction(最小可在线还原demo)

https://panjiachen.github.io/vue-element-admin/#/table/drag-table

Other relevant information(格外信息)

  • Your OS:Windows10
  • Node.js version:v12.11.1
  • vue-element-admin version:4.2.1
@Virgil-N
Copy link

我也遇到这个问题

@startdusk
Copy link

我也遇到过同样的问题,你可以试一下:
把el-table的row-key给拿掉,如果可以运行不报错,那么就可确定为el-table的data初始化的时候为null,只要把data的初始值改为 [] 就没有问题
`
<el-table ref="dragTable" :data="list" row-key="id"......

// data部分
data() {
return {
list: []
}
}
`

@startdusk
Copy link

Bug report(问题描述)

Drag-table报错Cannot read property 'reduce' of null,但不影响正常使用,看起来不舒服。。。

Steps to reproduce(问题复现步骤)

点击Drag-table就会报错

Screenshot or Gif(截图或动态图)

image

Link to minimal reproduction(最小可在线还原demo)

https://panjiachen.github.io/vue-element-admin/#/table/drag-table

Other relevant information(格外信息)

  • Your OS:Windows10
  • Node.js version:v12.11.1
  • vue-element-admin version:4.2.1

我也遇到过同样的问题,你可以试一下:
把el-table的row-key给拿掉,如果可以运行不报错,那么就可确定为el-table的data初始化的时候为null,只要把data的初始值改为 [] 就没有问题
`
<el-table ref="dragTable" :data="list" row-key="id"......

// data部分
data() {
return {
list: []
}
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants