uniapp 放大中间图标

方法1:使用css

复制代码
/*样式直接复制到项目的App.vue即可*/

.uni-tabbar {
/*.uni-tabbar__item:nth-last-child(3) 修改倒数第三个 也就是中间的图标 我这边底部栏是五个*/
		.uni-tabbar__item:nth-last-child(3) {
			.uni-tabbar__bd {
			/*.uni-tabbar__icon 去掉原图标大小,强制为自适应宽高*/
				.uni-tabbar__icon {
					width: auto !important;
					height: auto !important;
				}
				/*图标大小 !important 强制覆盖*/
				img {
					height: 70rpx !important;
					width: 70rpx !important;
				}
			}
		}
	}

方法2:配置midButton(和tabbar中list同级)

复制代码
"midButton": {
            "width": "48px",
            "height": "48px",
            "text": "",
            "iconPath": "static/tabbar/home-s.png",
            "iconWidth": "48px",
        }

 API放在一个app.vue的页面内就好了。url里填写你要跳转的路径。

uni.onTabBarMidButtonTap(()=>{

                       uni.navigateTo({

                        url: '/pages/card/card'

                       });

                    })

官网资料:uni-app官网

相关推荐
云水一下1 小时前
从零开始!VMware安装Fedora Workstation 44桌面系统完整教程
前端
小码哥_常2 小时前
安卓黑科技:实现多平台商品详情页一键跳转APP
前端
killerbasd2 小时前
还是迷茫 5.3
前端·react.js·前端框架
不会敲代码13 小时前
TCP/IP 与前端性能:从数据包到首次渲染的底层逻辑
前端·tcp/ip
kyriewen3 小时前
奥特曼借GPT-5.5干杯,而你的Copilot正按Token收钱
前端·github·openai
AC赳赳老秦3 小时前
投标合规提效:用 OpenClaw 实现标书 / 合同自动审核、关键词校验、格式优化,降低废标风险
开发语言·前端·python·eclipse·emacs·deepseek·openclaw
kyriewen4 小时前
代码写成一锅粥?3个设计模式让你的项目“起死回生”
前端·javascript·设计模式
不会敲代码14 小时前
从零搭建 AI 日记助手:用 Milvus 向量数据库实现语义搜索
javascript·openai
千寻girling4 小时前
《 Git 详细教程 》
前端·后端·面试
threelab5 小时前
Three.js UV 图像变换效果 | 三维可视化 / AI 提示词
javascript·人工智能·uv