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.

84 lines
2.5 KiB

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