UNPKG

vue-ant-patterns

Version:

vue-ant-patterns

60 lines (55 loc) 1.54 kB
import PropTypes from 'ant-design-vue/es/_util/vue-types'; var propsLabelNum = { label: PropTypes.string.isRequired, value: PropTypes.number.isRequired }; var tagProps = { name: PropTypes.string.isRequired, key: PropTypes.string.isRequired }; var buttonPropsItems = PropTypes.shape({ icon: PropTypes.string, key: PropTypes.string, text: PropTypes.string }); var anchor = PropTypes.shape({ title: PropTypes.string }).loose; var baseInfoProps = { photo: PropTypes.string, // 用户名 employeeName: PropTypes.string.isRequired, // 工号 employeeCode: PropTypes.string, // 职位 positionName: PropTypes.string, // 职务 jobName: PropTypes.string, // 公司 companyName: PropTypes.string, // 部门 deptName: PropTypes.string, // 用户头向下的按钮 buttons: PropTypes.arrayOf(buttonPropsItems), status: PropTypes.arrayOf(PropTypes.shape(tagProps)) }; export default { // 标题栏 titleBar: PropTypes.shape({ title: PropTypes.string.def(''), titleTagName: PropTypes.oneOf(['h2', 'h3', 'h4', 'h5']).def('h3'), buttons: PropTypes.arrayOf(buttonPropsItems) }), // 是否显示辅助区域 isShowTitleBarSubArea: PropTypes.bool, // 锚点导航 anchorList: PropTypes.arrayOf(anchor), // 标签 tags: PropTypes.arrayOf(PropTypes.shape(tagProps)), // 基础信息 baseInfo: PropTypes.shape(baseInfoProps), // 资料完整度 integrity: PropTypes.shape(propsLabelNum), // 其他信息 otherInfo: PropTypes.arrayOf(PropTypes.shape(propsLabelNum)) };