component.scheme.js 1007 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. export const propsScheme = {
  2. protocol: { type: String, default: 'http:', intro: '协议' },
  3. host: { type: String, intro: '主机地址' },
  4. port: { type: Number, intro: '端口号' },
  5. path: { type: String, intro: '路径' },
  6. size: {
  7. type: String,
  8. options: ['small', 'default', 'large'],
  9. default: 'default',
  10. intro: '尺寸'
  11. },
  12. portMin: { type: Number, default: 0, intro: '端口号最小值' },
  13. portMax: { type: Number, default: 65535, intro: '端口号最大值' },
  14. disabled: { type: Boolean, default: undefined, intro: '禁用' },
  15. disabledConfig: {
  16. type: Object,
  17. default: () => ({}),
  18. intro: '细致的对每个输入框的禁用进行配置'
  19. } // { protocol, host, port, path}
  20. }
  21. export const eventsScheme = {
  22. 'update:protocol': {
  23. cbVar: 'newVal'
  24. },
  25. 'update:host': {
  26. cbVar: 'newVal'
  27. },
  28. 'update:port': {
  29. cbVar: 'newVal'
  30. },
  31. 'update:path': {
  32. cbVar: 'newVal'
  33. }
  34. }
  35. export const componentScheme = {
  36. propsScheme,
  37. eventsScheme
  38. }