import { reactive, PropType } from 'vue';
import { PropTypes } from '/nerv-lib/util/type';

export const formProps = {
  params: PropTypes.object.def(() => ({})),
  showAction: PropTypes.bool.def(false),
  // validateState: PropTypes.bool.def(false),
  schemas: {
    type: Array as PropType<FormSchema[]>,
    required: true,
    default: () => [],
  },
  model: PropTypes.object.def(() => reactive({})),
  loading: PropTypes.bool.def(false),
  formLayout: PropTypes.string.def('flexv2'),
  expand: PropTypes.bool.def(true),
  showExpand: PropTypes.bool.def(false),
  // 收起全部
  expandAll: PropTypes.bool.def(true), // 默认是否全部展开
  showExpandAll: PropTypes.bool.def(true), // 是否展示右上角的全部收起展开
  title: PropTypes.bool.def(false), // 是否展示右上角的全部收起展开
};
