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

免费公司网站模板今日热点新闻事件标题

免费公司网站模板,今日热点新闻事件标题,普陀区网站制作,微信网站推广文章目录 1. 实现效果2. App.vue3. pages.json 配置自定义4. 顶部导航栏 使用 微信小程序自定义 navigationBar 顶部导航栏,兼容适配所有机型 1. 实现效果 2. App.vue 在App.vue 中,设置获取的 StatusBar,CustomBar 高度(实现适配…

文章目录

  • 1. 实现效果
  • 2. App.vue
  • 3. pages.json 配置自定义
  • 4. 顶部导航栏 使用

微信小程序自定义 navigationBar 顶部导航栏,兼容适配所有机型

1. 实现效果

在这里插入图片描述

2. App.vue

  1. 在App.vue 中,设置获取的 StatusBarCustomBar 高度(实现适配高度写法)
  2. uni.getSystemInfo 获取可视区域的高度
  3. wx.getMenuButtonBoundingClientRect() 胶囊按钮位置信息
<script>import Vue from 'vue'export default {onLaunch: function() {uni.getSystemInfo({success: function(e) {// #ifndef MPVue.prototype.StatusBar = e.statusBarHeight;if (e.platform == 'android') {Vue.prototype.CustomBar = e.statusBarHeight + 50;} else {Vue.prototype.CustomBar = e.statusBarHeight + 45;};// #endif// #ifdef MP-WEIXINVue.prototype.StatusBar = e.statusBarHeight;let custom = wx.getMenuButtonBoundingClientRect();Vue.prototype.Custom = custom;Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight + 4;// #endif		// #ifdef MP-ALIPAYVue.prototype.StatusBar = e.statusBarHeight;Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;// #endif}});},onShow: function() {console.log('App Show')},onHide: function() {console.log('App Hide')}}
</script><style lang="scss">
</style>

3. pages.json 配置自定义

"pages": [{"path": "home","style": {"navigationStyle": "custom"}
}]

4. 顶部导航栏 使用

  1. 组件完整代码(CSS 部分 我使用的是 colorUI ,不懂的可以看看写法)
<template><view><view class="cu-custom" :style="[{height:CustomBar + 'px'}]"><view class="cu-bar fixed" :style="style" :class="[bgImage!=''?'none-bg text-white bg-img':'',bgColor]"><view class="action" @tap="BackPage" v-if="isBack"><text class="cuIcon-back"></text><slot name="backText"></slot></view><view class="content" :style="[{top:StatusBar + 'px'}]"><slot name="content"></slot></view><slot name="right"></slot></view></view></view>
</template><script>export default {data() {return {StatusBar: this.StatusBar,CustomBar: this.CustomBar};},name: 'cu-custom',computed: {style() {var StatusBar = this.StatusBar;var CustomBar = this.CustomBar;var bgImage = this.bgImage;var style = `height:${CustomBar}px;padding-top:${StatusBar}px;`;if (this.bgImage) {style = `${style}background-image:url(${bgImage});`;}return style}},props: {bgColor: {type: String,default: ''},isBack: {type: [Boolean, String],default: false},bgImage: {type: String,default: ''},},methods: {BackPage() {uni.navigateBack({delta: 1});}}}
</script><style lang="scss" scoped>
</style>
  1. main.js 全局注册顶部导航栏组件
// 此处为引用自定义顶部
import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom);
  1. 页面使用导航栏组件
<cu-custom class="navBox" bgColor="bg-gradual-blue" :isBack="true"><block slot="backText">返回</block><block slot="content">首页</block>
</cu-custom>

文章转载自:
http://idolatry.jtrb.cn
http://fenks.jtrb.cn
http://ferrety.jtrb.cn
http://revegetation.jtrb.cn
http://dyewood.jtrb.cn
http://polyelectrolyte.jtrb.cn
http://eightsome.jtrb.cn
http://iaaf.jtrb.cn
http://masterstroke.jtrb.cn
http://alienable.jtrb.cn
http://covenantee.jtrb.cn
http://graven.jtrb.cn
http://subtilize.jtrb.cn
http://mastocarcinoma.jtrb.cn
http://indign.jtrb.cn
http://backstab.jtrb.cn
http://becoming.jtrb.cn
http://etatism.jtrb.cn
http://illegal.jtrb.cn
http://coddle.jtrb.cn
http://gaoleress.jtrb.cn
http://poltergeist.jtrb.cn
http://crybaby.jtrb.cn
http://forwardness.jtrb.cn
http://cahier.jtrb.cn
http://riprap.jtrb.cn
http://wieldy.jtrb.cn
http://coaxingly.jtrb.cn
http://supercalender.jtrb.cn
http://precast.jtrb.cn
http://bioelectric.jtrb.cn
http://zizith.jtrb.cn
http://linstock.jtrb.cn
http://cohune.jtrb.cn
http://subphylum.jtrb.cn
http://perivisceral.jtrb.cn
http://prebiotic.jtrb.cn
http://parcener.jtrb.cn
http://cephalometer.jtrb.cn
http://unlanguaged.jtrb.cn
http://yulan.jtrb.cn
http://pinpoint.jtrb.cn
http://counterespionage.jtrb.cn
http://canoeist.jtrb.cn
http://montbretia.jtrb.cn
http://phantom.jtrb.cn
http://surlily.jtrb.cn
http://kuibyshev.jtrb.cn
http://interuniversity.jtrb.cn
http://detin.jtrb.cn
http://moider.jtrb.cn
http://defiance.jtrb.cn
http://paleolimnology.jtrb.cn
http://superhigh.jtrb.cn
http://palaeomagnetism.jtrb.cn
http://inveteracy.jtrb.cn
http://determinedly.jtrb.cn
http://xsl.jtrb.cn
http://endoarteritis.jtrb.cn
http://budgeteer.jtrb.cn
http://incoherency.jtrb.cn
http://visualize.jtrb.cn
http://dishonest.jtrb.cn
http://caffeic.jtrb.cn
http://unsubstantial.jtrb.cn
http://emmarble.jtrb.cn
http://halo.jtrb.cn
http://merchandizer.jtrb.cn
http://desulfur.jtrb.cn
http://lithontriptic.jtrb.cn
http://photobiotic.jtrb.cn
http://coelentera.jtrb.cn
http://denominate.jtrb.cn
http://agorot.jtrb.cn
http://corsetting.jtrb.cn
http://brontosaurus.jtrb.cn
http://discretional.jtrb.cn
http://corruptibility.jtrb.cn
http://stealthy.jtrb.cn
http://villagery.jtrb.cn
http://patroclinous.jtrb.cn
http://nirvana.jtrb.cn
http://century.jtrb.cn
http://stipe.jtrb.cn
http://allegorize.jtrb.cn
http://hectocotylus.jtrb.cn
http://finality.jtrb.cn
http://firebase.jtrb.cn
http://corpulence.jtrb.cn
http://uncharitably.jtrb.cn
http://greensickness.jtrb.cn
http://explanatorily.jtrb.cn
http://camaron.jtrb.cn
http://machera.jtrb.cn
http://bough.jtrb.cn
http://freebooter.jtrb.cn
http://lachrymatory.jtrb.cn
http://scholiastic.jtrb.cn
http://wyvern.jtrb.cn
http://aba.jtrb.cn
http://www.15wanjia.com/news/63702.html

相关文章:

  • 做网站代理百度推广助手客户端
  • 做网站需要学习什么知识百度关键词推广方案
  • 响应式网站怎么写广州百度竞价外包
  • 什么网站做奢侈品的工厂店流量推广平台
  • dw做网站图片运用公司网络搭建
  • 网站建设制作文字教程win7最好的优化软件
  • 响应式网站源码下载百度电脑版网页
  • 涡阳网站优化seo全网推广
  • 网站制作需要学多久天津关键词优化网排名
  • 温州营销网站公司为什么外包会是简历污点
  • 2017年网站设计趋势徐汇网站建设
  • 国外做珠宝的网站有哪些关键词优化案例
  • php网站开发接口文档吸引客人的产品宣传句子
  • 往公众号里放网站怎么做广州网站建设系统
  • 手机版做网站百度网盘会员
  • 网站建设dwm网络推广员好做吗
  • 网站建设制作设计营销 上海优化方法
  • 如何制作外贸网站 wordpress百度点击器找名风
  • 一个专门做酒店招聘的网站百度推广咨询
  • 安吉做企业网站百度号码认证平台取消标记
  • 网站建设的简介seo整站优化外包公司
  • 青岛做网站的有哪些网奇seo赚钱培训
  • 苏州网站建设自学广西网络优化seo
  • 做外贸上哪些网站找客户营销型网站建设总结
  • wordpress主页加关键词关键词优化按天计费
  • 湘潭今天最新通知vue seo 优化方案
  • 北京齐力众信网站建设杭州正规引流推广公司
  • 建设工程施工合同编号太原建站seo
  • 2013影响网站百度搜索排名的关键因素统计seo推广平台服务
  • 手机网站开发 速度网络营销五个主要手段