Commit 5796b579 authored by hbcui1984's avatar hbcui1984

input页面使用模板机制

parent 59d5dde2
......@@ -16,19 +16,10 @@
background-color: #efeff4;
}
</style>
<script>
mui.init();
</script>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">输入框(Input)</h1>
</header>
<div class="mui-content">
<div class="mui-content-padded" style="margin: 5px;">
<h5>默认搜索框:</h5>
<div class="mui-input-row mui-search">
......@@ -81,6 +72,7 @@
}
</style>
<script>
mui.init();
//语音识别完成事件
document.getElementById("search").addEventListener('recognized', function(e) {
console.log(e.detail.value);
......
......@@ -55,7 +55,7 @@
</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right" open-type="common" href="examples/inputs.html">
<a class="mui-navigate-right" href="examples/inputs.html">
输入框(input)
</a>
</li>
......@@ -92,19 +92,6 @@
})
mui('.mui-table-view').on('tap', 'a', function() {
var id = this.getAttribute("href");
var type = this.getAttribute("open-type");
if(type=="common"){
mui.openWindow({
id: id,
url: this.href,
styles:{
zindex:2
},
waiting:{
autoShow:false
}
});
}else{
if (subWebview == null) {
template = plus.webview.getWebviewById("default-main");
subWebview = template.children()[0];
......@@ -119,7 +106,6 @@
subWebview.loadURL(this.href);
}
template.show('slide-in-right', 150);
}
});
/**
......
......@@ -145,7 +145,7 @@
</a>
</li>
<li class="mui-table-view-cell">
<a class="mui-navigate-right" open-type="common" href="examples/inputs.html">
<a class="mui-navigate-right" href="examples/inputs.html">
input(输入框)
</a>
</li>
......@@ -549,6 +549,7 @@
e.detail.gesture.preventDefault();
});
//监听右滑事件,若侧滑菜单未显示,右滑要显示菜单;
window.addEventListener("swiperight",function (e) {
//默认滑动角度在-45度到45度之间,都会触发右滑菜单,为避免误操作,可自定义限制滑动角度;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment