My dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.9 KiB

  1. {
  2. "$schema": "http://json-schema.org/draft-04/schema",
  3. "description": "微信小程序 自定义组件 的 schema",
  4. "type": "object",
  5. "required": ["component"],
  6. "properties": {
  7. "component": {
  8. "type": "boolean",
  9. "default": true
  10. },
  11. "usingComponents": {
  12. "type": "object"
  13. },
  14. "minapp": {
  15. "type": "object",
  16. "properties": {
  17. "component": {
  18. "type": "object",
  19. "description": "关于此组件的文档",
  20. "properties": {
  21. "docLink": {
  22. "type": "string",
  23. "description": "线上文档链接"
  24. },
  25. "desc": {
  26. "type": "array",
  27. "description": "组件的描述,支持 markdown 语法",
  28. "items": {
  29. "type": "string"
  30. }
  31. },
  32. "attrs": {
  33. "type": "array",
  34. "description": "组件属性列表",
  35. "items": {
  36. "$ref": "#/definitions/attr"
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. },
  44. "definitions": {
  45. "attr": {
  46. "required": ["name", "type"],
  47. "type": "object",
  48. "properties": {
  49. "name": {
  50. "type": "string",
  51. "description": "属性名字"
  52. },
  53. "type": {
  54. "type": "object",
  55. "description": "属性类型",
  56. "required": ["name"],
  57. "default": {"name": "string"},
  58. "properties": {
  59. "name": {
  60. "type": "string"
  61. }
  62. }
  63. },
  64. "desc": {
  65. "type": "array",
  66. "description": "属性的描述,支持 markdown 语法",
  67. "items": {
  68. "type": "string"
  69. }
  70. },
  71. "required": {
  72. "type": "boolean",
  73. "description": "是否必填"
  74. },
  75. "defaultValue": {
  76. "description": "属性默认值"
  77. }
  78. }
  79. }
  80. }
  81. }