iview/src/components/tree/render.js

17 lines
372 B
JavaScript
Raw Normal View History

2019-08-27 09:42:40 +08:00
export default {
name: 'RenderCell',
functional: true,
props: {
render: Function,
data: Object,
node: Array
},
render: (h, ctx) => {
const params = {
root: ctx.props.node[0],
node: ctx.props.node[1],
data: ctx.props.data
};
return ctx.props.render(h, params);
}
};