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

税务网站建设汇报seo优化工作

税务网站建设汇报,seo优化工作,宣传片制作流程,做外贸的网站都有哪些我们在用uniapp 开发应用的时候,有的页面需要自定义导航, 1.如果普通的直接使用uni 扩展柜组件的 uni-nav-bar 也基本够用, 2.如果稍微带点自定义的这个值无法支持的,特别在小程序端,胶囊是会压住右边的按钮的 自定…

我们在用uniapp 开发应用的时候,有的页面需要自定义导航,

1.如果普通的直接使用uni 扩展柜组件的 uni-nav-bar 也基本够用,

2.如果稍微带点自定义的这个值无法支持的,特别在小程序端,胶囊是会压住右边的按钮的

自定义个写 支持插槽

不带插槽的直接使用 自定义值看props里面的
小程序端
在这里插入图片描述
h5 app端
在这里插入图片描述

1.新建组件 目录结构 components/NavBar.vue

NavBar.vue 文件
<template><view> <view class='navbar' :style="{'backgroundColor':bgcolor,'z-index':zindex}"><view :style="{'height':tops+'px'}"></view><view :style="{'height':height+'px','line-height':height+'px'}"><view class='mainbox' :style="{'width':widtH+'px','height':'100%'}"><slot name="lf" :style="{'height':height+'px'}" v-if='isBack'><view class="nav-bar-lf"><uni-icons :type="licon" size="25" :color="titColor" @click="goBack"></uni-icons></view></slot><slot name="lc" :style="{'height':height+'px','color':titColor}"><view class="nav-bar-lc" :style="{'color':titColor}">{{title}}</view></slot><slot name="lr" :style="{'height':height+'px'}" v-if='isRbtn'><view class="nav-bar-lr"><uni-icons :type="ricon" size="25" :color="titColor" @click="handRbtn"></uni-icons></view></slot></view></view></view></view>
</template>
<script>export default {props: {title: {// 标题文字(默认为空)type: String,default: "",},titColor: {// 标题和返回按钮颜色(默认白色)type: String,default: "#999",},//建议使用background  因为使用backgroundColor,会导致不识别渐变颜色bgcolor: {// 背景颜色type: String,default: "#f4f4f4",},zindex: {// 层级type: Number,default: 1,},isBack: {// 是否显示返回按钮type: Boolean,default: true,},isRbtn: {// 是否显示右边按钮type: Boolean,default: false,},// 图标licon: {// 返回按钮图标type: String,default: "left",},ricon: {// 右边按钮图标type: String,default: "search",},},data() {return {height: '',widtH: '',tops: ''}},created() {// #ifdef  MPuni.getSystemInfo({success: (e) => {// 计算安全高度this.tops = e.statusBarHeight;let custom = uni.getMenuButtonBoundingClientRect();// 标题栏高度this.height = custom.height + (custom.top - e.statusBarHeight) * 2;// 计算标题栏减去 胶囊的宽度this.widtH = e.windowWidth - custom.width - 10}})// #endif},methods: {goBack() {uni.navigateBack({delta: 1 // 返回的页面数})},// 搜索handRbtn() {this.$emit("onRight")}}}
</script><style>.navbar {width: 100%;position: fixed;top: 0px;}.mainbox {display: flex;align-items: center;/* #ifdef   H5 || APP */height: 45px !important;line-height: 45px;/* #endif */}.nav-bar-lf {width: 45px;height: 100%;text-align: center;}.nav-bar-lc {flex: 1;height: 100%;text-align: center;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}.nav-bar-lr {width: 50px;height: 100%;text-align: center;}
</style>

页面中使用

index.vue

<template><view><NavBar  :isBack='true' :isRbtn='true'  title='首页' @onRight="handRight"></NavBar></view>
</template>
<script>//  根据自己的路径import NavBar from "../../../components/NavBar.vue" export default {components: {NavBar},data() {return {}},onLoad() {},methods: {handRight(){console.log("点击右边")}}}
</script><style></style>

带插槽的 ,如果带插槽的 里面样式自己想怎么写怎么写

各端展示如下
在这里插入图片描述
在这里插入图片描述
代码如下 index.vue

<template><view><NavBar  :isBack='true' :isRbtn='true'  title='首页' ><template #lf><view class="item1 item">左边</view></template><template #lc><view class="item2 item">标题部分</view></template><template #lr><view class="item3 item">右边</view></template></NavBar></view>
</template>
<script>import NavBar from "../../../components/NavBar.vue"export default {components: {NavBar},data() {return {}},onLoad() {},methods: {}}
</script><style>
.centermain{flex:1;color:#fff;display: flex;align-items: center;
}
.item{flex: 1;background: pink;
}
.item1{flex: 1;background: pink;
}
.item2{flex: 1;background: greenyellow;
}
.item3{flex: 1;background: salmon;
}
</style>
http://www.hkea.cn/news/516447/

相关文章:

  • html5制作网站模板百度产品大全首页
  • 贵阳网站建设贵阳百度推广怎么推广
  • 瓮安建设局网站google play三件套
  • 大型门户网站模板营销神器
  • 学设计的网站都有哪些seo和sem
  • 如何做网站流量买卖营销型网站的特点
  • 装修设计网站哪个平台最好软文推广多少钱一篇
  • 怎么做微信里的网页网站链接网站设计平台
  • 长宁专业做网站网络营销案例分享
  • 哈尔滨专业建网站哪家好码迷seo
  • 涞水县住房和城乡建设局网站厦门seo专业培训学校
  • 网站建设销售招聘德阳seo
  • 平台网站建设的公司seozou是什么意思
  • wordpress 相册 主题seo整站优化技术培训
  • 做窗帘网站图片百度自动点击器下载
  • 飘雪影视大全免费观看视频快推达seo
  • 做网站的装饰标语seo宣传网站
  • 国外 平面设计 网站百度收录
  • 做网站话术简述搜索引擎的工作原理
  • 现在建设网站赚钱吗seo外链论坛
  • 青海网站建设企业海南百度竞价推广
  • 南京做网站yuanmus电脑突然多了windows优化大师
  • 美国做deals的网站软文营销经典案例优秀软文
  • 招标网站怎么做吴江seo网站优化软件
  • 苏州建设工程协会网站seo去哪里学
  • 上海正规网站制作价格可口可乐软文营销案例
  • 番禺网站 建设信科网络站长之家ping
  • 建筑工程施工承包合同关键词优化报价推荐
  • 网站可以免费看企业网站系统
  • 中华人民共和国建设部网站seo怎么快速提高排名