component.scheme.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. export const propsScheme = {
  2. modelValue: {
  3. type: String,
  4. intro: '绑定值'
  5. },
  6. placeholder: {
  7. type: String,
  8. intro: '输入框占位文本',
  9. attr: true
  10. },
  11. clearable: {
  12. type: Boolean,
  13. intro: '是否可清空',
  14. attr: true,
  15. default: false
  16. },
  17. disabled: {
  18. type: Boolean,
  19. intro: '是否禁用',
  20. attr: true,
  21. default: false
  22. },
  23. name: {
  24. type: String,
  25. intro: '等价于原生 input name 属性',
  26. attr: true
  27. },
  28. label: {
  29. type: String,
  30. intro: '标签文本',
  31. attr: true
  32. },
  33. popperClass: {
  34. type: String,
  35. intro: '下拉列表的类名',
  36. attr: true,
  37. default: {}
  38. },
  39. width: {
  40. type: [String, Number],
  41. intro: '控制文本框宽度',
  42. attr: false,
  43. default: '240px'
  44. }
  45. }
  46. export const eventsScheme = {
  47. select: { cbVar: 'e' },
  48. change: { cbVar: 'value' }
  49. }
  50. export const slotsScheme = {
  51. prefix: {},
  52. suffix: {},
  53. prepend: {},
  54. append: {}
  55. }
  56. export const componentScheme = {
  57. propsScheme,
  58. slotsScheme,
  59. eventsScheme
  60. }