js数组对象转化为数组包含多个数组结构,应用场景DavaV的表单滚动

        // 表单
        listData (val) {
            // console.log(val)
            this.config.data = []
            val.forEach(item => {
                // ['<span style="color:rgba(255,255,255,0.80);">item.title</span>', '<span style="color:rgba(218,255,254,0.65);">行2列2</span>']
                this.config.data.push([item.title, item.sent_time])
            })
            this.config.data = this.config.data.map((item) => {
                item.push("<i style='color:#ff1d57' class='el-icon-warning-outline'></i>")
                return item
            })
            this.configList = this.config
        },

结构:[ {},{} ]=>[ [],[] ]

原文地址:https://www.cnblogs.com/huoshengmiao/p/14884334.html