https://developers.weixin.qq.com/miniprogram/dev/component/
一. 視圖容器組件
1. <view> 基礎視圖組件
https://developers.weixin.qq.com/miniprogram/dev/component/view.html
2. <scroll-view> 滾動視圖組件
https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html
使用豎向滾動時,需要給scroll-view一個固定高度娩鹉,通過 WXSS 設置 height典蜕。組件屬性的長度單位默認為px,2.4.0起支持傳入單位(rpx/px)疼蛾。
使用橫向滾動時,需要給scroll-view一個固定寬度肛跌,通過 WXSS 設置 width〔煊簦或者設置
white-space:nowrap
同時給子元素設置display:inline-block
scroll-into-view可設置默認滾動到的位置, 為一個子元素綁定id 傳給scroll-into-view即可
scroll-with-animation可以添加滾動動畫
3. <swiper>和<swiper-item> 輪播圖
https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html
- easing-function可以調整動畫效果
4. <movable-area>和<movable-view> //可滑動區(qū)域
https://developers.weixin.qq.com/miniprogram/dev/component/movable-view.html
可移動的視圖容器衍慎,在頁面中可以拖拽滑動。movable-view必須在 movable-area 組件中皮钠,并且必須是直接子節(jié)點稳捆,否則不能移動。
5. <cover-view>覆蓋視圖層
- 可以覆蓋在 map麦轰、video乔夯、canvas、camera款侵、live-player末荐、live-pusher組件上
- 里面可以放:文本\ 按鈕
- 可以嵌套 cover-view、cover-image
6. <cover-image> 覆蓋圖片
注意:不支持BASE64和SVG
二. 基礎組件
1. <icon> 圖標
圖標總共以下幾種:success, success_no_circle, info, warn, waiting, cancel, download, search, clear
2. 進度條
https://developers.weixin.qq.com/miniprogram/dev/component/progress.html
- 進度條關鍵屬性 :
percent
百分比show-info
顯示百分比 -
active
進度條動畫active-mode
動畫播放方式:backwards: 動畫從頭播新锈;forwards:動畫從上次結束點接著播 -
duration
進度增加1%所需毫秒數(shù) -
bindactiveend
動畫完成事件