vue-ant-design table template模式二次封装 动态slot 不渲染

// v-table
<div class="v-table">
<a-table
          @change="handleTableChange"
          :columns="columns"
          :scopedSlots="$scopedSlots"
          :scroll="{ y: true }"
          :dataSource="datas"
          :loading="loading"
          :pagination="{ total: pagination.totalPages * pagination.offSize, defaultPageSize: pagination.offSize, current: pagination.offSet, pageSize: pagination.offSize, showSizeChanger: true, showQuickJumper: true, pageSizeOptions: $store.state.app.pageSizeOptions }">
</a-table>
</div>

use:

<v-table :columns="columns" :datas="datas" :loading="loading">
      <div slot="state" slot-scope="item"><a-switch checkedChildren="启用" unCheckedChildren="禁用" :loading="item.loading" :checked="item.state" @click="changeState(item)" /></div> //不渲染
  </v-table>

怎样才可以动态传过去又可以渲染自定义column呢?

阅读 803
评论
    2 个回答