刘先森吖丶 2021-12-02 16:46 采纳率: 50%
浏览 62
已结题

Elementui表格的一列为数组,如何通过合并单元格分成两行显示该列


data(){
return{
  tableData:[
        {
            "betknz": "灰腾梁柳兰",
            "anlbez": "华锐SL70 28#",
            "anlknz": "131AF01028",
            "anlnum": null,
            "devCapacity": 300,
            "mmlsta": [
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1
            ],
            "stoppageTime": [
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1,
                -1
            ],
            "mldtxtmas": [
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                ""
            ],
            "ofname": [
                "WarFir006",
                "WarFir003",
                "WarFir007",
                "ErrFir006",
                "ErrFir003",
                "ErrFir002",
                "ErrFir004",
                "ErrFir001",
                "WarFir008",
                "WarFir008",
                "ErrFir001",
                "ErrFir004",
                "ErrFir002",
                "ErrFir003",
                "ErrFir006"
            ],
            "ofdes": [
                "塔基 UPS 断路器",
                "SS-10 超出工作位置",
                "电池放电接触器故障",
                "电网 1s 滤波功率大于设定值(1680KW)",
                "1min 总滤波电流大于设定值",
                "变桨 3 位置超差",
                "快速停机时,停机时间超过 30s 时,转速仍然超过 1000rpm",
                "塔基 PLC 通讯错误",
                "电池断电接触器分断超时",
                "电池断电接触器分断超时",
                "塔基 PLC 通讯错误",
                "快速停机时,停机时间超过 30s 时,转速仍然超过 1000rpm",
                "变桨 3 位置超差",
                "1min 总滤波电流大于设定值",
                "电网 1s 滤波功率大于设定值(1680KW)"
            ],
            "gzms": [
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                ""
            ],
            "mmldtm": [
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00"
            ],
            "yjhfsj": [
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00",
                "0001-01-01 00:00:00"
            ],
            "ofdtm": [
                "2021-11-07 07:08:21",
                "2020-11-10 11:45:16",
                "2020-11-10 11:45:16",
                "2020-11-05 16:57:01",
                "2020-11-05 16:57:01",
                "2020-11-05 16:57:01",
                "2020-11-05 16:57:01",
                "2020-11-05 16:57:01",
                "2020-11-05 16:57:01",
                "2020-11-05 16:56:57",
                "2020-11-05 16:56:57",
                "2020-11-05 16:56:57",
                "2020-11-05 16:56:57",
                "2020-11-05 16:56:57",
                "2020-11-05 16:56:57"
            ],
            "ofhfsj": [
                "2022-12-08 07:15:41",
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            ],
            "ofTime": [
                1670454486489,
                9268,
                9268,
                9382,
                9382,
                9382,
                9382,
                9382,
                9382,
                9382,
                9382,
                9382,
                9382,
                9382,
                9382
            ],
            "lastTourTime": null,
            "sbfzr": null,
            "xphbm": [
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                ""
            ],
            "aufid": null,
            "selfnumber": [
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                ""
            ],
            "mitknzmld": null,
            "mldtxtnot": null,
            "mitknzvwt": [
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                ""
            ],
            "sycl": null,
            "sjlx": null,
            "betzustanl": null,
            "gzlx": null,
            "mmlenddtm": null,
            "stationCode": "F1001",
            "devId": "FJ028",
            "mmlstadesc": null,
            "frsselfnumber": [
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                ""
            ],
            "businessType": null,
            "dataDate": null,
            "ttime": null,
            "yzhyy": [
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                "",
                ""
            ],
            "aqxdm": [
                "163",
                "11",
                "154",
                "93",
                "86",
                "33",
                "257",
                "274",
                "18",
                "18",
                "274",
                "257",
                "33",
                "86",
                "93"
            ]
        }
    ]
}
}

数据格式差不多这样的

渲染后:

img

现在需要将红色框里面分多行行显示

  • 写回答

1条回答 默认 最新

  • 小z666 2021-12-02 16:55
    关注

    你这种,我建议直接在一个单元格里用v-for渲染多div,然后调一调样式,可以达到你想要的效果,这是最简单的

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月10日
  • 已采纳回答 12月2日
  • 创建了问题 12月2日

悬赏问题

  • ¥15 pnpm 下载element-plus
  • ¥15 解决编写PyDracula时遇到的问题
  • ¥15 有没有人能解决下这个问题吗,本人不会编程
  • ¥15 plotBAPC画图出错
  • ¥30 关于#opencv#的问题:使用大疆无人机拍摄水稻田间图像,拼接成tif图片,用什么方法可以识别并框选出水稻作物行
  • ¥15 Python卡尔曼滤波融合
  • ¥20 iOS绕地区网络检测
  • ¥15 python验证码滑块图像识别
  • ¥15 根据背景及设计要求撰写设计报告
  • ¥20 能提供一下思路或者代码吗