请问switch也是滑动事件吗与swipe有什么区别
function switchPage(_event, _active, _target) {
/**
- 目标页面展示
- http://www.html5plus.org/doc/zh_cn/webview.html#plus.webview.WebviewObject.show
*/
subWvs[_target].show("fade-in");
// 顶部文字替换
title.innerText = labels[_target].innerText;
// 如果是滑动事件,则手动切换高亮选项;
if(_event == "switch") {
tabs[_active].classList.remove("mui-active");
tabs[_target].classList.add("mui-active");
}
// 之前展示的页面隐藏
subWvs[_active].hide("none");
// 更新当前页索引
activeIndex = _target;
}
1 个回复
Trust - 少说废话
switch是开关事件,不是手势事件。
Mui内置的[手势事件]()。