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

2022年成都疫情回顾图seo关键词

2022年成都疫情回顾图,seo关键词,免费制作相册影集,delphi可以做网站吗自定义导航栏 修改 pages.json 在 pages.json 中将 navigateionStyle 设为 custom 新建 systemInfo.js systemInfo.js 用来获取当前设备的机型系统信息,放在 common 目录下 /*** 此 js 文件管理关于当前设备的机型系统信息*/ const systemInfo function() {/***…

自定义导航栏

修改 pages.json

pages.json 中将 navigateionStyle 设为 custom

image-20231013124909430

新建 systemInfo.js

systemInfo.js 用来获取当前设备的机型系统信息,放在 common 目录下

image-20231013130951574

/*** 此 js 文件管理关于当前设备的机型系统信息*/
const systemInfo = function() {/****************** 所有平台共有的系统信息 ********************/// 设备系统信息let systemInfomations = uni.getSystemInfoSync()// 机型适配比例系数let scaleFactor = 750 / systemInfomations.windowWidth// 当前机型-屏幕高度let windowHeight = systemInfomations.windowHeight * scaleFactor //rpx// 当前机型-屏幕宽度let windowWidth = systemInfomations.windowWidth * scaleFactor //rpx// 状态栏高度let statusBarHeight = (systemInfomations.statusBarHeight) * scaleFactor //rpx// 导航栏高度  注意:此导航栏高度只针对微信小程序有效 其他平台如自定义导航栏请使用:状态栏高度+自定义文本高度let navHeight = 0 //rpx/****************** 微信小程序头部胶囊信息 ********************/// #ifdef MP-WEIXINconst menuButtonInfo = wx.getMenuButtonBoundingClientRect()// 胶囊高度let menuButtonHeight = menuButtonInfo.height * scaleFactor //rpx// 胶囊宽度let menuButtonWidth = menuButtonInfo.width * scaleFactor //rpx// 胶囊上边界的坐标let menuButtonTop = menuButtonInfo.top * scaleFactor //rpx// 胶囊右边界的坐标let menuButtonRight = menuButtonInfo.right * scaleFactor //rpx// 胶囊下边界的坐标let menuButtonBottom = menuButtonInfo.bottom * scaleFactor //rpx// 胶囊左边界的坐标let menuButtonLeft = menuButtonInfo.left * scaleFactor //rpx// 微信小程序中导航栏高度 = 胶囊高度 + (顶部距离 - 状态栏高度) * 2navHeight = menuButtonHeight + (menuButtonTop - statusBarHeight) * 2// #endif// #ifdef MP-WEIXINreturn {scaleFactor,windowHeight,windowWidth,statusBarHeight,menuButtonHeight,menuButtonWidth,menuButtonTop,menuButtonRight,menuButtonBottom,menuButtonLeft,navHeight}// #endif// #ifndef MP-WEIXINreturn {scaleFactor,windowHeight,windowWidth,statusBarHeight}// #endif
}export {systemInfo
}

新建组件 HeadNav

<!--注意:1、在传入宽度或者高度时,如果是Number数据,传入的值为px大小,无需带单位,组件自动计算2、在使用此导航栏时,建议传入UI规定的导航栏高度,此高度只针对除微信小程序的其他平台有效,微信小程序的导航栏高度,组件自计算
-->
<template><view :style="{height:navHeight+'rpx'}"><!-- 微信小程序头部导航栏 --><!-- #ifdef MP-WEIXIN --><view class="wx-head-mod" :style="{height:navHeight+'rpx',backgroundColor:navBackgroundColor}"><view class="wx-head-mod-nav" :style="{height:navigationBarHeight+'rpx',top:statusBarHeight+'rpx'}"><view class="wx-head-mod-nav-content":style="{height:customHeight+'rpx',justifyContent:textAlign === 'center'?'center':'left'}"><!-- 文本区 --><view class="wx-head-mod-nav-content-mian":style="{width:navTextWidth,lineHeight:customHeight + 'rpx',paddingLeft:textPaddingLeft*scaleFactor+'rpx',fontSize:fontSize*scaleFactor+'rpx',fontWeight:fontWeight,color:titleColor}">{{textContent}}</view><!-- 返回按钮 --><view class="wx-head-mod-nav-content-back" :style="{display:isBackShow?'flex':'none'}"@click="backEvent"><view class="wx-head-mod-nav-content-back-img":style="{width:backImageWidth*scaleFactor+'rpx',height:backImageHeight*scaleFactor+'rpx'}"><image :src="backImageUrl" mode="" style="width: 100%;height: 100%;"></image></view></view></view></view></view><!-- #endif --><!-- 除微信小程序之外的其他设备 --><!-- #ifndef MP-WEIXIN --><view class="other-head-mod":style="{height:navHeightValue*scaleFactor+statusBarHeight+'rpx',backgroundColor:navBackgroundColor}"><view class="other-head-mod-mian":style="{height:navHeightValue*scaleFactor+'rpx',justifyContent:textAlign === 'center'?'center':'left'}"><!-- 返回按钮 --><view class="other-head-mod-mian-back" v-show="isBackShow" @click="backEvent"><view class="other-head-mod-mian-back-img":style="{width:backImageWidth*scaleFactor+'rpx',height:backImageHeight*scaleFactor+'rpx'}"><image :src="backImageUrl" mode="" style="width: 100%;height: 100%;"></image></view></view><!-- 标题 --><view class="other-head-mod-mian-title" :style="{width:windowWidth - 184+'rpx',lineHeight:navHeightValue*scaleFactor+'rpx',paddingLeft:textPaddingLeft*scaleFactor+'rpx',fontSize:fontSize*scaleFactor+'rpx',fontWeight:fontWeight,color:titleColor}">{{textContent}}</view></view></view><!-- #endif --></view>
</template><script>const app = getApp()import {systemInfo} from '@/pages/v2/acommon_js/system_info.js'export default {name: "HeadView",props: {// 文本区域位置 left:左  center:中  textAlign: {type: String,default: 'center'},// 文本区内容textContent: {type: String,default: '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈就啊哈哈好借好还'},// 文本区离左边的距离textPaddingLeft: {type: Number,default: 16},// 是否需要返回按钮isBackShow: {type: Boolean,default: true},// 文本区字体大小fontSize: {type: Number,default: 20 //px},// 文本区字体粗细fontWeight: {type: Number,default: 700},// 文本区返回按钮图片宽backImageWidth: {type: Number,default: 12 //px},// 文本区返回按钮图片高backImageHeight: {type: Number,default: 24 //px},// 返回按钮图标路径backImageUrl: {type: String,default: '/static/v2/aichat/ai_robot.png'},// 导航栏整体背景颜色navBackgroundColor: {type: String,default: '#2476F9'},// 标题字体颜色titleColor: {type: String,default: '#ffffff',},/******** h5端,app端需要传入自定义导航栏高度 *******/navHeightValue: {type: Number,default: 44 //px}},computed: {// 文本区宽度navTextWidth() {if (this.textAlign === 'center') {return (this.windowWidth - (this.windowWidth - this.menubarLeft) * 2) + 'rpx'} else {return this.menubarLeft + 'rpx'}},// 文本区paddingLefttextPaddingleft() {if (this.textAlign === 'center') {return '0'} else {return this.textPaddingLeft + 'rpx'}}},data() {return {statusBarHeight: app.globalData.statusBarHeight, //状态栏高度navHeight: app.globalData.navHeight, //头部导航栏总体高度navigationBarHeight: app.globalData.navigationBarHeight, //导航栏高度customHeight: app.globalData.customHeight, //胶囊高度scaleFactor: app.globalData.scaleFactor, //比例系数menubarLeft: app.globalData.menubarLeft, //胶囊定位的左边leftwindowWidth: app.globalData.windowWidth * app.globalData.scaleFactor};},methods: {backEvent() {uni.navigateBack({delta: 1})}},created() {/* 获取设备信息 */const SystemInfomations = systemInfo()/* 通用平台 */this.statusBarHeight = SystemInfomations.statusBarHeight //状态栏高度this.scaleFactor = SystemInfomations.scaleFactor //比例系数this.windowWidth = SystemInfomations.windowWidth //当前设备的屏幕宽度/* 微信小程序平台 */// #ifdef MP-WEIXINthis.navHeight = SystemInfomations.navHeight + SystemInfomations.statusBarHeight //头部导航栏总高度this.navigationBarHeight = SystemInfomations.navHeight //头部导航栏高度this.customHeight = SystemInfomations.menuButtonHeight //胶囊高度this.menubarLeft = SystemInfomations.menuButtonLeft //胶囊左边界距离左上角的距离// #endifconsole.log("this.navHeight:", this.navHeight)}}
</script><style>/* #ifdef MP-WEIXIN */.wx-head-mod {box-sizing: border-box;width: 100%;position: fixed;top: 0;left: 0;}.wx-head-mod-nav {box-sizing: border-box;width: 100%;position: absolute;left: 0;display: flex;justify-content: center;align-items: center;}.wx-head-mod-nav-content {box-sizing: border-box;width: 100%;display: flex;justify-content: left;align-items: center;position: relative;}/* 文本区 */.wx-head-mod-nav-content-mian {box-sizing: border-box;height: 100%;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;}/* 返回按钮 */.wx-head-mod-nav-content-back {box-sizing: border-box;width: 60rpx;height: 100%;/* background-color: aqua; */position: absolute;top: 0;left: 32rpx;display: flex;align-items: center;justify-content: left;}.wx-head-mod-nav-content-back-img {box-sizing: border-box;}/* #endif *//* #ifndef MP-WEIXIN */.other-head-mod {box-sizing: border-box;width: 100%;position: fixed;top: 0;left: 0;}.other-head-mod-mian {box-sizing: border-box;width: 100%;display: flex;align-items: center;justify-content: left;position: absolute;left: 0;bottom: 0;}/* 返回按钮 */.other-head-mod-mian-back {box-sizing: border-box;height: 100%;width: 60rpx;position: absolute;left: 32rpx;top: 0;display: flex;align-items: center;}/* 标题 */.other-head-mod-mian-title {box-sizing: border-box;height: 100%;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;}/* #endif */
</style>

使用

引入组件,使用

<template><view><HeadNav text-content="测试导航栏" nav-background-color="#fff"></HeadNav>aaa</view>
</template><script>import HeadNav from '@/components/HeadNav.vue'export default {components: {HeadNav},data() {return {title: 'Hello',}},onLoad() {},methods: {}}
</script><style>
body {background-color: aliceblue;
}
</style>

如果需要定义状态栏前景字体的颜色,可以设置 navigationBarTextStyle ,只能设置 whiteblack

{"pages": [{"path": "pages/index/Index","style": {"navigationBarTextStyle": "black"}}],"globalStyle": {"navigationStyle": "custom","backgroundColor": "#F8F8F8"},"uniIdRouter": {}
}

效果

image-20231013134547024

uview 导航栏使用

引入 uview ,根据文档引入

Navbar 自定义导航栏 | uView 2.0 (uviewui.com)

使用 u-navvar

<template><view><!-- 2.0.19支持autoBack,默认为false --><u-navbar title="个人中心" @rightClick="rightClick" :autoBack="true"></u-navbar></view>
</template><script>export default {components: {},data() {return {title: 'Hello',}},onLoad() {},methods: {rightClick() {console.log('rightClick');},leftClick() {console.log('leftClick');}}}
</script><style>body {background-color: aliceblue;}
</style>

效果

image-20231013141209926


文章转载自:
http://wanjiaschwartza.sqxr.cn
http://wanjiaoutbreak.sqxr.cn
http://wanjiacounterattraction.sqxr.cn
http://wanjiascurril.sqxr.cn
http://wanjiainspectorate.sqxr.cn
http://wanjiapatronym.sqxr.cn
http://wanjiawhorled.sqxr.cn
http://wanjiahoatching.sqxr.cn
http://wanjiawipeout.sqxr.cn
http://wanjiapennate.sqxr.cn
http://wanjiameshugana.sqxr.cn
http://wanjiateaplanting.sqxr.cn
http://wanjiaequipe.sqxr.cn
http://wanjiaexpatiate.sqxr.cn
http://wanjiaamenable.sqxr.cn
http://wanjiaearmuff.sqxr.cn
http://wanjiazoophilia.sqxr.cn
http://wanjiaanthropic.sqxr.cn
http://wanjianonbank.sqxr.cn
http://wanjiacoiffeuse.sqxr.cn
http://wanjiawoods.sqxr.cn
http://wanjiaheartbroken.sqxr.cn
http://wanjiareheating.sqxr.cn
http://wanjiapharmaceutist.sqxr.cn
http://wanjiaconsoling.sqxr.cn
http://wanjiaamericanologist.sqxr.cn
http://wanjiaprecancel.sqxr.cn
http://wanjiaillegibility.sqxr.cn
http://wanjiaumbellet.sqxr.cn
http://wanjiahenbane.sqxr.cn
http://wanjiagrapheme.sqxr.cn
http://wanjiacozy.sqxr.cn
http://wanjiatermless.sqxr.cn
http://wanjialikely.sqxr.cn
http://wanjiareconcilement.sqxr.cn
http://wanjiatrisoctahedron.sqxr.cn
http://wanjiamanic.sqxr.cn
http://wanjiagimmickery.sqxr.cn
http://wanjiaunderkeeper.sqxr.cn
http://wanjiaintercollegiate.sqxr.cn
http://wanjiamanstopper.sqxr.cn
http://wanjialumbricalis.sqxr.cn
http://wanjiaswayback.sqxr.cn
http://wanjiaundersecretariat.sqxr.cn
http://wanjiainelasticity.sqxr.cn
http://wanjiauppie.sqxr.cn
http://wanjiahexastylos.sqxr.cn
http://wanjiaintubatton.sqxr.cn
http://wanjiacatalepsy.sqxr.cn
http://wanjiacresting.sqxr.cn
http://wanjiarhodopsin.sqxr.cn
http://wanjiaunlike.sqxr.cn
http://wanjiasharply.sqxr.cn
http://wanjiavavasor.sqxr.cn
http://wanjiaironist.sqxr.cn
http://wanjialotta.sqxr.cn
http://wanjiawebby.sqxr.cn
http://wanjiaisanomal.sqxr.cn
http://wanjiameshach.sqxr.cn
http://wanjiaprehallux.sqxr.cn
http://wanjiabft.sqxr.cn
http://wanjiaperinephrium.sqxr.cn
http://wanjianautophone.sqxr.cn
http://wanjiasailorly.sqxr.cn
http://wanjiafurriner.sqxr.cn
http://wanjiabackpat.sqxr.cn
http://wanjianary.sqxr.cn
http://wanjiaeglestonite.sqxr.cn
http://wanjiaproconsular.sqxr.cn
http://wanjialister.sqxr.cn
http://wanjiasolfege.sqxr.cn
http://wanjiaprosody.sqxr.cn
http://wanjiaaugmentative.sqxr.cn
http://wanjiacorneous.sqxr.cn
http://wanjiaprotolanguage.sqxr.cn
http://wanjiagem.sqxr.cn
http://wanjiacfs.sqxr.cn
http://wanjiaornithoid.sqxr.cn
http://wanjiatoyland.sqxr.cn
http://wanjiaataman.sqxr.cn
http://www.15wanjia.com/news/112508.html

相关文章:

  • 游戏公司招聘网站如何优化关键词的排名
  • 专门做宠物食品的网站郑州网站关键词推广
  • 做网站要注意什么短视频营销推广方式
  • html导航栏模板seo排名培训
  • 网站建设的seo策略下载手机百度最新版
  • 动易手机网站模板推广赚钱的软件
  • 望牛墩网站仿做第三方营销平台有哪些
  • 远憬建站友情链接买卖平台
  • 悟空建站是什么营销网站推荐
  • 网站制作成功案例头条发布视频成功显示404
  • 网站主页制作市场调研报告ppt模板
  • 专业的做网站软件百度网址提交
  • 延安市建设工程交易中心网站电脑培训学校学费多少
  • 万网主机怎么做网站东莞百度网站排名优化
  • 做网站用python好还是PHP好百度网盘官网登录入口
  • 毕业论文网页设计西安seo顾问公司
  • Php做网站创业大学生创新创业大赛
  • 优化资源配置武汉seo招聘
  • wordpress检索厦门seo招聘
  • 安利的网站谁做的百度网页推广怎么做
  • 做外链的博客网站网站seo搜索引擎优化怎么做
  • 宁波seo哪家好seo权威入门教程
  • web技术网站建设营销知识和技巧
  • 南阳网站开发购买一个网站域名需要多少钱
  • 网站php源码破解版深圳seo优化服务
  • 南京做网站哪家最好网站服务器速度对seo有什么影响
  • 如何用vs2012做网站google图片搜索引擎入口
  • 做网站建设很赚钱吗独立站
  • 自贡哪家做网站的好百度竞价推广点击器
  • 琼海网站建设上海网站建设方案