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

网站开发计划怎么写常德网警

网站开发计划怎么写,常德网警,营销网站售后调查系统,提出网络营销思想的网站改版计划很早之前就写过自定义头部,但是那时偷懒写死了,现在用插槽重新写了个 有两种形式: type1是完全自定义的,可以自己去组件改也可以用插槽改 type2是正常的返回标题和右边按钮,使用就是 title"标题" rightClic…

很早之前就写过自定义头部,但是那时偷懒写死了,现在用插槽重新写了个
有两种形式:
type1是完全自定义的,可以自己去组件改也可以用插槽改
type2是正常的返回标题和右边按钮,使用就是 title="标题" @rightClick = "函数",右边按钮是插槽,可以和下面例子一样用

效果图

类型1
在这里插入图片描述

类型2 的h5
在这里插入图片描述
类型2的小程序
在这里插入图片描述

使用

<myHead title="首页" type="2"><view slot="right"><text>提交</text></view>
</myHead>

组件代码

<template><view class="myHead"><!-- myHead的占位 --><view class="myHead_placeholder" :style="{height: addUnit(height + statusBarHeight,'px')}"></view><view class="myHead_fixed" :style="{'paddingRight': capsuleWidth + 'px'}"><!-- 状态栏 --><view class="status_bar" :style="{height: addUnit(statusBarHeight)}"></view><!-- 头部本体 --><slot><view v-if="type == 1" class="myHead_content" :style="{height: addUnit(height)}"><image src="/static/img/logo.png"></image><text>为牛只-屠宰全产业护航{{capsuleWidth}}</text></view><view v-else class="myHead_content2" :style="{height: addUnit(height)}"><view class="left" @click="leftClick"><text class="iconfont icon-left"></text></view><view class="content">{{title}}</view><view class="right" @click="rightClick"><text>提交</text></view></view></slot></view></view>
</template><script>export default {name: "myHead",props: {// 点击左侧区域(返回图标),是否自动返回上一页autoBack: {type: Boolean,default: false},title: {type: String | Number,default: '标题'},type: {type: String | Number,default: 2}},data() {return {// 状态栏statusBarHeight: 0,// 头部本体高度height: 44,// 如果有胶囊capsuleWidth: 0};},mounted() {// 手机状态栏的高度this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 0this.getNavBarHeight()},methods: {// 获取胶囊宽度getNavBarHeight() {// 小程序环境// #ifdef MP-WEIXINconst menuButtonInfo = uni.getMenuButtonBoundingClientRect();uni.getSystemInfo({success: (systemInfo) => {this.capsuleWidth = menuButtonInfo.width + systemInfo.screenWidth - menuButtonInfo.right; // 胶囊宽度}})// #endif// #ifdef H5this.capsuleWidth = 0// #endif},addUnit(num, unit = 'px') {return num + unit},// 点击左侧区域leftClick() {// 如果配置了autoBack,自动返回上一页this.$emit('leftClick')if (this.autoBack) {uni.navigateBack()}},// 点击右侧区域rightClick() {this.$emit('rightClick')},}}
</script><style lang="scss" scoped>.myHead {.myHead_placeholder {width: 100%;}.myHead_fixed {position: fixed;left: 0;right: 0;top: 0;z-index: 11;.myHead_content {display: flex;align-items: center;image {width: 150rpx;margin-right: 10rpx;}text {font-size: 24rpx;color: rgba(29, 37, 65, 0.5);}}.myHead_content2 {display: flex;align-items: center;justify-content: space-between;padding: 0 20rpx;.left {font-size: 28rpx;}.content {flex: 1;text-align: center;font-size: 32rpx;}.right {font-size: 28rpx;}}}}
</style>
http://www.dtcms.com/wzjs/829854.html

相关文章:

  • 泰安市住房与城乡建设局网站互联网投诉中心官网入口
  • 家居网站建设营销推广专业有哪些
  • 优秀的定制网站建设wordpress淘宝客单页主题
  • 股票查询网站模板 wordpress网站什么时候备案好
  • 商务网站建设的项目体会国外医院网站设计
  • 设计素材网站会员怎么买划算深圳燃气公司有哪些
  • 网站收录地址海外市场推广做什么的
  • 宝安网站(建设深圳信科)中国建设银行产品信息网站
  • 如何用dw做网站朱腾鹏个人网站
  • 营销网站大全惠州市建设公司网站
  • 网站标题改了设计免费素材网站
  • 小程序公众号网站开发个人网站需要什么内容
  • 网站搭建哪家公司最好目前网站建设采用什么技术
  • 8图片这样的网站怎么做三维动画设计制作公司
  • wordpress 去掉标题湖州seo排名
  • 网站建设如何接单广州企业名单
  • 网站基本模板建设环保网站的目的与功能分析
  • php手机网站如何制作教程服务器网站建设软件有哪些
  • 松江网站建设博客wordpress不能编辑
  • 陕西省私募基金协会seo站群干什么的
  • 深泽网站制作农产品网站管理员怎么做
  • 外贸建站源码wordpress 商家定位
  • 网站建设报告心得体会大型旅游网站源码 织梦
  • 东营的招聘网站哪个有用专业服务网站开发
  • 商城网站建设公司报价广东佛山网络科技有限公司
  • 整站seo优化推广广州网站建设哪个好
  • 美辰网站建设网站的站点的管理系统
  • 网站运营服务商在哪个网站开发外贸业务
  • php做的商城网站必备功能帮忙注册公司要多少钱
  • 甘肃省建设厅官网站wordpress仿模板