component.scheme.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. export const propsScheme = {
  2. title: {
  3. type: String,
  4. intro: '标题'
  5. },
  6. subTitle: {
  7. type: String,
  8. intro: '副标题'
  9. },
  10. modelValue: {
  11. default: false,
  12. type: Boolean,
  13. intro: '是否显示dialog'
  14. },
  15. onConfirm: {
  16. type: Function,
  17. intro: '确认函数'
  18. },
  19. beforeConfirm: {
  20. type: Function,
  21. default: () => {},
  22. intro: '触发表单验证前的值设置'
  23. },
  24. size: {
  25. default: 'default',
  26. intro: 'dialog宽度对应的尺寸'
  27. }, // mini: '374px', small: '568px', default: '860px', large: '1144px'
  28. width: {
  29. intro: 'dialog宽度'
  30. }, // 374px 568px 860px 1144px [ui建议值,特殊情况可自定义]
  31. top: {
  32. default: '15vh',
  33. intro: '高度'
  34. },
  35. closeOnClickModal: {
  36. type: Boolean,
  37. default: false,
  38. intro: '点击遮罩层是否关闭dialog'
  39. },
  40. showOnly: {
  41. default: false,
  42. intro: '是否只展示'
  43. },
  44. buttonSize: {
  45. default: 'default',
  46. intro: 'footer按钮大小'
  47. },
  48. confirmText: {
  49. default: '确认',
  50. intro: '触发on-confirm方法的按钮文字'
  51. },
  52. cancelText: {
  53. default: '取消',
  54. intro: '触发关闭dialog方法按钮的文字'
  55. },
  56. showCancel: {
  57. type: Boolean,
  58. default: true,
  59. intro: '是否展示取消按钮'
  60. },
  61. destroyOnClose: {
  62. type: Boolean,
  63. default: true,
  64. intro: '关闭时是否销毁dialog'
  65. },
  66. maxDepth: {
  67. type: Number,
  68. default: 5,
  69. intro: '查找form的深度'
  70. },
  71. fullscreen: {
  72. type: Boolean
  73. }
  74. }
  75. export const eventsScheme = {
  76. cancel: {
  77. intro: '取消触发'
  78. },
  79. close: {
  80. intro: '关闭触发'
  81. },
  82. 'update:modelValue': {
  83. cbVar: 'value'
  84. }
  85. }
  86. export const slotsScheme = {
  87. mainTitle: {
  88. cbVar: 'text'
  89. },
  90. subTitle: {
  91. cbVar: 'text'
  92. },
  93. default: {
  94. cbVar: 'text'
  95. },
  96. footer: {
  97. cbVar: 'text'
  98. }
  99. }
  100. export const componentScheme = {
  101. propsScheme,
  102. slotsScheme,
  103. eventsScheme
  104. }