Hello Mui中的通过子webview选项卡切换的例子中,在底部导航有这样的写法:
<nav class="mui-bar mui-bar-tab">
<a id="defaultTab" class="mui-tab-item mui-active" href="tab-webview-subpage-about.html">
<span class="mui-icon mui-icon-home"></span>
<span class="mui-tab-label">首页</span>
</a>
<a class="mui-tab-item" href="tab-webview-subpage-chat.html">
<span class="mui-icon mui-icon-email"><span class="mui-badge">9</span></span>
<span class="mui-tab-label">消息</span>
</a>
<a class="mui-tab-item" href="tab-webview-subpage-contact.html">
<span class="mui-icon mui-icon-contact"></span>
<span class="mui-tab-label">通讯录</span>
</a>
<a class="mui-tab-item" href="tab-webview-subpage-setting.html">
<span class="mui-icon mui-icon-gear"></span>
<span class="mui-tab-label">设置</span>
</a>
</nav>
a标签使用href属性来传递要打开的页面,并通过webview来打开,没有触发href跳转,这个是如何实现的?我觉得这种做法非常好,避免在js中用硬编码的方式(比如var target = 'xx.html';)指定要跳转的页面好得多,但是我自己写的a标签会触发Href跳转,想了解一下原理 @DCloud_heavensoft @DCloud_MUI_CHB @DCloud_MUI_FXY
0 个回复