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

wordpress怎么做淘客网站/市场营销推广活动方案

wordpress怎么做淘客网站,市场营销推广活动方案,北京通州做网站的公司,建设asp网站视频教程uniapp自定义封装tabbar 开发原因: 有很多时候 小程序并没有其类目 需要通过配置发布审核&#xff0c; ps&#xff1a;需要去掉项目pages.json tabbar配置&#xff0c;不然重进会显示默认&#xff0c;跳转页面不能uni.switchTab。 组件tabbar <template><viewclass&…

uniapp自定义封装tabbar

开发原因: 有很多时候 小程序并没有其类目 需要通过配置发布审核,
ps:需要去掉项目pages.json tabbar配置,不然重进会显示默认,跳转页面不能uni.switchTab。
在这里插入图片描述

  1. 组件tabbar

    <template><viewclass="myTabBar"style="box-sizing: content-box":style="{height: height,background: backgroundColor,'border-top-color': borderStyle,'padding-bottom': isIPhoneXX && iOSBottomBarHeight}"><viewclass="tabBar-item"v-for="(item, index) in list":key="index"@click="onClickItem(index,item)"><view class="tabTag"  :class="{'ischose': tacurrent != index,}" v-if="item.num && item.num>0"><u-badge size="small" :count="item.num" type="error"></u-badge></view><!-- <view class="tabTag" v-if="item.num===-1"><u-badge size="small" :count="item.num" is-dot type="error"></u-badge></view> --><view class="tabBar-img"><imageclass="tabBar-img":src="item.iconPath"mode="widthFix"v-if="tacurrent !== index":style="{width: iconWidth}"></image><imageclass="tabBar-img":src="item.selectedIconPath"mode="widthFix"v-if="tacurrent === index":style="{width: iconWidth}"></image></view><viewclass="tabBar-text":style="{color: color,color: tacurrent === index && selectedColor,'font-size': fontSize,'font-family':'Microsoft YaHei','padding-top': spacing}">{{ item.text }}</view></view></view>
    </template>
    <script>
    export default {components: {},data() {return {iOSBottomBarHeight: '34px',isIPhoneXX: false}},props: {tacurrent: Number, // 当前选中的值color: {// tab 上的文字默认颜色type: String,default: '#100405'},selectedColor: {// tab 上的文字选中时的颜色type: String,default: '#C31107'},backgroundColor: {// tab 的背景色type: String,default: '#ffffff'},borderStyle: {// tabbar 上边框的颜色type: String,default: '#dddddd'},fontSize: {// 文字默认大小type: String,default: '13px'},iconWidth: {// 图标默认宽度type: String,default: '20px'},spacing: {// 图标和文字的间距type: String,default: '0px'},height: {// tabBar 默认高度type: String,default: '50px'},list: {type: Array/**[{pagePath: '', // 页面路径text: '', // tab 上按钮文字iconPath: '', // 图片路径 图片请使用base64selectedIconPath: '', // 选中时的图片路径 图片请使用base64num: '', // 红色数字角标}]*/}},onLoad() {},onShow() {},onHide() {},created() {try {const { isIPhoneXX } = getApp().globalDatathis.isIPhoneXX = isIPhoneXX} catch (e) {}// try {//   const res = wx.getSystemInfoSync()//   console.log('getSystemInfoSync', res)//   if (//     res.model.search('iPhone X') != -1 ||//     res.model.search('iPhone 12 mini') != -1 ||//     res.model.search('iPhone 11') != -1 ||//     res.model.search('iPhone 12') != -1 ||//     res.model.search('iPhone 13') != -1 ||//     res.model.search('iPhone 14') != -1//   ) {//     this.isIPhoneXX = true//   }// } catch (e) {//   // Do something when catch error// }},methods: {onClickItem(index,item) {this.$emit('update:value', index)this.$emit('callback', index,item)}}
    }
    </script><style lang="scss" scoped>
    .myTabBar {// display: flex;// justify-content: space-between;// align-items: center;// border-top: 1px solid #eee;// width: 100%;// padding-top: 10rpx;display: flex;flex-direction: row;align-items: center;position: relative;position: fixed;bottom: 0;left: 0;width: 100%;z-index: 998;padding-bottom:15px;padding-top:5px;box-sizing: initial;.tabBar-item {position: relative;// flex: 1;// text-align: center;// line-height: 1;flex: 1;justify-content: center;height: 100%;padding: 6px 0;display: flex;flex-direction: row;flex-direction: column;align-items: center;}.tabBar-text {line-height: 1;}.tabBar-img {display: inline-block;width: 40rpx;height: 48rpx;}.tabTag {position: absolute;top: 0;left: 50%;// margin: 0 auto;z-index: 9;}.ischose{top: -16% !important;left: 83% !important;}
    }
    </style>

    2.使用页面

    ​ .使用组件

    <!--底部菜单-->
    <template><view class="btn-bar"><tabbar :tacurrent="tacurrent" :list="tabList" @callback="tabbarCallback" /></view>
    </template>
    

    ​ . 定义变量

    tacurrent:0,//当前显示
    tabList:[ {iconPath: "/static/img/Navigation1.png",selectedIconPath: "/static/img/Navigation1_1.png",text: "比赛",pagePath: "/pages/index/index",midButton: true,},{iconPath: "/static/img/Navigation3.png",selectedIconPath: "/static/img/Navigation3_3.png",text: "俱乐部",pagePath: "/pages/club/index",midButton: false,},{iconPath: "/static/img/Navigation4.png",selectedIconPath: "/static/img/Navigation4_4.png",text: "裁判工作台",customIcon: false,pagePath: "/pages/referee/index",},{iconPath: "/static/img/Navigation5.png",selectedIconPath: "/static/img/Navigation5_5.png",text: "我的",customIcon: false,pagePath: "/pages/center/center",},]
    

    .悬浮底部样式

    .btn-bar {position: fixed;bottom: 0;left: 0;width: 100%;height: 130rpx;background-color: #ffffff;box-shadow: 0 0 36rpx 0 rgba(0, 0, 0, 0.08);display: flex;justify-content: space-between;align-items: center;padding: 0 24rpx;z-index: 9999;
    }
    
http://www.whsansanxincailiao.cn/news/31992654.html

相关文章:

  • 住房建设厅网站/全网营销推广怎么做
  • 免费的带货视频素材网站/百度指数与百度搜索量
  • 公司做小程序要多少钱/快手seo关键词优化
  • 网站群建设情况/宁德市中医院
  • office做的网站/免费域名注册二级域名
  • wordpress测试数据/杭州网站优化方案
  • 做视频网站要多大的主机/爱站网seo综合查询工具
  • 品牌型网站/百度收录查询工具官网
  • qq网站代码/开发软件app需要多少钱
  • 网站群建设方案/石家庄seo顾问
  • 佛山网站建设联系电话/宁波网站推广
  • 深圳注册公司需要哪些材料和流程/宜昌seo
  • 程序员做个网站要多少钱呢/友情链接平台哪个好
  • 昆明如何做百度的网站/seo外包服务方案
  • 宁乡电商网站建设报价/林哥seo
  • 凡客vancl的网站标题/最新百度快速排名技术
  • 外贸营销型网站建设多少钱/百度账号查询
  • 网站建设怎么做/天堂网长尾关键词挖掘网站
  • 广州十度网络网站开发最好/深圳sem优化
  • 聊城做网站好的公司/google谷歌搜索引擎
  • 从网站优化之角度出发做网站策划/站长统计网站大全
  • 网站建设公司每年可以做多少个网站/百度一下你就知道 官网
  • 网页美工设计说明/搜索排名优化软件
  • 武汉做网站价格/网站开发培训
  • 网页设计与网站建设课程设计/优书网
  • 中卫平面设计师招聘/上海搜索引擎优化公司排名
  • 为什么都用dw做网站/重庆森林在线观看
  • 西宁网站建设模板/2022百度seo优化工具
  • 在线网站建设培训班/青岛网站推广公司
  • 南昌手机网站建设/互动营销成功案例