几个功能模块都放在一个page内,用<view wx:if=“module(i)_show”>来控制各模块界面的显示。通过一个menu界面来修改module(i)_show变量值(true,false)。这样做下来,整个page代码较多。但切换速度还不错(这个估计跟底层渲染方式有关)。像这样设计一个page可行么?
代码架构如下:
<view wx:if=“module1_show” style=“height:100%;width:100%;”>
module1
</view>
<view wx:if=“module2_show” style=“height:100%;width:100%;”>
module2
</view>
<view wx:if=“module3_show” style=“height:100%;width:100%;”>
module3
</view>
<view wx:if=“module4_show” style=“height:100%;width:100%;”>
module4
</view>
---------------------[END]--------------------------