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
3f44ca3d
Commit
3f44ca3d
authored
Dec 05, 2014
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
android 4.0以下版本暂不支持透明webview遮罩
parent
dd8400e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
examples/hello-mui/index-menu.html
examples/hello-mui/index-menu.html
+5
-1
examples/hello-mui/index.html
examples/hello-mui/index.html
+18
-14
No files found.
examples/hello-mui/index-menu.html
View file @
3f44ca3d
...
...
@@ -78,8 +78,12 @@
</div>
<script
type=
"text/javascript"
charset=
"utf-8"
>
//关于backbutton和menubutton两个按键的说明,在iOS平台不存在,故需隐藏
if
(
!
mui
.
os
.
android
){
document
.
getElementById
(
"
android-only
"
).
style
.
display
=
"
none
"
;
var
span
=
document
.
getElementById
(
"
android-only
"
)
if
(
span
){
span
.
style
.
display
=
"
none
"
;
}
}
var
subWebview
=
null
,
template
=
null
,
index
=
null
;
mui
.
plusReady
(
function
()
{
...
...
examples/hello-mui/index.html
View file @
3f44ca3d
...
...
@@ -54,7 +54,9 @@
aniShow
:
'
none
'
}
});
//创建遮罩页面;
//创建遮罩页面,使用透明webview解决index页面、list页面创建div遮罩不同步的问题;
//android 4.0以下版本不支持透明webview,故4.0以下暂不遮罩;
if
(
mui
.
os
.
android
&&
parseFloat
(
mui
.
os
.
version
)
>
4.0
){
mask
=
mui
.
preload
({
id
:
"
index-mask
"
,
url
:
"
index-mask.html
"
,
...
...
@@ -66,6 +68,8 @@
popGesture
:
"
none
"
}
});
}
},
200
);
});
...
...
@@ -80,7 +84,7 @@
menu
.
show
();
//显示遮罩
setTimeout
(
function
()
{
mask
.
show
(
'
none
'
);
mask
&&
(
mask
.
show
(
'
none
'
)
);
},
150
);
//主窗体开始侧滑;
mui
.
currentWebview
.
setStyle
({
...
...
@@ -98,7 +102,7 @@
function
closeMenu
(){
if
(
showMenu
){
//关闭遮罩;
mask
.
hide
(
);
mask
&&
(
mask
.
hide
()
);
//主窗体开始侧滑;
mui
.
currentWebview
.
setStyle
({
left
:
showMenu
?
'
0
'
:
'
70%
'
,
...
...
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