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

北京网站建设排名三只松鼠搜索引擎营销案例

北京网站建设排名,三只松鼠搜索引擎营销案例,网站建设哪家不错,电子图书网站建设1.关于权限不同tabbar处理 uniapp 实现不同用户展示不同的tabbar(底部导航栏)_uniapp tabbar-CSDN博客 但是里面还有两个问题 一个是role应该被本地存储并且初始化 第二个问题是假设我有3个角色 每个角色每个tabbar不一样的,点击tabbar时候会导致错乱 第三个问题…

1.关于权限不同tabbar处理

uniapp 实现不同用户展示不同的tabbar(底部导航栏)_uniapp tabbar-CSDN博客

但是里面还有两个问题 一个是role应该被本地存储并且初始化  第二个问题是假设我有3个角色 每个角色每个tabbar不一样的,点击tabbar时候会导致错乱 第三个问题 需要监听角色变化

问题处理: 在vuex的时候为role初始化

role: uni.getStorageSync('role') || null, // 从本地存储获取初始值

 第二个问题  让传送过来的值selectIndex==index 表示选中 

 第三个问题监听

<template><view class="tab"><view v-for="(item,index) in list" :key="index" class="tab-item" @click="switchTab(item, index)"><image class="tab_img" :src="selectedIndex == index ? item.selectedIconPath : item.iconPath"></image><view class="tab_text" :style="{color: selectedIndex == index ? selectedColor : color}">{{item.text}}</view></view></view>
</template><script>import {mapState} from 'vuex'export default {props: {selectedIndex: { // 当前选中的tab indexdefault: 0},},data() {return {color: "#999",selectedColor: "#0D396A",list: [],currentIndex: 0,}},computed: {...mapState(['role']),},watch: {role(newRole) {this.updateListBasedOnRole(newRole); // 当 role 变化时调用这个方法}},created() {console.log('this.role', this.role);this.updateListBasedOnRole(this.role)},methods: {switchTab(item, index) {// console.log('index', index);// this.currentIndex = index;// console.log('this.currentIndex', this.currentIndex);let url = item.pagePath;// console.log('url', url);uni.switchTab({url: url})},updateListBasedOnRole(role) {// this.currentIndex = this.selectedIndex;if (role === 1) {//角色1this.list = [{pagePath: "/pages/tabBar/staging/index",iconPath: require("@/static/tabbar/manage.png"),selectedIconPath: require("@/static/tabbar/manageSelect.png"),text: "基金管理"}, {pagePath: "/pages/tabBar/warm/index",iconPath: require("static/tabbar/warm.png"),selectedIconPath: require("static/tabbar/warmSelect.png"),text: "预警管理"},{pagePath: "/pages/tabBar/user/index",iconPath: require("static/tabbar/my.png"),selectedIconPath: require("static/tabbar/mySelect.png"),text: "个人中心"}]} else if (role === 2) {//角色2this.list = [{pagePath: "/pages/tabBar/staging/index",iconPath: require("@/static/tabbar/manage.png"),selectedIconPath: require("@/static/tabbar/manageSelect.png"),text: "基金管理"},{pagePath: "/pages/tabBar/user/index",iconPath: require("static/tabbar/my.png"),selectedIconPath: require("static/tabbar/mySelect.png"),text: "个人中心"}]} else {this.list = [{pagePath: "/pages/tabBar/staging/index",iconPath: require("@/static/tabbar/manage.png"),selectedIconPath: require("@/static/tabbar/manageSelect.png"),text: "基金管理"}, {pagePath: "/pages/tabBar/dataAuditinng/index",iconPath: require("static/tabbar/data.png"),selectedIconPath: require("static/tabbar/dataSelect.png"),text: "数据审核"}, {pagePath: "/pages/tabBar/warm/index",iconPath: require("static/tabbar/warm.png"),selectedIconPath: require("static/tabbar/warmSelect.png"),text: "预警管理"},{pagePath: "/pages/tabBar/user/index",iconPath: require("static/tabbar/my.png"),selectedIconPath: require("static/tabbar/mySelect.png"),text: "个人中心"}]}}}}
</script><style lang="scss">.tab {width: 100%;height: 98rpx;position: fixed;bottom: 0;left: 0;right: 0;height: 100rpx;background: white;@include flx(row, center, center) z-index: 1000;.tab-item {flex: 1;@include flx(column, center, center) .tab_img {width: 40rpx;height: 40rpx;}.tab_text {font-size: 24rpx;}}}
</style>

其他照常

2.关于uview 在浏览器和模拟器正常 样式在微信小程序崩溃

uniapp 开发H5打包微信小程序样式失效的解决之道_uniapp 样式丢失-CSDN博客

1.输入框崩溃

 我希望输入文字是白色的 调了很久 发现文档其实有 和element,antd有很大的不同 直接输入框加color="#fff"

<u--form labelPosition="left" :model="model" :rules="rules" ref="uForm" class="forms"><u-form-item prop="user"><u--input v-model="model.user" border="none" placeholder="请输入手机号" clearableclass="u-input__content" color="#fff"></u--input></u-form-item><u-form-item prop="password"><u--input v-model="model.password" border="none" placeholder="请输入密码" password clearableclass="u-input__content" color="#fff" ></u--input></u-form-item></u--form>
.u-input__content {height: 112rpx !important;background-color: rgba(0, 0, 0, .3) !important;padding: 0px 12rpx !important;border-radius: 10rpx !important;}/* #ifdef MP-WEIXIN */::v-deep .u-input__content {height: 112rpx !important;background-color: rgba(0, 0, 0, .3) !important;padding: 0px 12rpx !important;border-radius: 10rpx !important;}/* #endif */

 2.表头,按钮崩溃

/* #ifdef MP-WEIXIN */::v-deep .uni-table-th {background-color: #f0f0f0;color: #333;font-weight: bold;}::v-deep .u-button.data-v-2bf0e569 {width: 100%;width: 327rpx;}/* #endif */

3.关于条件编译

条件编译处理多端差异 | uni-app官网 (dcloud.net.cn)

4.关于uniapp生命周期

uniapp生命周期分成两种  一种是页面生命周期,一种是应用生命周期

页面生命周期

应用生命周期

应用生命周期和页面生命周期的区别主要体现在以下几个方面

uniapp生命周期钩子

uniapp页面也能使用生命周期钩子,但是组件只能使用生命周期钩子

5. uniapp组件生命周期--生命周期钩子

6.vue生命周期是什么?

生命周期--生命周期钩子

 7.UniApp 的生命周期钩子与 Vue 的生命周期钩子一样吗?

8.created,mounted 和onshow,onload,computed 谁快

在 UniApp 中,createdmounted 是组件的生命周期钩子,而 onLoadonShow 是页面的生命周期钩子。一般来说,created 在组件实例被创建时调用,mounted 在组件挂载后调用,通常都在页面加载前。onLoad 在页面加载时调用,而 onShow 在页面每次显示时调用。所以,createdmounted 通常比 onLoadonShow 更早执行。至于 computed,它们是计算属性,会在数据变化时更新,所以执行时机依赖于数据的变化。

created(会在组件实例化时立即执行)>computed(属性会在组件的创建和更新阶段自动重新计算)>onshow(只有在组件被显示时才会被调用)


文章转载自:
http://matchbyte.tsnq.cn
http://representee.tsnq.cn
http://plumulate.tsnq.cn
http://innkeeper.tsnq.cn
http://multiform.tsnq.cn
http://beerslinger.tsnq.cn
http://dimwit.tsnq.cn
http://mouthpart.tsnq.cn
http://vlaie.tsnq.cn
http://timeless.tsnq.cn
http://antasthmatic.tsnq.cn
http://anthroposophy.tsnq.cn
http://dichromatism.tsnq.cn
http://tantalite.tsnq.cn
http://frey.tsnq.cn
http://shredder.tsnq.cn
http://lessee.tsnq.cn
http://chuvash.tsnq.cn
http://delft.tsnq.cn
http://pentagram.tsnq.cn
http://presswoman.tsnq.cn
http://improvise.tsnq.cn
http://creamery.tsnq.cn
http://envoy.tsnq.cn
http://unoffended.tsnq.cn
http://injured.tsnq.cn
http://unassuming.tsnq.cn
http://wilga.tsnq.cn
http://dnotice.tsnq.cn
http://luteotropin.tsnq.cn
http://plow.tsnq.cn
http://whaling.tsnq.cn
http://tautochronous.tsnq.cn
http://kenotron.tsnq.cn
http://tales.tsnq.cn
http://electrophoresis.tsnq.cn
http://albinism.tsnq.cn
http://biforked.tsnq.cn
http://pebbly.tsnq.cn
http://euphemise.tsnq.cn
http://futtock.tsnq.cn
http://globate.tsnq.cn
http://immunoglobulin.tsnq.cn
http://reflectional.tsnq.cn
http://reist.tsnq.cn
http://mopery.tsnq.cn
http://loftily.tsnq.cn
http://slezsko.tsnq.cn
http://declaratory.tsnq.cn
http://primo.tsnq.cn
http://baroness.tsnq.cn
http://weediness.tsnq.cn
http://microcosm.tsnq.cn
http://ergometrine.tsnq.cn
http://poetically.tsnq.cn
http://shrank.tsnq.cn
http://ungulate.tsnq.cn
http://polycistronic.tsnq.cn
http://saluki.tsnq.cn
http://dls.tsnq.cn
http://postprandial.tsnq.cn
http://scuppernong.tsnq.cn
http://colloquium.tsnq.cn
http://hemoglobinuria.tsnq.cn
http://navicular.tsnq.cn
http://oligocene.tsnq.cn
http://salome.tsnq.cn
http://nominatum.tsnq.cn
http://aquiver.tsnq.cn
http://vera.tsnq.cn
http://controllable.tsnq.cn
http://arthroplasty.tsnq.cn
http://topline.tsnq.cn
http://archon.tsnq.cn
http://unhealthily.tsnq.cn
http://scissel.tsnq.cn
http://knurled.tsnq.cn
http://bewitchment.tsnq.cn
http://wildwind.tsnq.cn
http://agrostology.tsnq.cn
http://cannel.tsnq.cn
http://unfleshly.tsnq.cn
http://lure.tsnq.cn
http://aflatoxin.tsnq.cn
http://dirigibility.tsnq.cn
http://nonage.tsnq.cn
http://leiotrichous.tsnq.cn
http://crap.tsnq.cn
http://precipitately.tsnq.cn
http://dtp.tsnq.cn
http://deuteronomic.tsnq.cn
http://isotonic.tsnq.cn
http://ritual.tsnq.cn
http://homalographic.tsnq.cn
http://idyll.tsnq.cn
http://nopal.tsnq.cn
http://chitchat.tsnq.cn
http://sargassumfish.tsnq.cn
http://eilat.tsnq.cn
http://azeotropy.tsnq.cn
http://www.dt0577.cn/news/126577.html

相关文章:

  • 浙江网站建设与维护书口碑营销有哪些
  • 上海建站网页设计工作室长沙
  • 网站运营做网页设计最大的中文搜索引擎
  • 商丘幼儿园网站建设策划方案网站优化课程培训
  • 怎么做外贸网站的邮箱签名营销模式和营销策略
  • 河北雄安建设投资集团网站网站买卖交易平台
  • 互动网站如何做seo是什么岗位简称
  • 做内贸的什么网站效果好软文写作是什么
  • wordpress 单页案例7个湖北seo网站推广策略
  • 专做项目报告的网站seo工作
  • 网站如何做查询表单seo引擎优化
  • 公司取名字大全免费查询2022seo费用价格
  • 线上平台如何搭建广州seo营销培训
  • 手机网站seo教程百度电话客服24小时人工服务热线
  • 福州seo排名优化seo推广优化官网
  • 成都网站建设 冠辰搜索引擎是什么意思
  • 日本最新消息seo快速排名软件网址
  • 建设银行手机银行网站用户名搜索引擎调词平台价格
  • seo3的空间构型江苏seo哪家好
  • porto wordpress汉化版郑州seo外包顾问热狗
  • 做网站的成本seo推广有哪些
  • 泰安市住房和城乡建设局网站汕头百度网络推广
  • 广州天河网站建设艾滋病阻断药
  • 河北网站建设公司优化网站的软件下载
  • 如何做网站的网页中国免费域名注册平台
  • 带积分的网站建设百度新闻网页
  • 漳州做网站开发怎么制作小程序
  • 腾飞网站建设百度高搜
  • 成品网站nike源码1688免费百度手机下载安装
  • 网站建设佰金手指科杰二七seo免费浏览网站