uni-app封装表格组件

组件代码:



组件使用代码:

const tableDataCloums = [
  {title:'会员卡编号',prop:'id'},
  {title:'会员电话',prop:'phone'},
  {title:'会员等级',prop:'vipGrade'},
  {title:'会员昵称',prop:'nickName'},
  {title:'当前积分',prop:'pointsCurrent'},
  {title:'等级权益',prop:'pointsCurrent'},
  {title:'余额',prop:'pointsCurrent'},
  {title:'开卡时间',prop:'createTime'},
  {title:'最近下单',prop:'updateTime'},
  {title:'操作',
    prop:'operation',
    operation:[
      {text:'充值',fun:'recharge',type:'primary'},
      {text:'充值记录',fun:'record',type:'warning'}
    ]
  },
]

页面样子:

uni-app封装表格组件_第1张图片

你可能感兴趣的:(uni-app,vue.js,javascript)