index.wxml 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. <wxs src="../../../utils/nova.wxs" module="nova" />
  2. <!-- 导航:预加载各类导航组件并设置TAB显示对应关系 -->
  3. <view class="{{active == 0 ? 'indexPage' : '' }}">
  4. <block wx:for="{{tabbarList.list}}" wx:key="index" wx:item="item">
  5. <view wx:if="{{active == index ? true:false}}">
  6. <block wx:if="{{nova.novapath(item,'module')=='comp'}}">
  7. <template is="{{nova.novapath(item,'tag')}}" data="{{ ...{id:index},...{isInit:isInit},...{options: nova.novapath(item,'params')} }}" />
  8. </block>
  9. </view>
  10. </block>
  11. </view>
  12. <template name="nova-homestay">
  13. <homestay id="comp{{id}}" />
  14. </template>
  15. <template name="nova-collect">
  16. <collect id="comp{{id}}" />
  17. </template>
  18. <template name="nova-my">
  19. <my id="comp{{id}}" />
  20. </template>
  21. <!-- 底部导航 -->
  22. <van-tabbar
  23. class="custom-tabbar" active="{{ active }}" bind:change="onChange" active-color="{{tabbarList.activeColor || '#000000'}}" inactive-color="{{tabbarList.inactiveColor || '#999'}}" z-index="99">
  24. <block wx:for="{{tabbarList.list}}" wx:key="index">
  25. <van-tabbar-item wx:if="{{item.open}}" name="{{index}}">
  26. <image slot="icon" src="{{ item.iconPath }}" mode="aspectFit" style="width:40rpx;height:40rpx;" />
  27. <image class="active" slot="icon-active" src="{{ item.selectedIconPath }}" mode="aspectFit" style="width:100rpx;height:100rpx;" />
  28. <view slot="icon">{{item.text}}</view>
  29. </van-tabbar-item>
  30. </block>
  31. </van-tabbar>