Commit acf175cdb553419be046e92b29c8d2f534342851
Merge branch 'dev' into 'test'
自定义导航的显示,小程序优化 See merge request !366
Showing
3 changed files
with
8 additions
and
6 deletions
components/diy_nav/diy_nav.wxml
| @@ -3,11 +3,11 @@ | @@ -3,11 +3,11 @@ | ||
| 3 | <block wx:if="{{object.style==1}}"> | 3 | <block wx:if="{{object.style==1}}"> | 
| 4 | <view class="{{object.seticon==1?'big':object.seticon==2?'big_one_two':'big_border_three'}}"> | 4 | <view class="{{object.seticon==1?'big':object.seticon==2?'big_one_two':'big_border_three'}}"> | 
| 5 | <block wx:for="{{nav_list}}"> | 5 | <block wx:for="{{nav_list}}"> | 
| 6 | - <navigator url="{{item.wxapp_url}}" class="s1_gk_a1" | 6 | + <navigator style="width:{{100/nav_list.length}}%;" url="{{item.wxapp_url}}" class="s1_gk_a1" | 
| 7 | wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}"> | 7 | wx:if="{{g_filter.has_char(item.wxapp_url,'plugin')>=0}}"> | 
| 8 | <include src="diy_nav_part1.wxml" /> | 8 | <include src="diy_nav_part1.wxml" /> | 
| 9 | </navigator> | 9 | </navigator> | 
| 10 | - <view data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url" wx:else> | 10 | + <view style="width:{{100/nav_list.length}}%;" data-url="{{item.wxapp_url}}" class="s1_gk_a1" bindtap="go_url" wx:else> | 
| 11 | <include src="diy_nav_part1.wxml" /> | 11 | <include src="diy_nav_part1.wxml" /> | 
| 12 | </view> | 12 | </view> | 
| 13 | </block> | 13 | </block> | 
components/diy_nav/diy_nav.wxss
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | height: auto; | 7 | height: auto; | 
| 8 | margin: 0rpx auto; | 8 | margin: 0rpx auto; | 
| 9 | text-align: center; | 9 | text-align: center; | 
| 10 | + display: flex; | ||
| 10 | } | 11 | } | 
| 11 | 12 | ||
| 12 | .s1_gk_a1 { | 13 | .s1_gk_a1 { | 
| @@ -47,8 +48,8 @@ | @@ -47,8 +48,8 @@ | ||
| 47 | /* 图片2的大框 */ | 48 | /* 图片2的大框 */ | 
| 48 | 49 | ||
| 49 | .big_one_two { | 50 | .big_one_two { | 
| 50 | - display: inline-block; | ||
| 51 | - /* display: flex; */ | 51 | + /* display: inline-block; */ | 
| 52 | + display: flex; | ||
| 52 | width: 100%; | 53 | width: 100%; | 
| 53 | min-height: 122rpx; | 54 | min-height: 122rpx; | 
| 54 | height: auto; | 55 | height: auto; | 
| @@ -92,8 +93,9 @@ | @@ -92,8 +93,9 @@ | ||
| 92 | 93 | ||
| 93 | .big_border_three { | 94 | .big_border_three { | 
| 94 | display: flex; | 95 | display: flex; | 
| 95 | - widows: 100%; | 96 | + width: 100%; | 
| 96 | height: 108rpx; | 97 | height: 108rpx; | 
| 98 | + | ||
| 97 | } | 99 | } | 
| 98 | 100 | ||
| 99 | /* 图片的边框 */ | 101 | /* 图片的边框 */ | 
components/diy_nav/diy_nav_part1.wxml
| 1 | - <view style='width:{{100/nav_list.length}}%;background-color: {{item.bgcolor}};' | 1 | + <view style='width:100%; background-color: {{item.bgcolor}};' | 
| 2 | class="{{object.seticon==1?'big_view_one':object.seticon==2?'big_view_two':'bicder_picture'}}"> | 2 | class="{{object.seticon==1?'big_view_one':object.seticon==2?'big_view_two':'bicder_picture'}}"> | 
| 3 | <block wx:if="{{item.navicon==null}}"> | 3 | <block wx:if="{{item.navicon==null}}"> | 
| 4 | <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | 4 | <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | 
