index.vue 546 Bytes
<script>
import { ref } from '../utils/vnode';

export default {
  name: 'Table',
  functional: true,
  render(h, context) {
    const props = context.props || {};
    if (Object.prototype.hasOwnProperty.call(props, 'editable') && props.editable !== false) {
      return h('z-table-editable', { props, scopedSlots: context.scopedSlots, on: context.listeners });
    }
    if (Object.prototype.hasOwnProperty.call(props, 'editor')) {
      return ref('z-table-editor', context);
    }
    return ref('z-table-normal', context);
  },
};
</script>