props.js 2.5 KB

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