el-table 表格

<el-table>
必填
:data="tableData"
可填:
size=""                        // 表格内容整体大小 medium / small / mini
:row-style="{height:'80px'}"                // 设置表格 行高  :cell-style="{}"也可以,注意!冒号和单引号
:header-cell-style="{color:'#606266'}"            // 设置表格 表头 颜色
empty-text="暂无数据"           // 空数据时显示的文本内容
 
<el-table-column>
必填
prop:""        //唯一的值
lable:""        //显示的表头
可填:
align: ""        //表格内容对齐方式 left/center/right 默认left
 
多级表头:
嵌套<el-table-column>,上面的表头只用 lable 值写内容
 
 
data(){
    return{
        tableData:[        //是数组!!!!
            {name:'',
             age:''},
            {name:'',
             age:''},
        ]
    }
}

 

posted on 2021-03-26 10:13  cropsecrab  阅读(229)  评论(0)    收藏  举报

导航