commonProps.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { booleanType, someType, stringType, functionType } from '../_util/type';
  2. import PropTypes from '../_util/vue-types';
  3. const collapseProps = () => ({
  4. prefixCls: String,
  5. activeKey: someType([Array, Number, String]),
  6. defaultActiveKey: someType([Array, Number, String]),
  7. accordion: booleanType(),
  8. destroyInactivePanel: booleanType(),
  9. bordered: booleanType(),
  10. expandIcon: functionType(),
  11. openAnimation: PropTypes.object,
  12. expandIconPosition: stringType(),
  13. collapsible: stringType(),
  14. ghost: booleanType(),
  15. onChange: functionType(),
  16. 'onUpdate:activeKey': functionType()
  17. });
  18. const collapsePanelProps = () => ({
  19. openAnimation: PropTypes.object,
  20. prefixCls: String,
  21. header: PropTypes.any,
  22. headerClass: String,
  23. showArrow: booleanType(),
  24. isActive: booleanType(),
  25. destroyInactivePanel: booleanType(),
  26. /** @deprecated Use `collapsible="disabled"` instead */
  27. disabled: booleanType(),
  28. accordion: booleanType(),
  29. forceRender: booleanType(),
  30. expandIcon: functionType(),
  31. extra: PropTypes.any,
  32. panelKey: someType(),
  33. collapsible: stringType(),
  34. role: String,
  35. onItemClick: functionType()
  36. });
  37. export { collapseProps, collapsePanelProps };