开发者社区> 问答> 正文

开发钉钉小程序的时候,配置tabBar,但是在模拟器跟真机上字体显示都非常小,怎么解决,

代码:

image.png

效果:
image.png

展开
收起
游客3kppt33gxd47s 2024-06-21 12:00:25 22 0
1 条回答
写回答
取消 提交回答
  • 北京阿里云ACE会长

    在 app.json 文件的 globalStyle 字段中可以设置全局的样式,包括 tabBar 的样式。

    {
    "globalStyle": {
    "tabBar": {
    "fontSize": "16px", // 调整字体大小
    "textColor": "#dddddd",
    "selectedColor": "#49a9ee",
    "backgroundColor": "#ffffff"
    }
    },
    "tabBar": {
    "items": [
    {
    "pagePath": "pages/index/index",
    "name": "页面1"
    },
    {
    "pagePath": "pages/index2/index",
    "name": "页面2"
    }
    ]
    }
    }

    2024-06-23 09:06:31
    赞同 1 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
钉钉小程序——为工作方式插上翅膀 立即下载
钉钉客户端自动化的应用 立即下载
使命必达 —— 钉钉企业级 消息服务的机遇与挑战 立即下载