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
9550b51c
Commit
9550b51c
authored
Sep 05, 2014
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决web view版选项卡在iOS平台关闭再打开后,没有进入最后一次选项卡的问题
parent
0dbd43c9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
43 deletions
+40
-43
dist/js/mui.js
dist/js/mui.js
+9
-7
dist/js/mui.min.js
dist/js/mui.min.js
+1
-1
examples/hello-mui/examples/tab-with-segmented-control.html
examples/hello-mui/examples/tab-with-segmented-control.html
+1
-19
examples/hello-mui/examples/tab-with-viewpagerindicator.html
examples/hello-mui/examples/tab-with-viewpagerindicator.html
+1
-1
examples/hello-mui/js/mui.min.js
examples/hello-mui/js/mui.min.js
+1
-1
examples/hello-mui/list.html
examples/hello-mui/list.html
+27
-14
No files found.
dist/js/mui.js
View file @
9550b51c
...
...
@@ -3801,21 +3801,23 @@ window.mui = mui;
if
(
window
.
plus
)
{
var
wobj
=
$
.
currentWebview
;
var
parent
=
wobj
.
parent
();
if
(
parent
)
{
wobj
=
parent
;
}
wobj
.
canBack
(
function
(
e
)
{
//by chb 暂时注释,在碰到类似popover之类的锚点的时候,需多次点击才能返回;
// if (e.canBack) {//webview history back
// window.history.back();
// } else {//webview close or hide
//TODO 会不会存在多层嵌套?如果存在需要递归找到最顶层
if
(
parent
)
{
wobj
=
parent
;
}
var
opener
=
wobj
.
opener
();
if
(
opener
)
{
var
openerParent
=
opener
.
parent
();
if
(
openerParent
)
{
opener
=
openerParent
;
}
//by chb 暂不自动处理老页面的隐藏;
// var openerParent = opener.parent();
// if (openerParent) {
// opener = openerParent;
// }
if
(
wobj
.
preload
)
{
wobj
.
hide
(
"
auto
"
);
}
else
{
...
...
dist/js/mui.min.js
View file @
9550b51c
This diff is collapsed.
Click to expand it.
examples/hello-mui/examples/tab-with-segmented-control.html
View file @
9550b51c
...
...
@@ -41,7 +41,7 @@
</style>
<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"
>
Tab with segmented control
</h1>
<h1
class=
"mui-title"
>
按钮式选项卡
</h1>
</header>
<div
class=
"mui-content"
>
<div
id=
"segmentedControl"
class=
"mui-segmented-control"
>
...
...
@@ -67,12 +67,6 @@
<li
class=
"mui-table-view-cell"
>
第一个选项卡子项-3
</li>
<li
class=
"mui-table-view-cell"
>
第一个选项卡子项-4
</li>
<li
class=
"mui-table-view-cell"
>
第一个选项卡子项-5
</li>
</ul>
</div>
<div
id=
"item2mobile"
class=
"mui-control-content"
>
...
...
@@ -86,12 +80,6 @@
<li
class=
"mui-table-view-cell"
>
第二个选项卡子项-3
</li>
<li
class=
"mui-table-view-cell"
>
第二个选项卡子项-4
</li>
<li
class=
"mui-table-view-cell"
>
第二个选项卡子项-5
</li>
</ul>
</div>
<div
id=
"item3mobile"
class=
"mui-control-content"
>
...
...
@@ -105,12 +93,6 @@
<li
class=
"mui-table-view-cell"
>
第三个选项卡子项-3
</li>
<li
class=
"mui-table-view-cell"
>
第三个选项卡子项-4
</li>
<li
class=
"mui-table-view-cell"
>
第三个选项卡子项-5
</li>
</ul>
</div>
</div>
...
...
examples/hello-mui/examples/tab-with-viewpagerindicator.html
View file @
9550b51c
...
...
@@ -35,7 +35,7 @@
</style>
<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"
>
Tab with viewPagerIndicator
</h1>
<h1
class=
"mui-title"
>
可拖动式选项卡
</h1>
</header>
<div
class=
"mui-content"
>
<div
id=
"slider"
class=
"mui-slider"
>
...
...
examples/hello-mui/js/mui.min.js
View file @
9550b51c
This diff is collapsed.
Click to expand it.
examples/hello-mui/list.html
View file @
9550b51c
...
...
@@ -534,21 +534,34 @@
}
});
//监听展开事件
//监听展开事件
,预加载二级列表的前几个;
$
(
'
#demos
'
).
on
(
'
expand
'
,
'
.mui-collapse
'
,
function
(
e
)
{
count
=
0
;
$
(
'
.mui-table-view a
'
,
this
).
each
(
function
()
{
var
id
=
this
.
getAttribute
(
'
href
'
);
var
id
=
url
=
this
.
getAttribute
(
'
href
'
);
if
(
~
id
.
indexOf
(
'
.html
'
)
&&
!~
$
.
data
.
preloads
.
indexOf
(
id
))
{
//如果没在缓存,则创建预加载
var
url
=
this
.
href
;
//延迟100ms处理,避免影响操作流畅
setTimeout
(
function
()
{
$
.
createWindow
({
id
:
id
,
url
:
url
,
preload
:
true
});
},
(
count
++
)
*
100
);
//单独处理侧滑导航的index
if
(
~
id
.
indexOf
(
'
offcanvas-
'
)){
$
.
createWindow
({
id
:
id
,
url
:
url
,
styles
:{
zindex
:
9999
},
preload
:
true
});
}
else
{
$
.
createWindow
({
id
:
id
,
url
:
url
,
preload
:
true
});
}
count
++
;
if
(
count
>
2
){
return
false
;
}
}
});
});
...
...
@@ -586,15 +599,15 @@
id
:
id
,
url
:
this
.
href
,
styles
:{
zindex
:
9999
,
zindex
:
9999
},
preload
:
$
.
os
.
ios
?
false
:
true
//TODO 暂时屏蔽IOS的预加载
preload
:
true
});
}
else
{
$
.
openWindow
({
id
:
id
,
url
:
this
.
href
,
preload
:
$
.
os
.
ios
?
false
:
true
//TODO 暂时屏蔽IOS的预加载
preload
:
true
});
}
}
else
{
...
...
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