Skip to content

Commit 1899700

Browse files
committed
update: 修改标题图实现方式
1 parent 7bc63c8 commit 1899700

4 files changed

Lines changed: 23 additions & 29 deletions

File tree

‎pages.json‎

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -891,13 +891,15 @@
891891
"path": "nav-transparent/nav-transparent",
892892
"style": {
893893
"navigationBarTitleText": "透明渐变导航栏",
894-
"app-plus": {
895-
"titleNView": {
896-
"type": "transparent"
897-
}
898-
}
894+
"app-plus": {
895+
"titleNView": {
896+
"type": "transparent"
897+
}
898+
}
899899
}
900900
},
901+
// #endif
902+
// #ifdef APP-PLUS || H5
901903
{
902904
"path": "nav-button/nav-button",
903905
"style": {
@@ -916,25 +918,13 @@
916918
}
917919
},
918920
// #endif
919-
// #ifdef APP-PLUS
921+
// #ifdef APP-PLUS || H5 || MP-ALIPAY
920922
{
921923
"path": "nav-image/nav-image",
922924
"style": {
923-
"app-plus": {
924-
"titleNView": {
925-
"titleText": "",
926-
"tags": [{
927-
"tag": "img",
928-
"src": "/static/nav.png",
929-
"position": {
930-
"left": "auto",
931-
"top": "auto",
932-
"width": "110px",
933-
"height": "26px"
934-
}
935-
}]
936-
}
937-
}
925+
"navigationBarBackgroundColor": "#FFFFFF",
926+
"navigationBarTextStyle": "black",
927+
"titleImage": "https://img-cdn-qiniu.dcloud.net.cn/static/images/logo1@2x.png"
938928
}
939929
},
940930
// #endif
@@ -1211,4 +1201,4 @@
12111201
}
12121202
]
12131203
}
1214-
}
1204+
}

‎pages/tabBar/template/template.nvue‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@
3434
name: '多列选择 picker',
3535
url: 'mpvue-picker'
3636
},
37-
// #ifdef APP-PLUS || H5
37+
// #ifdef APP-PLUS || H5 || MP-ALIPAY
3838
{
3939
id: 'navbar',
4040
name: '顶部原生导航标题栏',
4141
open: false,
4242
pages: [
43-
43+
// #ifdef APP-PLUS || H5
4444
{
4545
name: '透明渐变样式',
4646
url: 'nav-transparent'
47-
}, {
47+
},
48+
{
4849
name: '导航栏带自定义按钮',
4950
url: 'nav-button'
5051
},
@@ -60,7 +61,8 @@
6061
name: '导航栏带搜索框',
6162
url: 'nav-search-input'
6263
},
63-
// #ifdef APP-PLUS
64+
// #endif
65+
// #ifdef APP-PLUS || H5 || MP-ALIPAY
6466
{
6567
name: '导航栏带图片',
6668
url: 'nav-image'

‎pages/template/nav-image/nav-image.vue‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<view class="uni-title">
66
<uni-icons size="16" type="info"></uni-icons>说明 : </view>
77
<view class="uni-helllo-text">
8-
<view>在App端可在pages.json里通过 style -> app-plus -> tags 配置,暂不支持动态改变tags的样式;常用于App首页顶部导航显示产品Logo</view>
8+
<view>在App端可在pages.json里通过 style -> titleImage 配置,支付宝小程序只支持https地址的图片,暂不支持动态改变;常用于App首页顶部导航显示产品Logo。</view>
9+
<view>在支付宝小程序里请使用真机调试查看效果。</view>
910
</view>
1011
</view>
1112
</view>
@@ -25,5 +26,5 @@
2526
</script>
2627

2728
<style>
28-
29+
2930
</style>

‎pages/template/nav-transparent/nav-transparent.vue‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<view class="uni-padding-wrap uni-common-mt">
1212
<view class="uni-title">
1313
<view>在App端默认为标题栏透明,当用户向下滚动时,标题栏逐渐由透明转变为不透明;当用户再次向上滚动时,标题栏又从不透明变为透明状态。</view>
14-
<view>在微信小程序端,导航栏始终为不透明样式。</view>
14+
<view>在微信小程序端,导航栏始终为不透明样式。</view>
15+
<!-- <view>在支付宝小程序里请使用真机调试查看效果。</view> -->
1516
</view>
1617
<view class="uni-title uni-common-mt">图片类型</view>
1718
</view>

0 commit comments

Comments
 (0)