zoukankan      html  css  js  c++  java
  • ant-design-vue 中table简单用法

       <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号', }, ],
  • 相关阅读:
    空类型指针实践
    参数作用域实践
    内联函数实践:有疑惑未解决
    可变参数实践
    默认参数实践
    函数指针实践
    Windows下开发环境搭建
    Test
    C++ 左值与右值
    如何打包成多个资源文件
  • 原文地址:https://www.cnblogs.com/diligent-noob/p/14940506.html
Copyright © 2011-2022 走看看