当前位置: 首页 > news >正文

如何高效率的建设网站成都旅游路线规划

如何高效率的建设网站,成都旅游路线规划,wordpress显示时间插件下载地址,北京手机网站建设公司一、先上效果 二 方法 1、自定义底部tabbar 实现: https://developers.weixin.qq.com/miniprogram/dev/framework/ability/custom-tabbar.html 官网去抄 简单写下:在代码根目录下添加入口文件 除了js 文件的list 需要调整 其他原封不动 代码&#xf…

一、先上效果

在这里插入图片描述

二 方法

1、自定义底部tabbar

实现:

https://developers.weixin.qq.com/miniprogram/dev/framework/ability/custom-tabbar.html 官网去抄

简单写下:在代码根目录下添加入口文件 除了js 文件的list 需要调整 其他原封不动
在这里插入图片描述

代码:
js部分

Component({data: {selected: 0,color: "#7A7E83",selectedColor: "#0081FF",list: [{  // 同app.json下的tabbar列表"iconPath": "/assets/img/build.png","selectedIconPath": "/assets/img/buildSelect.png","pagePath": "/pages/index/index","text": "淘楼"},{"iconPath": "/assets/img/my.png","selectedIconPath": "/assets/img/selectMy.png","pagePath": "/pages/my/index","text": "我的"}]},attached() {},methods: {switchTab(e) {console.log(e.currentTarget)const data = e.currentTarget.datasetconst url = data.pathwx.switchTab({url})this.setData({selected: data.index})}}
})

json

{"component": true,"usingComponents": {}
}

wxml

<!--miniprogram/custom-tab-bar/index.wxml-->
<view class="tab-bar"><view class="tab-bar-border"></view><view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab"><image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image><view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view></view>
</view>

wxss

  position: fixed;bottom: 0;left: 0;right: 0;height: 48px;background: white;display: flex;padding-bottom: env(safe-area-inset-bottom);z-index: 99;
}.tab-bar-border {background-color: rgba(0, 0, 0, 0.33);position: absolute;left: 0;top: 0;width: 100%;height: 1px;transform: scaleY(0.5);
}.tab-bar-item {flex: 1;text-align: center;display: flex;justify-content: center;align-items: center;flex-direction: column;
}.tab-bar-item image {width: 27px;height: 27px;
}.tab-bar-item view {font-size: 10px;
}.tab-bar {position: fixed;bottom: 0;left: 0;right: 0;height: 48px;background: white;display: flex;padding-bottom: env(safe-area-inset-bottom);z-index: 99;
}.tab-bar-border {background-color: rgba(0, 0, 0, 0.33);position: absolute;left: 0;top: 0;width: 100%;height: 1px;transform: scaleY(0.5);
}.tab-bar-item {flex: 1;text-align: center;display: flex;justify-content: center;align-items: center;flex-direction: column;
}.tab-bar-item image {width: 27px;height: 27px;
}.tab-bar-item view {font-size: 10px;
}

2、 list 的中的页面 都需要在onShow中加入一下方法

    if (typeof this.getTabBar === 'function' &&this.getTabBar()) {this.getTabBar().setData({selected: 0})}

三、遮罩层 盖住底部tabbar 自己实现一个遮罩层或者使用组件 我这儿用的组件 只需要让z-index:的值大于99999 即可

<!-- 遮罩层 -->
<van-overlay show="{{ overlayShow }}" vertical z-index="{{999999}}"><view class="overlay-content"><van-loading type="spinner">加载中...</van-loading></view>
</van-overlay>
http://www.yayakq.cn/news/542374/

相关文章:

  • 小天才电话手表网站网站建设流程步骤为需求分析
  • 网站开发过程记录威海自适应网站建设
  • 网站建设与维护管理办法网站建设与维护的工资
  • 用中文版wordpress建英文站一件代发货源开网店货源
  • 长沙网站运营外包公司通用ppt模板免费下载
  • 帝国cms生成网站地图cetos做网站
  • 北京王府井在哪个区常用的seo工具
  • 微信商城和微网站wordpress 禁止地区ip
  • 泰安公司网站建设wordpress 首页动画
  • 郑州网站建设汉狮网站后台的建设
  • 河北网站制作公司哪家好济宁哪里有网站建设
  • 汉台网站制作哪些网站可以做养殖的广告
  • 企业做网站需要什么手续吗大岭山网站
  • 社区信息建设网站网站建设7个基本流程步骤有哪些
  • 无上光东莞网站深圳做官网公司
  • 如何用网站做推广深圳软件系统开发
  • 做淘宝客最好的网站是什么网站深圳vi设计公司全力设计
  • 自己搭建一个网站英文公司网站模板
  • 重庆市建设工程信息网官网安全监督信息网北京网络seo推广公司
  • 十大下载网站免费安装合肥做网站的公
  • 免费建立网站软件陕西省建设安全协会网站
  • 网做英文网站网站如何进行优化
  • 网站中的下拉菜单茶叶怎么做网站销售
  • 新网站应该怎么做电商培训机构排名前十
  • 民治做网站联系电话和拓者设计吧类似的网站
  • 软文素材网站工作邮箱认证提额
  • 网站icon图标怎么设置网站规划和建设的基本要求
  • 高淳 网站建设温州网牌电线电缆有限公司
  • 建设h网站风险大吗上海外贸网站制作
  • 住房和城乡建设部网站质保金网络营销方式