记录一次TabBar使用本地图片
生活随笔
收集整理的這篇文章主要介紹了
记录一次TabBar使用本地图片
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
方法一:
第一步:import addpng from '../../assets/img/add.png'
第二步: { title: '找折扣', image: addpng},
即可。
方法二:
在app.js中添加如下信息節點:
tabBar: {
list: [
{
pagePath: "pages/index/index",
text: "首頁",
iconPath: "./images/tab/home.png",
selectedIconPath: "./images/tab/home-active.png"
},
{
pagePath: "pages/test1/index",
text: "測試1",
iconPath: "./images/tab/home.png",
selectedIconPath: "./images/tab/home-active.png"
}]
}
總結
以上是生活随笔為你收集整理的记录一次TabBar使用本地图片的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 字符编码、python2和python3
- 下一篇: svg-path-to-polygons