dcloudio / dcloudio/uni-app

通过pages.json配置的顶部导航栏按钮,设定按钮宽度为固定值后,在H5上按钮文字没有居中对齐

Open
#2,274 0 comments 0 reactions 0 assignees View on GitHub
h5 提供了复现方案
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

**问题描述**
通过pages.json配置的顶部导航栏按钮,设定按钮宽度为固定值后,在H5上按钮文字没有居中对齐

**复现步骤**
[复现问题的步骤]
1. 启动 '...'
2. 点击 '....'
3. 查看

```
"style": {
"navigationBarTitleText": "示例",
"h5": {
"titleNView": {
"buttons": [{
"text": "文字按钮",
"float": "right",
"fontSize": "16px",
"width": "74px"
}]
}
},
```

**预期结果**
按钮文字居然中对齐

**实际结果**
按钮文字靠左对齐

**系统信息:**
- 发行平台: [如 微信小程序、H5平台、5+ App等]
- 操作系统 [如 iOS 12.1.2、Android 7.0]
- HBuilderX版本 [如使用HBuilderX,则需提供 HBuilderX 版本号]
- uni-app版本 [如使用Vue-cli创建/运行项目,则提供`npm run info`的运行结果]
- 设备信息 [如 iPhone8 Plus]

**补充信息**
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.