结合APEX组件的分页器实现点击后切换页面的部分内容的功能
1.引入各个页面
将各个页面与分页器部分进行数据联动
<import name="voice" src="../voice/index.ux"></import>
<import name="signIn" src="../signIn/index.ux"></import>
<import name="writing" src="../Writing/index.ux"></import>
<import name="clockIn" src="../ClockIn/index.ux"></import>
<import name="shooting" src="../Shooting/index.ux"></import>
<import name="my-button" src="apex-ui/components/button/index"></import>
<import name="my-segmented-control" src="apex-ui/components/segmented-control/index.ux"></import>
..........
..........
<my-segmented-control class="body-title" theme="energized" current="{{currentPage}}" values="{{ segments3 }}" onchange="changePage"></my-segmented-control>
<div>
<signIn if="{{currentPage===1}}"></signIn>
<voice if="currentPage===0"></voice>
<clockIn if="currentPage===2"></clockIn>
<writing if="currentPage===3"></writing>
<shooting if="currentPage===4"></shooting>
</div>
......
实现具体功能
然后就完成了 具体要实现的功能在各个页面编写就🆗了