Blame view

src/components/tree/render.js 372 Bytes
174836c4   梁灏   update Tree Rende...
1
2
3
4
5
  export default {
      name: 'RenderCell',
      functional: true,
      props: {
          render: Function,
97098fcd   梁灏   update Tree example
6
          data: Object,
6ff0e340   梁灏   update Tree Rende...
7
          node: Array
174836c4   梁灏   update Tree Rende...
8
9
10
      },
      render: (h, ctx) => {
          const params = {
6ff0e340   梁灏   update Tree Rende...
11
12
              root: ctx.props.node[0],
              node: ctx.props.node[1],
97098fcd   梁灏   update Tree example
13
              data: ctx.props.data
174836c4   梁灏   update Tree Rende...
14
15
16
17
          };
          return ctx.props.render(h, params);
      }
  };