>[success] # image -- 圖片
1. [img](https://developers.weixin.qq.com/miniprogram/dev/component/image.html),用法基本可以完全看官方例子就行
2. `image`展示時候元素寬度和高度: **320x240**
3. `/`表示根目錄
~~~
<image src="/assets/zznh.png" mode="aspectFit"/>
~~~

4. 展示本地圖片時候使用`wx.chooseMedia` api
~~~
<button bindtap="onChooseImage">選擇圖片</button>
<image class="img" src="{{chooseImageUrl}}" mode="widthFix"/>
~~~
* index.js
~~~
page({
onChooseImage() {
wx.chooseMedia({
mediaType: "image"
}).then(res => {
const imagePath = res.tempFiles[0].tempFilePath
this.setData({ chooseImageUrl: imagePath })
})
},
})
~~~
- 小程序了解
- webview 是什么
- Native App、Web App、Hybrid App
- 小程序架構模型
- 小程序配置文件
- app.js -- App函數
- 頁面.js -- page
- 生命周期????
- 小程序 -- 頁面wxml
- 小程序 -- WXS
- 小程序 -- 事件
- 小程序 -- 樣式wxss
- 小程序 -- 組件開發
- 小程序 -- 組件插槽
- 小程序 -- 組件的生命周期
- 組件總結
- 小程序 -- 混入
- 小程序基本組件
- text -- 文本
- view -- 視圖容器
- button -- 按鈕
- image -- 圖片
- scroll-view -- 滾動容器
- input -- 雙向綁定
- 通用屬性
- 小程序常用Api
- 微信網絡請求
- 微信小程序彈窗
- 微信小程序分享
- 獲取設備信息 / 獲取位置信息
- Storage存儲
- 頁面跳轉
- 小程序登錄