报错:TypeError: ctx.injections.tableRoot.$scopedSlots[ctx.props.column.slot] is not a function
原因:iview table组件columns设置了插槽,但页面table并没有引用
加上就不会报错啦
<Table stripe border :columns="table_columns" :data="table_data">
<template slot-scope="{ row, index }" slot="discount"></template>
</Table>
table_columns: [
{
title: '实际折扣',
key: 'discount',
align: 'center',
slot: 'discount'
}
]