GITLAB

frontend / zee

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • zee
  • packages
  • table
  • index.js
  • 8657d1e9   feat: 新增Table组件 Browse Code »
    刘汉宸
    2021-02-22 13:16:29 +0800  
index.js 487 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
import tableProps from './props';

export default {
  name: 'Table',
  props: {
    type: {
      type: String,
      default: 'normal',
    },
    value: {
      type: Array,
      default() {
        return [];
      },
    },
    columns: {
      type: Array,
      default() {
        return [];
      },
    },
    ...tableProps,
  },
  render(h) {
    const scopedSlots = this.$scopedSlots;
    return h(`z-table-${this.type}`, { props: { ...this._props }, scopedSlots });
  },
};