- 底部导航?
底部导航 1.在app.json中的pages:[]下面复制代码 "pages/fabu/fabu" 2.在app.json中创建与pages同级的tabBar类 "tabBar": { "color": "#000000", "selectedColor": "#ff0000", "list": [{ "pagePath": "pages/index/index", "text": "首页", "iconPath": "pages/images/1.jpg", "selectedIconPath": "pages/images/2.jpg" },{ "pagePath": "pages/fabu/fabu", "text": "发布页", "iconPath": "pages/images/1.jpg", "selectedIconPath": "pages/images/2.jpg" }] },
2022-06-16 - 宫格导航?
宫格导航 1.将代码 <view class="dq1"> <view wx:for="{{daohang}}" class="dq"> <image src="{{item.image}}"></image> <text>{{item.name}}</text> </view> </view> 复制到index下面的index.wxml中 2.将代码 daohang:[{ image:'/pages/images/logo1.png', name:'京东超市' },{ image:'/pages/images/logo1.png', name:'京东超市' },{ image:'/pages/images/logo1.png', name:'京东超市' },{ image:'/pages/images/logo1.png', name:'京东超市' },{ image:'/pages/images/logo1.png', name:'京东超市' },{ image:'/pages/images/logo1.png', name:'京东超市' },{ image:'/pages/images/logo1.png', name:'京东超市' },{ image:'/pages/images/logo1.png', name:'京东超市' }], 复制到index下的index.js的data:{},中 3.将代码 view image{ width: 22vw; height: 22vw; } .dq1{ display: flex; justify-content: space-around; flex-wrap: wrap; flex-direction: row; } .dq{ display: flex; flex-direction: column; align-items: center; } 复制到index下的index.wxss中
2022-06-15 - 轮播图要怎么做?
轮播图,images和index文件夹同级都在pages下面 1.打开index下面的index.wxml复制 <swiper indicator-dots circular autoplay> <block wx:for="{{swiperImages}}"> <swiper-item> <image src="{{item}}"></image> </swiper-item> </block> </swiper> 2.打开index下面的index.js复制 swiperImages:[ "/pages/images/轮播图1的名称", "/pages/images/轮播图2的名称" ], 到date:{},之中
2022-06-15