props.ts 834 字节
Newer Older
陈文彬 已提交
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 29 30 31 32 33 34 35 36 37 38 39
import type { PropType } from 'vue';
import type { DescItem } from './types';

export default {
  useCollapse: {
    type: Boolean as PropType<boolean>,
    default: true,
  },
  title: {
    type: String as PropType<string>,
    default: '',
  },
  size: {
    type: String as PropType<'small' | 'default' | 'middle' | undefined>,
    default: 'small',
  },
  bordered: {
    type: Boolean as PropType<boolean>,
    default: true,
  },
  column: {
    type: [Number, Object] as PropType<number | any>,
    default: () => {
      return { xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 };
    },
  },
  collapseOptions: {
    type: Object as PropType<any>,
    default: null,
  },
  schema: {
    type: Array as PropType<Array<DescItem>>,
    default: () => [],
  },
  data: {
    type: Object as PropType<any>,
    default: null,
  },
};