el-table二次封装调用更简单。

首先看看几张效果图

el-table二次封装调用更简单。

el-table二次封装调用更简单。

 

columns: [
        { label: ‘测试列1‘, prop: ‘item_id‘ },
        { label: ‘测试列2‘, prop: ‘item_name‘, slotName: ‘item_name‘ },
        { label: ‘测试列3‘, prop: ‘item_code‘, width: 100 },
        {
          label: ‘测试列4‘, width: 100, children: [
            { label: ‘测试列4-1‘, prop: ‘item_explain‘, width: 100, slotName: ‘test41‘ },
            {
              label: ‘测试列4-2‘, width: 100,
              children: [
                { label: ‘测试列4-3‘, prop: ‘is_end‘, width: 100, slotName: ‘test42‘ },
                { label: ‘测试列4-4‘, prop: ‘parent_item_id‘, width: 100, slotName: ‘test43‘ },
              ]
            },
          ]
        },
        { ‘label‘: ‘操作‘, slotName: ‘opt‘, width: 150 }
      ],
      data: [
        {
          item_id: ‘07c1f9c5d7784deab187aaf35e346337‘,
          item_name: ‘2最顶端目录111‘,
          item_code: ‘0011‘,
          item_version: ‘1.0.0‘,
          item_note: ‘测试1‘,
          item_usage: ‘测试1‘,
          item_index: 13,
          item_explain: ‘测试‘,
          is_end: 1,
          parent_item_id: 0,
          item_status: 1,
          create_time: ‘2020-10-28 15:35:42.725877‘,
          update_time: ‘2020-12-02 17:20:19.696056‘
        },
        {
          item_id: ‘07c1f9c5d7784deab187aaf35e346337‘,
          item_name: ‘2最顶端目录222‘,
          item_code: ‘0012‘,
          item_version: ‘2.0.0‘,
          item_note: ‘测试2‘,
          item_usage: ‘测试2‘,
          item_index: 13,
          item_explain: ‘测试2‘,
          is_end: 1,
          parent_item_id: 0,
          item_status: 1,
          create_time: ‘2020-10-28 15:35:42.725877‘,
          update_time: ‘2020-12-02 17:20:19.696056‘
        }
      ]

 

 

el-table二次封装调用更简单。

 

 

 

 

代码开源地址:https://gitee.com/yeminglong/el-table-simple.git

 

如果您对该项目感兴趣,给我留言,我们一起闹起来吧....

 

el-table二次封装调用更简单。

上一篇:counter实现图片九宫格超出展示Demo


下一篇:ConfigMap使用说明