Skip to content

小程序组件

基本规则

  • components 目录用于存放公共组件。
    • 注:需要在 *.json / usingComponents 字段中进行组件注册。
      • app.json 中注册后可以在任意页面进行使用。
      • pages/*.json 中注册后只能在当前页面进行使用。
json
/* prettier-ignore */
{
  "usingComponents": {
    "my-component": "/components/my-component/index"
  }
}

其他链接

基于 MIT 许可发布