diff --git a/dist/tab/index.wxml b/dist/tab/index.wxml index 8b6fd6f9..628d1a60 100644 --- a/dist/tab/index.wxml +++ b/dist/tab/index.wxml @@ -1,7 +1,11 @@ <template name="zan-tab"> <view class="zan-tab"> <block wx:if="{{tab.scroll}}"> - <scroll-view class="zan-tab__bd zan-tab__bd--scroll {{fixed ? 'zan-tab__bd--fixed' : ''}}" scroll-x="true"> + <scroll-view + class="zan-tab__bd zan-tab__bd--scroll {{ fixed ? 'zan-tab__bd--fixed' : '' }}" + scroll-x="true" + style="height: {{ tab.height ? tab.height + 'px' : 'auto' }}" + > <template is="zan-tab-list" data="{{ tab, componentId }}"></template> </scroll-view> </block> diff --git a/example/tab/index.js b/example/tab/index.js index 691f5a80..3fce2d04 100644 --- a/example/tab/index.js +++ b/example/tab/index.js @@ -43,7 +43,8 @@ Page(Object.assign({}, Zan.Tab, { title: '最新商品6' }], selectedId: '1', - scroll: true + scroll: true, + height: 45 }, tab3: { list: [{ @@ -66,7 +67,8 @@ Page(Object.assign({}, Zan.Tab, { title: '商品6' }], selectedId: '1', - scroll: true + scroll: true, + height: 45 } },