首页 > 其他 > 详细

ant-design-vue 中table简单用法

时间:2021-06-27 17:18:45      阅读:40      评论:0      收藏:0      [点我收藏+]
   <a-table 
    bordered  
    :columns="columns" 
    :data-source="data"
    :pagination="pagination">
  <template #action = {record,index}>
   .......//record 就表示表格里面某一行的的所有数据了
  </template>
</a-table> columns: [ { title: ‘姓名‘, dataIndex: ‘name‘, key: ‘name‘, }, { title: ‘年龄‘, dataIndex: ‘age‘, key: ‘age‘, }, { title: ‘住址‘, dataIndex: ‘address‘, key: ‘address‘,slots: {customRender:‘action [自定义随便起]‘} }, ], data: [ { key: 1, //这里需要加上 key 值,不然后报错 下面的data中 name 要与上面的dataIndex 相对应 若需要在表格中加上自定义的内容 则需要在 name: 胡彦斌, age: 32, address: 西湖区湖底公园1号, }, { key: 2, name: 胡彦祖, age: 42, address: 西湖区湖底公园1号, }, ],

 

ant-design-vue 中table简单用法

原文:https://www.cnblogs.com/diligent-noob/p/14940506.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!