You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.6 KiB

4 months ago
  1. import { defineMixin } from '../../libs/vue'
  2. import defProps from '../../libs/config/props.js'
  3. export const props = defineMixin({
  4. props: {
  5. // 是否展示modal
  6. show: {
  7. type: Boolean,
  8. default: () => defProps.modal.show
  9. },
  10. // 标题
  11. title: {
  12. type: [String],
  13. default: () => defProps.modal.title
  14. },
  15. // 弹窗内容
  16. content: {
  17. type: String,
  18. default: () => defProps.modal.content
  19. },
  20. // 确认文案
  21. confirmText: {
  22. type: String,
  23. default: () => defProps.modal.confirmText
  24. },
  25. // 取消文案
  26. cancelText: {
  27. type: String,
  28. default: () => defProps.modal.cancelText
  29. },
  30. // 是否显示确认按钮
  31. showConfirmButton: {
  32. type: Boolean,
  33. default: () => defProps.modal.showConfirmButton
  34. },
  35. // 是否显示取消按钮
  36. showCancelButton: {
  37. type: Boolean,
  38. default: () => defProps.modal.showCancelButton
  39. },
  40. // 确认按钮颜色
  41. confirmColor: {
  42. type: String,
  43. default: () => defProps.modal.confirmColor
  44. },
  45. // 取消文字颜色
  46. cancelColor: {
  47. type: String,
  48. default: () => defProps.modal.cancelColor
  49. },
  50. // 对调确认和取消的位置
  51. buttonReverse: {
  52. type: Boolean,
  53. default: () => defProps.modal.buttonReverse
  54. },
  55. // 是否开启缩放效果
  56. zoom: {
  57. type: Boolean,
  58. default: () => defProps.modal.zoom
  59. },
  60. // 是否异步关闭,只对确定按钮有效
  61. asyncClose: {
  62. type: Boolean,
  63. default: () => defProps.modal.asyncClose
  64. },
  65. // 是否允许点击遮罩关闭modal
  66. closeOnClickOverlay: {
  67. type: Boolean,
  68. default: () => defProps.modal.closeOnClickOverlay
  69. },
  70. // 给一个负的margin-top,往上偏移,避免和键盘重合的情况
  71. negativeTop: {
  72. type: [String, Number],
  73. default: () => defProps.modal.negativeTop
  74. },
  75. // modal宽度,不支持百分比,可以数值,px,rpx单位
  76. width: {
  77. type: [String, Number],
  78. default: () => defProps.modal.width
  79. },
  80. // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮
  81. confirmButtonShape: {
  82. type: String,
  83. default: () => defProps.modal.confirmButtonShape
  84. }
  85. }
  86. })