uniapp自定义tabbar

<view class="footer">
			<view class="list" @click="tar(1,'/pages/home/home')">
				<image
					:src="page == 1 ?url+'/uploads/20231103/590a63312af28aded880a609c1b0f316.png':url+'/uploads/20231103/58b703f125cb0cdcd4ea87665fe6c5db.png'"
					mode=""></image>
				<p :class="page == 1 ? 'page' :'pages'">首页</p>
			</view>
			<view class="list" @click="tar(2,'/intro/intro')">
				<image
					:src="page == 2 ?url+'/uploads/20231103/e50897e71cd469f4833b7669007265ec.png':url+'/uploads/20231103/7f70268dc88242e4e3ae574d84a3cb6e.png'"
					mode=""></image>
				<p :class="page == 2 ? 'page' :'pages'">攻略</p>
			</view>
			<view class="lists">
				<view class="arount">
					<view class="rount">
						<image :class="status == true ? 'rockets' : 'rocket' " @click="rocket"
							:src="url+'/uploads/20231103/e774ff4e386bf2f88b4d2ac96c963250.png'" mode=""></image>
					</view>
					<p>发布</p>
				</view>
			</view>
			<view class="list" @click="tar(3,'/charts/charts')">
				<image
					:src="page == 3 ?url+'/uploads/20231103/06b506537b3d6e23441278555f51a4c9.png':url+'/uploads/20231103/8fc440c437908095de05c1b069f2b264.png'"
					mode=""></image>
				<p :class="page == 3 ? 'page' :'pages'">排行榜</p>
			</view>
			<view class="list" @click="tar(4,'/charts/charts')">
				<image
					:src="page == 4 ?url+'/uploads/20231103/852882a6a3dc026029085419860a6e59.png':url+'/uploads/20231103/2fd39d16812070f766c13e07422d7720.png'"
					mode=""></image>
				<p :class="page == 4 ? 'page' :'pages'">我的</p>
			</view>
		</view>
export default {
		data() {
			return {
				page: getApp().globalData.page,
			}
		}
	}
/* 底部导航栏 */
	.footer {
		width: 100%;
		display: flex;
		justify-content: space-between;
		background-color: #ffffff;
		height: 100rpx;
		position: fixed;
		bottom: 0px;
		align-items: center;
	}

	.list {
		width: 23%;
		display: flex;
		justify-content: space-evenly;
		align-items: center;
		flex-wrap: wrap;
	}

	.pages {
		width: 100%;
		text-align: center;
		font-size: 10px;
	}

	.page {
		width: 100%;
		text-align: center;
		color: red;
		font-size: 10px;
	}

	.list image {
		width: 40rpx;
		height: 40rpx;
	}

	.rount {
		width: 120rpx;
		height: 120rpx;
		border-radius: 100px;
		background-color: #ffffff;
		display: flex;
		justify-content: center;
		align-items: center;
		box-shadow: 1px 1px 2px 1px #f9f9f9, -1px -1px 2px 1px #f9f9f9;
	}

	.rocket {
		width: 80%;
		height: 6vh;
		margin-bottom: 10rpx;
		transition: all 1s;
	}

	.rockets {
		width: 80%;
		height: 6vh;
		margin-bottom: 200vh;
		transition: all 1s;
	}

	.arount {
		margin-bottom: 90rpx;
		text-align: center;
	}

	.arount p {
		margin-top: 10rpx;
	}

  • 9
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

TechWhiz-晓同

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值