iview-admin
iview-admin copied to clipboard
iview-admin"封装过的Tables组件"中的自定义模块能用不用render,直接使用template来使用组件吗?
修改tables.vue文件,增加以下代码(刚学vue不久,如有问题 请多指教),
然后在页面上可以正常使用了,如:

代码:
<template slot-scope="{ row, index }" :slot="column.slot" v-for="column in soltColumns">
<slot :name="column.slot" :row="row" :index="index"></slot>
</template>
computed: {
soltColumns: function() {
return this.columns.filter(column => column.slot);
}
}