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
0dbd43c9
Commit
0dbd43c9
authored
Sep 05, 2014
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决二级选项卡点出菜单后,需要多次按返回才能关闭的问题
parent
3a48a5dd
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
dist/js/mui.js
dist/js/mui.js
+10
-11
dist/js/mui.min.js
dist/js/mui.min.js
+2
-2
examples/hello-mui/js/mui.min.js
examples/hello-mui/js/mui.min.js
+2
-2
No files found.
dist/js/mui.js
View file @
0dbd43c9
...
...
@@ -1072,7 +1072,6 @@ window.mui = mui;
* @param {object} options 可选:参数,等待,窗口,显示配置{params:{},waiting:{},styles:{},show:{}}
*/
$
.
openWindow
=
function
(
url
,
id
,
options
)
{
if
(
!
window
.
plus
)
{
return
;
}
...
...
@@ -2472,7 +2471,7 @@ window.mui = mui;
window
.
addEventListener
(
'
tap
'
,
function
(
e
)
{
var
targetTab
=
$
.
targets
[
name
]
;
var
targetTab
=
$
.
targets
.
tab
;
if
(
!
targetTab
)
{
return
;
}
...
...
@@ -2502,24 +2501,23 @@ window.mui = mui;
if
(
!
targetBody
)
{
return
;
}
//选项卡含二级菜单的情况,再次点击要隐藏子菜单
if
(
!
targetBody
.
classList
.
contains
(
CLASS_CONTROL_CONTENT
))
{
if
(
!
targetBody
.
classList
.
contains
(
CLASS_CONTROL_CONTENT
))
{
//tab bar popover
targetTab
.
classList
[
isLastActive
?
'
remove
'
:
'
add
'
](
className
);
return
;
}
if
(
isLastActive
)
{
//same
return
;
}
//隐藏之前显示内容区
activeBodies
=
targetBody
.
parentNode
.
getElementsByClassName
(
className
);
for
(
var
i
=
0
;
i
<
activeBodies
.
length
;
i
++
)
{
activeBodies
[
i
].
classList
.
remove
(
className
);
}
//显示目标内容区
targetBody
.
classList
.
add
(
className
);
var
contents
=
targetBody
.
parentNode
.
querySelectorAll
(
'
.
'
+
CLASS_CONTROL_CONTENT
);
//触发可拖动式选项卡的切换事件
$
.
trigger
(
targetBody
,
$
.
eventName
(
'
shown
'
,
name
),
{
tabNumber
:
Array
.
prototype
.
indexOf
.
call
(
contents
,
targetBody
)
})
...
...
@@ -3804,9 +3802,10 @@ window.mui = mui;
var
wobj
=
$
.
currentWebview
;
var
parent
=
wobj
.
parent
();
wobj
.
canBack
(
function
(
e
)
{
if
(
e
.
canBack
)
{
//webview history back
window
.
history
.
back
();
}
else
{
//webview close or hide
//by chb 暂时注释,在碰到类似popover之类的锚点的时候,需多次点击才能返回;
// if (e.canBack) {//webview history back
// window.history.back();
// } else {//webview close or hide
//TODO 会不会存在多层嵌套?如果存在需要递归找到最顶层
if
(
parent
)
{
wobj
=
parent
;
...
...
@@ -3830,7 +3829,7 @@ window.mui = mui;
//这个交给项目具体实现,框架暂不处理;
//plus.runtime.quit();
}
}
//
}
});
}
else
if
(
window
.
history
.
length
>
1
)
{
...
...
dist/js/mui.min.js
View file @
0dbd43c9
This diff is collapsed.
Click to expand it.
examples/hello-mui/js/mui.min.js
View file @
0dbd43c9
This diff is collapsed.
Click to expand it.
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