组件
Mars 的组件规范使用百度智能小程序和微信小程序组件规范,在 H5 端进行了适配。
小程序组件组件文档
组件支持列表
视图容器
| 组件 | 百度小程序 | 微信小程序 | H5 |
| view | ✓ | ✓ | ✓ |
| scroll-view | ✓ | ✓ | ✓ |
| swiper | ✓ | ✓ | ✓ |
| cover-image | ✓ | ✓ | ✓ |
| cover-view | ✓ | ✓ | ✗ |
| movable-area | ✓ | ✓ | ✗ |
基础内容
| 组件 | 百度小程序 | 微信小程序 | H5 |
| icon | ✓ | ✓ | ✓ |
| text | ✓ | ✓ | ✓ |
| rich-text | ✓ | ✓ | ✓ |
| progress | ✓ | ✓ | ✓ |
| animation-view | ✓ | ✓ | ✗ |
表单组件
| 组件 | 百度小程序 | 微信小程序 | H5 |
| button | ✓ | ✓ | ✓ |
| checkbox | ✓ | ✓ | ✓ |
| form | ✓ | ✓ | ✓ |
| input | ✓ | ✓ | ✓ |
| label | ✓ | ✓ | ✓ |
| picker | ✓ | ✓ | ✓ |
| radio | ✓ | ✓ | ✓ |
| slider | ✓ | ✓ | ✓ |
| switch | ✓ | ✓ | ✓ |
| textarea | ✓ | ✓ | ✓ |
导航
| 组件 | 百度小程序 | 微信小程序 | H5 |
| navigator | ✓ | ✓ | ✓ |
媒体组件
| 组件 | 百度小程序 | 微信小程序 | H5 |
| audio | ✓ | ✓ | ✓ |
| image | ✓ | ✓ | ✓ |
| video | ✓ | ✓ | ✓ |
| camera | ✓ | ✓ | ✓ |
| live-player | ✓ | ✓ | ✗ |
地图
| 组件 | 百度小程序 | 微信小程序 | H5 |
| map | ✓ | ✓ | ✗ |
画布
| 组件 | 百度小程序 | 微信小程序 | H5 |
| canvas | ✓ | ✓ | ✓ |
开放能力
| 组件 | 百度小程序 | 微信小程序 | H5 |
| web-view | ✓ | ✓ | ✓ |
| open-data | ✓ | ✓ | ✗ |
广告
| 组件 | 百度小程序 | 微信小程序 | H5 |
| ad | ✓ | ✗ | ✗ |