index.wxml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  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-home">
  13. <home id="comp{{id}}" />
  14. </template>
  15. <template name="nova-circle">
  16. <!-- <cart id="comp{{id}}" take="{{takeAddress}}" give="giveAddress" /> -->
  17. <circle id="comp{{id}}" />
  18. </template>
  19. <template name="nova-my">
  20. <my id="comp{{id}}" />
  21. </template>
  22. <!-- 底部导航 -->
  23. <van-tabbar
  24. class="custom-tabbar" active="{{ active }}" bind:change="onChange" active-color="{{tabbarList.activeColor || '#000000'}}" inactive-color="{{tabbarList.inactiveColor || '#999'}}" z-index="99">
  25. <block wx:for="{{tabbarList.list}}" wx:key="index">
  26. <van-tabbar-item wx:if="{{item.open}}" name="{{index}}">
  27. <image slot="icon" src="{{ item.iconPath }}" mode="aspectFit" style="width:40rpx;height:40rpx;" />
  28. <image class="active" slot="icon-active" src="{{ item.selectedIconPath }}" mode="aspectFit" style="width:100rpx;height:100rpx;" />
  29. <view slot="icon">{{item.text}}</view>
  30. </van-tabbar-item>
  31. </block>
  32. </van-tabbar>