elementui table封装(封装element ui的table组件)_1

本文主要介绍elementui表包(封装元素ui的表组件),下面一起看看elementui表包(封装元素ui的表组件)相关资讯。
在简单包和数据组件文件夹下添加一个vtable.vue文件,内容如下
模板el-table : data = tabl:百分百 el-表格-列v-for = 列中的项目:prop = 道具 : label = item.label : key = 道具 /el-table-column/el-table/template script export default { name : vtabl:{ //接收列columnes: { type :数组,default :=[]},//接收数据表data : { type : array,default :=[]},home.vue页面中使用data{ return { }/script style/style。
模板div class = 家庭与娱乐img alt = vue标志 src = ../assets/logo . png vtable : columns = 专栏和杂志: tabledata = tabledata / vtable /div/templatescript// @是来自 @/compon: ;家庭与娱乐。;,data{ return{ //列数据columnescho 0-@ .com[{ label: 和;,prop: 姓名和名称,prop: 姓名和名称},{ label: 地址 ,prop: 地址 }],//数据内容tabl:[{ date: ;2016年5月2日 ,name : ;王小虎 ,address : ;普陀区江路1518弄。;},{ date: ;2016年5月4日 ,name : ;王小虎 ,address : ;普陀区江路1517弄。;},{ date: ;2016年5月1日 ,name : ;王小虎 ,address : ;普陀区江路1519弄。;},{ date: ;2016年5月3日 ,name : ;王小虎 ,address : ;上海市普陀区江路1516弄。;}}}},compon: { vtable } }/script ;简单的分包装在这里。
标签:
江普陀区
了解更多elementui表包(封装元素ui的表组件)相关内容请关注本站点。