Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mui
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mui
Commits
5796b579
Commit
5796b579
authored
Jan 03, 2015
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input页面使用模板机制
parent
59d5dde2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
41 deletions
+20
-41
examples/hello-mui/examples/inputs.html
examples/hello-mui/examples/inputs.html
+1
-9
examples/hello-mui/index-menu.html
examples/hello-mui/index-menu.html
+13
-27
examples/hello-mui/list.html
examples/hello-mui/list.html
+6
-5
No files found.
examples/hello-mui/examples/inputs.html
View file @
5796b579
...
@@ -16,19 +16,10 @@
...
@@ -16,19 +16,10 @@
background-color
:
#efeff4
;
background-color
:
#efeff4
;
}
}
</style>
</style>
<script>
mui
.
init
();
</script>
</head>
</head>
<body>
<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"
>
<div
class=
"mui-content-padded"
style=
"margin: 5px;"
>
<div
class=
"mui-content-padded"
style=
"margin: 5px;"
>
<h5>
默认搜索框:
</h5>
<h5>
默认搜索框:
</h5>
<div
class=
"mui-input-row mui-search"
>
<div
class=
"mui-input-row mui-search"
>
...
@@ -81,6 +72,7 @@
...
@@ -81,6 +72,7 @@
}
}
</style>
</style>
<script>
<script>
mui
.
init
();
//语音识别完成事件
//语音识别完成事件
document
.
getElementById
(
"
search
"
).
addEventListener
(
'
recognized
'
,
function
(
e
)
{
document
.
getElementById
(
"
search
"
).
addEventListener
(
'
recognized
'
,
function
(
e
)
{
console
.
log
(
e
.
detail
.
value
);
console
.
log
(
e
.
detail
.
value
);
...
...
examples/hello-mui/index-menu.html
View file @
5796b579
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</a>
</a>
</li>
</li>
<li
class=
"mui-table-view-cell"
>
<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)
输入框(input)
</a>
</a>
</li>
</li>
...
@@ -92,34 +92,20 @@
...
@@ -92,34 +92,20 @@
})
})
mui
(
'
.mui-table-view
'
).
on
(
'
tap
'
,
'
a
'
,
function
()
{
mui
(
'
.mui-table-view
'
).
on
(
'
tap
'
,
'
a
'
,
function
()
{
var
id
=
this
.
getAttribute
(
"
href
"
);
var
id
=
this
.
getAttribute
(
"
href
"
);
var
type
=
this
.
getAttribute
(
"
open-type
"
);
if
(
subWebview
==
null
)
{
if
(
type
==
"
common
"
){
template
=
plus
.
webview
.
getWebviewById
(
"
default-main
"
);
mui
.
openWindow
({
subWebview
=
template
.
children
()[
0
];
id
:
id
,
}
url
:
this
.
href
,
//判断是否显示右上角menu图标;
styles
:{
var
showMenu
=
~
id
.
indexOf
(
'
popovers.html
'
)?
true
:
false
;
zindex
:
2
var
title
=
this
.
innerText
;
},
mui
.
fire
(
template
,
'
updateHeader
'
,{
title
:
title
,
showMenu
:
showMenu
});
waiting
:{
if
(
subWebview
.
getURL
()
==
this
.
href
){
autoShow
:
false
subWebview
.
show
();
}
});
}
else
{
}
else
{
if
(
subWebview
==
null
)
{
subWebview
.
loadURL
(
this
.
href
);
template
=
plus
.
webview
.
getWebviewById
(
"
default-main
"
);
subWebview
=
template
.
children
()[
0
];
}
//判断是否显示右上角menu图标;
var
showMenu
=
~
id
.
indexOf
(
'
popovers.html
'
)?
true
:
false
;
var
title
=
this
.
innerText
;
mui
.
fire
(
template
,
'
updateHeader
'
,{
title
:
title
,
showMenu
:
showMenu
});
if
(
subWebview
.
getURL
()
==
this
.
href
){
subWebview
.
show
();
}
else
{
subWebview
.
loadURL
(
this
.
href
);
}
template
.
show
(
'
slide-in-right
'
,
150
);
}
}
template
.
show
(
'
slide-in-right
'
,
150
);
});
});
/**
/**
...
...
examples/hello-mui/list.html
View file @
5796b579
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
</a>
</a>
</li>
</li>
<li
class=
"mui-table-view-cell"
>
<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(输入框)
input(输入框)
</a>
</a>
</li>
</li>
...
@@ -193,10 +193,10 @@
...
@@ -193,10 +193,10 @@
media list(图文列表)
media list(图文列表)
</a>
</a>
</li>
</li>
<!--<li class="mui-table-view-cell">
<!--<li class="mui-table-view-cell">
<a class="mui-navigate-right" open-type='common' href="examples/modals.html">
<a class="mui-navigate-right" open-type='common' href="examples/modals.html">
modal(弹出窗口)
modal(弹出窗口)
</a>
</a>
</li>-->
</li>-->
<li
class=
"mui-table-view-cell"
>
<li
class=
"mui-table-view-cell"
>
<a
class=
"mui-navigate-right"
open-type=
"common"
href=
"examples/nav.html"
>
<a
class=
"mui-navigate-right"
open-type=
"common"
href=
"examples/nav.html"
>
...
@@ -549,6 +549,7 @@
...
@@ -549,6 +549,7 @@
e
.
detail
.
gesture
.
preventDefault
();
e
.
detail
.
gesture
.
preventDefault
();
});
});
//监听右滑事件,若侧滑菜单未显示,右滑要显示菜单;
//监听右滑事件,若侧滑菜单未显示,右滑要显示菜单;
window
.
addEventListener
(
"
swiperight
"
,
function
(
e
)
{
window
.
addEventListener
(
"
swiperight
"
,
function
(
e
)
{
//默认滑动角度在-45度到45度之间,都会触发右滑菜单,为避免误操作,可自定义限制滑动角度;
//默认滑动角度在-45度到45度之间,都会触发右滑菜单,为避免误操作,可自定义限制滑动角度;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment