iview报错[Vue warn]: Error in render: "TypeError: ctx.injections.tableRoot.$scopedSlots[ctx.props.column.slot] is not a function"

原因是我使用了iview的<Table>组件,我给Table组件的columns中定义了4个含有slot的列,但是实际在<Table>中只使用了其中3个,导致的报错。

也就是说,在 Table组件的columns中定义了多少个含有slot的列,那么在<Table>内部必须输出多少个,否则会报错

posted @ 2019-10-23 10:42  jiafeng  阅读(9738)  评论(2编辑  收藏  举报