interface.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import _extends from "@babel/runtime/helpers/esm/extends";
  2. import PropTypes from '../_util/vue-types';
  3. import { stringType, booleanType, functionType, objectType } from '../_util/type';
  4. export const floatButtonProps = () => {
  5. return {
  6. prefixCls: String,
  7. description: PropTypes.any,
  8. type: stringType('default'),
  9. shape: stringType('circle'),
  10. tooltip: PropTypes.any,
  11. href: String,
  12. target: String,
  13. badge: objectType(),
  14. onClick: functionType()
  15. };
  16. };
  17. export const floatButtonContentProps = () => {
  18. return {
  19. prefixCls: stringType()
  20. };
  21. };
  22. export const floatButtonGroupProps = () => {
  23. return _extends(_extends({}, floatButtonProps()), {
  24. // 包含的 Float Button
  25. // 触发方式 (有触发方式为菜单模式)
  26. trigger: stringType(),
  27. // 受控展开
  28. open: booleanType(),
  29. // 展开收起的回调
  30. onOpenChange: functionType(),
  31. 'onUpdate:open': functionType()
  32. });
  33. };
  34. export const backTopProps = () => {
  35. return _extends(_extends({}, floatButtonProps()), {
  36. prefixCls: String,
  37. duration: Number,
  38. target: functionType(),
  39. visibilityHeight: Number,
  40. onClick: functionType()
  41. });
  42. };