component.scheme.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. export const propsScheme = {
  2. modelValue: {
  3. type: Number,
  4. intro: '值'
  5. },
  6. unit: {
  7. type: String,
  8. intro: '单位'
  9. },
  10. controls: {
  11. type: Boolean,
  12. default: true,
  13. intro: '是否需要按钮'
  14. },
  15. controlsPosition: {
  16. type: String,
  17. intro: '按钮位置',
  18. options: ['right', 'standard'],
  19. validate: true
  20. },
  21. noPrecision: {
  22. type: Boolean,
  23. intro: '是否不设置精度'
  24. },
  25. precision: {
  26. type: Number,
  27. intro: '保留小数',
  28. default: 0
  29. },
  30. step: {
  31. type: Number,
  32. intro: '步长',
  33. default: 1
  34. },
  35. min: {
  36. type: Number,
  37. intro: '最小值'
  38. },
  39. placeholder: {
  40. type: String,
  41. intro: '占位符'
  42. },
  43. disabled: {
  44. type: Boolean,
  45. intro: '是否禁用状态'
  46. },
  47. max: {
  48. type: Number,
  49. intro: '最大值'
  50. },
  51. size: {
  52. type: String,
  53. default: 'default',
  54. intro: '大小',
  55. options: ['small', 'default', 'large'],
  56. validate: true,
  57. attr: true
  58. }
  59. }
  60. export const eventsScheme = {
  61. 'update:modelValue': {
  62. cbVar: 'val'
  63. }
  64. }
  65. export const slotsScheme = {
  66. default: {
  67. cbVar: 'text'
  68. }
  69. }
  70. export const componentScheme = {
  71. propsScheme,
  72. slotsScheme,
  73. eventsScheme
  74. }