微信小程序开发之选项卡(窗口顶部TabBar)页面切换

论坛 期权论坛     
选择匿名的用户   2021-5-31 09:55   798   0
<div class="content-detail markdown-body">
<p style="font-family:&#39;microsoft yahei&#39;;font-size:15px;color:rgb(85,85,85);"><span style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:24px;"><a class="replace_word" href="http://lib.csdn.net/base/wechat" style="text-decoration:none;color:rgb(66,133,244);font-size:16px;font-weight:bold;" title="微信开发知识库">微信</a>小程序开发中选项卡.在<a class="replace_word" href="http://lib.csdn.net/base/android" style="text-decoration:none;color:rgb(66,133,244);font-size:16px;font-weight:bold;" title="Android知识库">Android</a>中选项卡一般用fragment,到了小程序这里瞬间懵逼了.</span></p>
<p style="font-family:&#39;microsoft yahei&#39;;font-size:15px;color:rgb(85,85,85);"><span style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:24px;">总算做出来了.分享出来看看.</span></p>
<p style="font-family:&#39;microsoft yahei&#39;;font-size:15px;color:rgb(85,85,85);"><span style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:24px;">先看效果:</span></p>
<p style="font-family:&#39;microsoft yahei&#39;;font-size:15px;color:rgb(85,85,85);"><span style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:24px;"><img align="middle" alt="" src="https://beijingoptbbs.oss-cn-beijing.aliyuncs.com/cs/5606289-b253f01ff091006c1a06457051041f47" style="border:none;font-size:16px;"><br style="font-size:16px;"></span></p>
<p style="font-family:&#39;microsoft yahei&#39;;font-size:15px;color:rgb(85,85,85);"><span style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:24px;">再上代码:</span></p>
<p style="font-family:&#39;microsoft yahei&#39;;font-size:15px;color:rgb(85,85,85);"><span style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:24px;">1.index.wxml</span></p>
<p style="font-family:&#39;microsoft yahei&#39;;font-size:15px;color:rgb(85,85,85);"><span style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:24px;"></span></p>
<p style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:16px;color:rgb(51,51,51);"><strong>[html]</strong> <a class="ViewSource" href="http://blog.csdn.net/qq_31383345/article/details/52900835#" style="text-decoration:none;color:rgb(66,133,244);font-size:9px;background-image:url(&#34;images/default/ico_plain.gif&#34;);background-position:left top;background-repeat:no-repeat;border:none;width:16px;text-indent:-2000px;" title="view plain">view plain</a> <a class="CopyToClipboard" href="http://blog.csdn.net/qq_31383345/article/details/52900835#" style="text-decoration:none;color:rgb(66,133,244);font-size:9px;background-image:url(&#34;images/default/ico_copy.gif&#34;);background-position:left top;background-repeat:no-repeat;border:none;width:16px;text-indent:-2000px;" title="copy">copy</a></p>
<ol style="font-family:&#39;Helvetica Neue&#39;, Helvetica, &#39;PingFang SC&#39;, &#39;Hiragino Sans GB&#39;, &#39;Microsoft YaHei&#39;, &#39;微软雅黑&#39;, Arial, sans-serif;font-size:16px;border:none;color:rgb(92,92,92);"><li> <p><span style="border:none;color:rgb(0,0,0);"><span class="comments" style="border:none;color:rgb(0,130,0);">&lt;!--index.wxml--&gt;</span><span style="border:none;">  </span></span></p> </li><li> <p><span style="border:none;color:rgb(0,0,0);"><span class="tag" style="color:rgb(153,51,0);border:none;font-weight:bold;">&lt;</span><span class="tag-name" style="border:none;color:rgb(153,51,0);font-weight:bold;">view</span><span style="border:none;"> </span><span class="attribute" style="border:none;color:rgb(255,0,0);">class</span><span style="border:none;">&#61;</span><span class="attribute-value" style="border:none;color:rgb(0,0,255);">&#34;swiper-tab&#34;</span><span class="tag" style="color:rgb(153,51,0);border:none;font-weight:bold;">&gt;</span><span style="border:none;">  </span></span></p> </li><li> <p><span style="border:none;color:rgb(0,0,0);">    <span class="tag" style="color:rgb(153,51,0);border:none;font-weight:bold;">&lt;</span><span class="tag-name" style="border:none;color:rgb(153,51,0);font-weight:bold;">view</span><span style="border:none;"> </span><span class="attribute" style="border:none;color:rgb(255,0,0);">class</span><span style="border:none;">&#61;</span><span class="attribute-value" style="border:none;color:rgb(0,0,255);">&#34;swiper-tab-list {<!-- -->{currentTab&#61;&#61;0 ? &#39;on&#39; : &#39;&#39;}}&#34;</span><span style="border:none;"> </span><span class="attribute" style="border:none;color:rgb(255,0,0);">data-current</span><spa
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP