props.ts 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // @ts-nocheck
  2. export default {
  3. /** 是否展示关闭按钮,值为 `true` 显示默认关闭按钮;值为 `false` 则不显示关闭按钮;也可以自定义关闭按钮 */
  4. closeable: {
  5. type: Boolean,
  6. default: false
  7. },
  8. /** 点击遮罩层是否关闭 */
  9. closeOnClickOverlay: {
  10. type: Boolean,
  11. default: true,
  12. },
  13. /** 是否在关闭浮层时销毁浮层 */
  14. destroyOnClose: Boolean,
  15. /** 浮层出现位置 */
  16. position: {
  17. type: String,
  18. default: 'center',
  19. validator(val: string) : boolean {
  20. if (!val) return true;
  21. return ['top', 'left', 'right', 'bottom', 'center'].includes(val);
  22. },
  23. },
  24. /** 防止滚动穿透 */
  25. preventScrollThrough: {
  26. type: Boolean,
  27. default: true,
  28. },
  29. overlayStyle: {
  30. type: [String, Object]
  31. },
  32. /** 是否显示遮罩层 */
  33. overlay: {
  34. type: Boolean,
  35. default: true,
  36. },
  37. /** 弹出层内容区的动画名,等价于transition组件的name属性 */
  38. transitionName: {
  39. type: String,
  40. default: '',
  41. },
  42. /** 是否显示浮层 */
  43. visible: {
  44. type: Boolean,
  45. default: undefined,
  46. },
  47. // vue2
  48. value: {
  49. type: Boolean,
  50. default: undefined,
  51. },
  52. modelValue: {
  53. type: Boolean,
  54. default: undefined,
  55. },
  56. /** 组件层级 默认为 999 */
  57. zIndex: {
  58. type: Number,
  59. default: 999
  60. },
  61. duration: {
  62. type: Number,
  63. default: 300
  64. },
  65. bgColor: {
  66. type: String
  67. },
  68. iconColor: {
  69. type: String
  70. },
  71. lStyle: {
  72. type: String
  73. },
  74. closeIcon: {
  75. type: String,
  76. default: 'close'
  77. },
  78. radius: {
  79. type: [String, Number, Array],
  80. default: undefined
  81. }
  82. };