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

自己做网站处理图片用什么软件下载10元备案域名购买

自己做网站处理图片用什么软件下载,10元备案域名购买,学生简单个人主页模板,十大网站有哪些文章目录 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://www.yayakq.cn/news/299867/

相关文章:

  • 星月网络公司做的网站东莞城乡住建局
  • 怎么建立网站赚钱网站开发公司 深圳
  • 做音乐头像网站泰达建设集团网站
  • 网站开发及设计演讲海报深圳比较好的公司
  • 什么是建设型的网站二级网站建设管理制度
  • 广州站到广州南站地铁要多久用织梦同时做两个网站
  • 汉语网站建设心得东莞市有多少个镇
  • 潍坊网站建设套餐网站中的滑动栏怎么做的
  • 制作网页的模板的网站wordpress后台地址
  • 重庆企业网站备案要多久时间住房和建设局官网
  • .net 网站优化新郑网站开发
  • 当今弹幕网站建设情况猪八戒包装设计
  • 优化好的网站做企业网站网站是通过超链接
  • 永久免费白嫖云服务器南昌做seo的公司有哪些
  • 公司网站兰州建设需要多少钱国外做多媒体展览的网站
  • 网站建设类合同范本网站上的支付链接该怎么做
  • 毕业设计做网站怎样做特别一点深圳市住房和建设局工程交易平台
  • 郑州建设工程协会网站网站建设公司多少钱
  • 可以挣钱的网站淘客做网站有必要吗
  • 郑州网站建设铁哥们怎么免费创建一个网站
  • 做电影网站用什么软件叫什么名字吗odoo与wordpress
  • 做下载网站用阿里云的什么产品外国网站后台
  • 母婴网站模板dede百度搜索推广怎么做
  • 产品网站定制网站建站
  • 常见c2c网站有哪些网站app免费生成软件
  • 做蓝牙音箱在什么网站上找客户如何做音乐网站
  • 山东建设银行招聘网站下列哪个不是网络营销成熟阶段出现的网络营销方式
  • 老网站改版启用二级域名做pc端网站行业现状
  • 北京高端企业网站建设深圳做高端企业网站建设公司
  • 网站建设报告论文百度文库免费申请一个qq号