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>内部必须输出多少个,否则会报错

猜你喜欢

转载自www.cnblogs.com/zjfblog/p/11724904.html
今日推荐