component.scheme.js 999 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. export const propsScheme = {
  2. src: {
  3. type: String,
  4. intro: 'Avatar图片的源地址'
  5. },
  6. size: {
  7. type: [Number, String],
  8. default: 'default',
  9. intro: '大小'
  10. },
  11. icon: {
  12. type: [Object, String],
  13. intro: '设置Avatar的图标类型,具体参考Icon组件'
  14. },
  15. shape: {
  16. type: String,
  17. default: 'circle',
  18. intro: 'Avatar 形状',
  19. options: ['circle', 'square'],
  20. validate: true
  21. },
  22. 'src-set': {
  23. type: String,
  24. intro: '图片Avatar的原生srcset属性'
  25. },
  26. alt: {
  27. type: String,
  28. intro: '图片Avatar的原生alt属性'
  29. },
  30. fit: {
  31. type: String,
  32. default: 'cover',
  33. intro: '当展示类型为图片的时候,设置图片如何适应容器',
  34. options: ['fill', 'contain', 'cover', 'none', 'scale-down'],
  35. validate: true
  36. }
  37. }
  38. export const eventsScheme = {
  39. error: { cbVar: 'e' }
  40. }
  41. export const slotsScheme = {
  42. default: {}
  43. }
  44. export const componentScheme = {
  45. propsScheme,
  46. slotsScheme,
  47. eventsScheme
  48. }