undefinedfix
Sign in

Typeerror of element: cannot read property 'reduce' of null error

SheepReaper edited in Fri, 21 Oct 2022

I use element 2.12.0, the latest version, but when I use: row key = "getrowkeys": expand row keys = "expands", I will prompt typeerror: cannot read property 'reduce' of null, and the page will not be displayed. Has anyone encountered this problem?

2 Replies
Pwn3dy4
commented on Fri, 21 Oct 2022

I also encountered this problem today, but my solution is not to write the data initialized in data as null. For example, an error will be reported below

data() {
    return {
      tableData: null
    }
},

But if you change it to the following, you won't make a mistake...

data() {
    return {
      tableData: []
    }
},
Braden
commented on Fri, 21 Oct 2022

https://blog.csdn.net/weixin_...