@oxiaom/adoremix-win32-x64 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +24 -0
- package/native/.adoremix-native.json +1 -0
- package/native/AdoreMixV8X.exe +0 -0
- package/native/Qt5Core.dll +0 -0
- package/native/Qt5Network.dll +0 -0
- package/native/Qt5Sql.dll +0 -0
- package/native/Qt5WebSockets.dll +0 -0
- package/native/audio/qtaudio_windows.dll +0 -0
- package/native/bearer/qgenericbearer.dll +0 -0
- package/native/bearer/qnativewifibearer.dll +0 -0
- package/native/etc/Demo1.ini +49 -0
- package/native/etc/docroot/bangzhu/.project +22 -0
- package/native/etc/docroot/bangzhu/css/app.css +21 -0
- package/native/etc/docroot/bangzhu/css/feedback.css +131 -0
- package/native/etc/docroot/bangzhu/css/icons-extra.css +63 -0
- package/native/etc/docroot/bangzhu/css/mui.dtpicker.css +136 -0
- package/native/etc/docroot/bangzhu/css/mui.imageviewer.css +123 -0
- package/native/etc/docroot/bangzhu/css/mui.indexedlist.css +112 -0
- package/native/etc/docroot/bangzhu/css/mui.listpicker.css +95 -0
- package/native/etc/docroot/bangzhu/css/mui.min.css +5 -0
- package/native/etc/docroot/bangzhu/css/mui.picker.all.css +285 -0
- package/native/etc/docroot/bangzhu/css/mui.picker.css +85 -0
- package/native/etc/docroot/bangzhu/css/mui.picker.min.css +7 -0
- package/native/etc/docroot/bangzhu/css/mui.poppicker.css +64 -0
- package/native/etc/docroot/bangzhu/examples/accordion.html +125 -0
- package/native/etc/docroot/bangzhu/examples/actionsheet-plus.html +128 -0
- package/native/etc/docroot/bangzhu/examples/actionsheet.html +153 -0
- package/native/etc/docroot/bangzhu/examples/ad.html +47 -0
- package/native/etc/docroot/bangzhu/examples/ajax.html +155 -0
- package/native/etc/docroot/bangzhu/examples/badges.html +54 -0
- package/native/etc/docroot/bangzhu/examples/beecloud.html +150 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/detail.html +104 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/list-to-detail.css +160 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/listview.html +326 -0
- package/native/etc/docroot/bangzhu/examples/best-practices/list-to-detail/vue.min.js +8 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-badges.html +48 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-block.html +50 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-icons.html +68 -0
- package/native/etc/docroot/bangzhu/examples/buttons-with-loading.html +86 -0
- package/native/etc/docroot/bangzhu/examples/buttons.html +89 -0
- package/native/etc/docroot/bangzhu/examples/card.html +97 -0
- package/native/etc/docroot/bangzhu/examples/checkbox.html +68 -0
- package/native/etc/docroot/bangzhu/examples/clouddb_wilddog.html +268 -0
- package/native/etc/docroot/bangzhu/examples/date.html +88 -0
- package/native/etc/docroot/bangzhu/examples/dialog.html +82 -0
- package/native/etc/docroot/bangzhu/examples/dtpicker.html +129 -0
- package/native/etc/docroot/bangzhu/examples/echarts.html +150 -0
- package/native/etc/docroot/bangzhu/examples/feedback.html +72 -0
- package/native/etc/docroot/bangzhu/examples/grid-default.html +61 -0
- package/native/etc/docroot/bangzhu/examples/grid-pagination.html +266 -0
- package/native/etc/docroot/bangzhu/examples/guide.html +269 -0
- package/native/etc/docroot/bangzhu/examples/icons-extra.html +161 -0
- package/native/etc/docroot/bangzhu/examples/icons.html +182 -0
- package/native/etc/docroot/bangzhu/examples/im-chat.html +711 -0
- package/native/etc/docroot/bangzhu/examples/imageviewer-native.html +90 -0
- package/native/etc/docroot/bangzhu/examples/imageviewer.html +197 -0
- package/native/etc/docroot/bangzhu/examples/indexed-list-select.html +459 -0
- package/native/etc/docroot/bangzhu/examples/indexed-list.html +265 -0
- package/native/etc/docroot/bangzhu/examples/info.html +119 -0
- package/native/etc/docroot/bangzhu/examples/input.html +108 -0
- package/native/etc/docroot/bangzhu/examples/lazyload-image.html +73 -0
- package/native/etc/docroot/bangzhu/examples/list-triplex-row.html +115 -0
- package/native/etc/docroot/bangzhu/examples/list-with-input.html +91 -0
- package/native/etc/docroot/bangzhu/examples/locker-dom.html +85 -0
- package/native/etc/docroot/bangzhu/examples/login.html +83 -0
- package/native/etc/docroot/bangzhu/examples/media-list.html +220 -0
- package/native/etc/docroot/bangzhu/examples/message-bottom.html +87 -0
- package/native/etc/docroot/bangzhu/examples/modals.html +45 -0
- package/native/etc/docroot/bangzhu/examples/nav-nativeObj.html +45 -0
- package/native/etc/docroot/bangzhu/examples/nav.html +135 -0
- package/native/etc/docroot/bangzhu/examples/nav_transparent.html +127 -0
- package/native/etc/docroot/bangzhu/examples/nav_transparent_native.html +121 -0
- package/native/etc/docroot/bangzhu/examples/numbox.html +114 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-down.html +384 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left-plus-main.html +293 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left-plus-menu.html +102 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-left.html +228 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right-plus-main.html +292 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right-plus-menu.html +111 -0
- package/native/etc/docroot/bangzhu/examples/offcanvas-drag-right.html +220 -0
- package/native/etc/docroot/bangzhu/examples/pagination.html +236 -0
- package/native/etc/docroot/bangzhu/examples/picker.html +159 -0
- package/native/etc/docroot/bangzhu/examples/popovers.html +200 -0
- package/native/etc/docroot/bangzhu/examples/progressbar.html +171 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh.html +86 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh_main.html +46 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh_sub.html +101 -0
- package/native/etc/docroot/bangzhu/examples/pullrefresh_with_tab.html +586 -0
- package/native/etc/docroot/bangzhu/examples/radio.html +93 -0
- package/native/etc/docroot/bangzhu/examples/range.html +89 -0
- package/native/etc/docroot/bangzhu/examples/setting.html +910 -0
- package/native/etc/docroot/bangzhu/examples/slider-default.html +98 -0
- package/native/etc/docroot/bangzhu/examples/slider-native.html +43 -0
- package/native/etc/docroot/bangzhu/examples/slider-table-default.html +62 -0
- package/native/etc/docroot/bangzhu/examples/slider-table-pagination.html +74 -0
- package/native/etc/docroot/bangzhu/examples/slider-with-title.html +99 -0
- package/native/etc/docroot/bangzhu/examples/switches.html +92 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-1.html +131 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-2.html +131 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-3.html +56 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-4.html +110 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-subpage-5.html +131 -0
- package/native/etc/docroot/bangzhu/examples/tab-top-webview-main.html +183 -0
- package/native/etc/docroot/bangzhu/examples/tab-vertical-scroll.html +170 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-main.html +112 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-about.html +38 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-chat.html +127 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-contact.html +155 -0
- package/native/etc/docroot/bangzhu/examples/tab-webview-subpage-setting.html +79 -0
- package/native/etc/docroot/bangzhu/examples/tab-with-segmented-control-vertical.html +85 -0
- package/native/etc/docroot/bangzhu/examples/tab-with-segmented-control.html +195 -0
- package/native/etc/docroot/bangzhu/examples/tab-with-viewpagerindicator.html +203 -0
- package/native/etc/docroot/bangzhu/examples/tabbar-labels-only.html +44 -0
- package/native/etc/docroot/bangzhu/examples/tabbar-with-submenus.html +75 -0
- package/native/etc/docroot/bangzhu/examples/tabbar.html +247 -0
- package/native/etc/docroot/bangzhu/examples/tableviews-with-badges.html +78 -0
- package/native/etc/docroot/bangzhu/examples/tableviews-with-collapses.html +83 -0
- package/native/etc/docroot/bangzhu/examples/tableviews-with-swipe.html +184 -0
- package/native/etc/docroot/bangzhu/examples/tableviews.html +87 -0
- package/native/etc/docroot/bangzhu/examples/typography.html +41 -0
- package/native/etc/docroot/bangzhu/fonts/mui-icons-extra.ttf +0 -0
- package/native/etc/docroot/bangzhu/fonts/mui.ttf +0 -0
- package/native/etc/docroot/bangzhu/images/60x60.gif +0 -0
- package/native/etc/docroot/bangzhu/images/cbd.jpg +0 -0
- package/native/etc/docroot/bangzhu/images/login-1.png +0 -0
- package/native/etc/docroot/bangzhu/images/logo.png +0 -0
- package/native/etc/docroot/bangzhu/images/muwu.jpg +0 -0
- package/native/etc/docroot/bangzhu/images/qrcode.png +0 -0
- package/native/etc/docroot/bangzhu/images/shuijiao.jpg +0 -0
- package/native/etc/docroot/bangzhu/images/yuantiao.jpg +0 -0
- package/native/etc/docroot/bangzhu/index-menu.html +196 -0
- package/native/etc/docroot/bangzhu/index.html +414 -0
- package/native/etc/docroot/bangzhu/js/95516.js +32 -0
- package/native/etc/docroot/bangzhu/js/arttmpl.js +2 -0
- package/native/etc/docroot/bangzhu/js/beecloud.js +141 -0
- package/native/etc/docroot/bangzhu/js/city.data-3.js +11548 -0
- package/native/etc/docroot/bangzhu/js/city.data.js +1605 -0
- package/native/etc/docroot/bangzhu/js/feedback.js +234 -0
- package/native/etc/docroot/bangzhu/js/mui.dtpicker.js +471 -0
- package/native/etc/docroot/bangzhu/js/mui.imageViewer.js +268 -0
- package/native/etc/docroot/bangzhu/js/mui.indexedlist.js +187 -0
- package/native/etc/docroot/bangzhu/js/mui.js +8390 -0
- package/native/etc/docroot/bangzhu/js/mui.lazyload.img.js +116 -0
- package/native/etc/docroot/bangzhu/js/mui.lazyload.js +327 -0
- package/native/etc/docroot/bangzhu/js/mui.listpicker.js +399 -0
- package/native/etc/docroot/bangzhu/js/mui.locker.js +303 -0
- package/native/etc/docroot/bangzhu/js/mui.min.js +6 -0
- package/native/etc/docroot/bangzhu/js/mui.picker.all.js +1018 -0
- package/native/etc/docroot/bangzhu/js/mui.picker.js +389 -0
- package/native/etc/docroot/bangzhu/js/mui.picker.min.js +7 -0
- package/native/etc/docroot/bangzhu/js/mui.poppicker.js +160 -0
- package/native/etc/docroot/bangzhu/js/mui.previewimage.js +382 -0
- package/native/etc/docroot/bangzhu/js/mui.pullToRefresh.js +407 -0
- package/native/etc/docroot/bangzhu/js/mui.pullToRefresh.material.js +352 -0
- package/native/etc/docroot/bangzhu/js/mui.view.js +628 -0
- package/native/etc/docroot/bangzhu/js/mui.zoom.js +322 -0
- package/native/etc/docroot/bangzhu/js/update.js +45 -0
- package/native/etc/docroot/bangzhu/js/webviewGroup.js +286 -0
- package/native/etc/docroot/bangzhu/libs/echarts-all.js +35 -0
- package/native/etc/docroot/bangzhu/manifest.json +994 -0
- package/native/etc/docroot/index.html +1 -0
- package/native/etc/docroot/luyin2/index.html +145 -0
- package/native/etc/docroot/luyin2/js/jquery-1.10.1.min.js +6 -0
- package/native/etc/docroot/luyin2/js/jquery-1.5.min.js +16 -0
- package/native/etc/docroot/luyin2/js/jquery.js +18 -0
- package/native/etc/docroot/luyin2/js/jquery.multiselect.js +104 -0
- package/native/etc/docroot/luyin2/js/lame.min.js +308 -0
- package/native/etc/docroot/luyin2/js/recordmp3.js +239 -0
- package/native/etc/docroot/luyin2/js/worker-realtime.js +106 -0
- package/native/etc/docroot/luyin2//346/223/215/344/275/234/346/214/207/345/215/227.txt +3 -0
- package/native/etc/docroot/static/css/app.8421a6d597ba48619941ccd4e386fbb2.css +675 -0
- package/native/etc/docroot/static/css/app.8421a6d597ba48619941ccd4e386fbb2.css.map +1 -0
- package/native/etc/docroot/static/fonts/element-icons.535877f.woff +0 -0
- package/native/etc/docroot/static/fonts/element-icons.732389d.ttf +0 -0
- package/native/etc/docroot/static/img/login_bg.ad6b482.jpg +0 -0
- package/native/etc/docroot/static/js/app.eff1c2200a448936b027.js +2 -0
- package/native/etc/docroot/static/js/app.eff1c2200a448936b027.js.map +1 -0
- package/native/etc/docroot/static/js/manifest.400eada2d24447a4fc30.js +2 -0
- package/native/etc/docroot/static/js/manifest.400eada2d24447a4fc30.js.map +1 -0
- package/native/etc/docroot/static/js/vendor.ca4f735ec1dfe336a804.js +45 -0
- package/native/etc/docroot/static/js/vendor.ca4f735ec1dfe336a804.js.map +1 -0
- package/native/etc/docroot/tts.js +151 -0
- package/native/etc/docroot/xcx/Discover.html +156 -0
- package/native/etc/docroot/xcx/css/mui.css +5649 -0
- package/native/etc/docroot/xcx/css/mui.min.css +5 -0
- package/native/etc/docroot/xcx/devicelist.html +659 -0
- package/native/etc/docroot/xcx/fonts/mui.ttf +0 -0
- package/native/etc/docroot/xcx/index.html +75 -0
- package/native/etc/docroot/xcx/index.js +1 -0
- package/native/etc/docroot/xcx/js/axios.min.js +3 -0
- package/native/etc/docroot/xcx/js/axios.min.map +1 -0
- package/native/etc/docroot/xcx/js/js.cookie.js +8 -0
- package/native/etc/docroot/xcx/js/mui.js +8390 -0
- package/native/etc/docroot/xcx/js/mui.min.js +6 -0
- package/native/etc/docroot/xcx/main.html +85 -0
- package/native/etc/ssl/README.txt +5 -0
- package/native/etc/ssl/ca.crt +21 -0
- package/native/etc/ssl/ca.key +27 -0
- package/native/etc/ssl/client.crt +20 -0
- package/native/etc/ssl/client.key +28 -0
- package/native/etc/ssl/client.p12 +0 -0
- package/native/etc/ssl/server.crt +20 -0
- package/native/etc/ssl/server.key +28 -0
- package/native/etc/templates/demo-de.tpl +12 -0
- package/native/etc/templates/demo.tpl +12 -0
- package/native/etc/ttys/adore03.sql +426 -0
- package/native/etc/ttys/adore04.sql +426 -0
- package/native/etc/ttys/adore1.sql +859 -0
- package/native/etc/ttys/adore_mix22.sql +806 -0
- package/native/etc/ttys/sqlite.sql +1140 -0
- package/native/etc/ttys/sqlite3main.sql +434 -0
- package/native/etc/ttys/sqltest.sql +279 -0
- package/native/etc/ttys/tp3sql.sql +1412 -0
- package/native/find.js +529 -0
- package/native/findsc.js +701 -0
- package/native/iconengines/qsvgicon.dll +0 -0
- package/native/imageformats/qgif.dll +0 -0
- package/native/imageformats/qicns.dll +0 -0
- package/native/imageformats/qico.dll +0 -0
- package/native/imageformats/qjpeg.dll +0 -0
- package/native/imageformats/qsvg.dll +0 -0
- package/native/imageformats/qtga.dll +0 -0
- package/native/imageformats/qtiff.dll +0 -0
- package/native/imageformats/qwbmp.dll +0 -0
- package/native/imageformats/qwebp.dll +0 -0
- package/native/libgcc_s_sjlj-1.dll +0 -0
- package/native/libstdc++-6.dll +0 -0
- package/native/libwinpthread-1.dll +0 -0
- package/native/mediaservice/dsengine.dll +0 -0
- package/native/mediaservice/qtmedia_audioengine.dll +0 -0
- package/native/platforms/qdirect2d.dll +0 -0
- package/native/platforms/qminimal.dll +0 -0
- package/native/platforms/qoffscreen.dll +0 -0
- package/native/platforms/qwebgl.dll +0 -0
- package/native/platforms/qwindows.dll +0 -0
- package/native/qt.conf +2 -0
- package/native/sqldrivers/qsqlite.dll +0 -0
- package/native/sqldrivers/qsqlmysql.dll +0 -0
- package/native/sqldrivers/qsqlodbc.dll +0 -0
- package/native/sqldrivers/qsqlpsql.dll +0 -0
- package/native/sqldrivers/sqlitecipher.dll +0 -0
- package/native/tts.js +151 -0
- package/package.json +23 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>Hello MUI</title>
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
8
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
9
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
10
|
+
|
|
11
|
+
<link rel="stylesheet" href="../css/mui.min.css">
|
|
12
|
+
<style>
|
|
13
|
+
html,
|
|
14
|
+
body {
|
|
15
|
+
min-height: 100%;
|
|
16
|
+
background-color: #efeff4;
|
|
17
|
+
}
|
|
18
|
+
.animated {
|
|
19
|
+
-webkit-animation-duration: 0.5s;
|
|
20
|
+
animation-duration: 0.5s;
|
|
21
|
+
-webkit-animation-fill-mode: both;
|
|
22
|
+
animation-fill-mode: both;
|
|
23
|
+
}
|
|
24
|
+
@-webkit-keyframes bounceInDown {
|
|
25
|
+
0%, 60%, 75%, 90%, 100% {
|
|
26
|
+
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
27
|
+
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
28
|
+
}
|
|
29
|
+
0% {
|
|
30
|
+
opacity: 0;
|
|
31
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
32
|
+
transform: translate3d(0, -100%, 0);
|
|
33
|
+
}
|
|
34
|
+
60% {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
-webkit-transform: translate3d(0, 25px, 0);
|
|
37
|
+
transform: translate3d(0, 25px, 0);
|
|
38
|
+
}
|
|
39
|
+
75% {
|
|
40
|
+
-webkit-transform: translate3d(0, -10px, 0);
|
|
41
|
+
transform: translate3d(0, -10px, 0);
|
|
42
|
+
}
|
|
43
|
+
90% {
|
|
44
|
+
-webkit-transform: translate3d(0, 5px, 0);
|
|
45
|
+
transform: translate3d(0, 5px, 0);
|
|
46
|
+
}
|
|
47
|
+
100% {
|
|
48
|
+
-webkit-transform: none;
|
|
49
|
+
transform: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
@keyframes bounceInDown {
|
|
53
|
+
0%, 60%, 75%, 90%, 100% {
|
|
54
|
+
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
55
|
+
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
56
|
+
}
|
|
57
|
+
0% {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
60
|
+
transform: translate3d(0, -100%, 0);
|
|
61
|
+
}
|
|
62
|
+
60% {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
-webkit-transform: translate3d(0, 25px, 0);
|
|
65
|
+
transform: translate3d(0, 25px, 0);
|
|
66
|
+
}
|
|
67
|
+
75% {
|
|
68
|
+
-webkit-transform: translate3d(0, -10px, 0);
|
|
69
|
+
transform: translate3d(0, -10px, 0);
|
|
70
|
+
}
|
|
71
|
+
90% {
|
|
72
|
+
-webkit-transform: translate3d(0, 5px, 0);
|
|
73
|
+
transform: translate3d(0, 5px, 0);
|
|
74
|
+
}
|
|
75
|
+
100% {
|
|
76
|
+
-webkit-transform: none;
|
|
77
|
+
transform: none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.bounce-in-down {
|
|
81
|
+
-webkit-animation-name: bounceInDown;
|
|
82
|
+
animation-name: bounceInDown;
|
|
83
|
+
}
|
|
84
|
+
@-webkit-keyframes fadeInDown {
|
|
85
|
+
0%, 60%, 75%, 90%, 100% {
|
|
86
|
+
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
87
|
+
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
88
|
+
}
|
|
89
|
+
0% {
|
|
90
|
+
opacity: 0;
|
|
91
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
92
|
+
transform: translate3d(0, -100%, 0);
|
|
93
|
+
}
|
|
94
|
+
60% {
|
|
95
|
+
opacity: 1;
|
|
96
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
97
|
+
transform: translate3d(0, 0px, 0);
|
|
98
|
+
}
|
|
99
|
+
75% {
|
|
100
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
101
|
+
transform: translate3d(0, 0px, 0);
|
|
102
|
+
}
|
|
103
|
+
90% {
|
|
104
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
105
|
+
transform: translate3d(0, 0px, 0);
|
|
106
|
+
}
|
|
107
|
+
100% {
|
|
108
|
+
-webkit-transform: none;
|
|
109
|
+
transform: none;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
@keyframes fadeInDown {
|
|
113
|
+
0%, 60%, 75%, 90%, 100% {
|
|
114
|
+
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
115
|
+
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
|
116
|
+
}
|
|
117
|
+
0% {
|
|
118
|
+
opacity: 0;
|
|
119
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
120
|
+
transform: translate3d(0, -100%, 0);
|
|
121
|
+
}
|
|
122
|
+
60% {
|
|
123
|
+
opacity: 1;
|
|
124
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
125
|
+
transform: translate3d(0, 0px, 0);
|
|
126
|
+
}
|
|
127
|
+
75% {
|
|
128
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
129
|
+
transform: translate3d(0, 0px, 0);
|
|
130
|
+
}
|
|
131
|
+
90% {
|
|
132
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
133
|
+
transform: translate3d(0, 0px, 0);
|
|
134
|
+
}
|
|
135
|
+
100% {
|
|
136
|
+
-webkit-transform: none;
|
|
137
|
+
transform: none;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
.fade-in-down {
|
|
141
|
+
-webkit-animation-name: fadeInDown;
|
|
142
|
+
animation-name: fadeInDown;
|
|
143
|
+
}
|
|
144
|
+
@-webkit-keyframes bounceOutUp {
|
|
145
|
+
20% {
|
|
146
|
+
-webkit-transform: translate3d(0, -10px, 0);
|
|
147
|
+
transform: translate3d(0, -10px, 0);
|
|
148
|
+
}
|
|
149
|
+
40%,
|
|
150
|
+
45% {
|
|
151
|
+
opacity: 1;
|
|
152
|
+
-webkit-transform: translate3d(0, 20px, 0);
|
|
153
|
+
transform: translate3d(0, 20px, 0);
|
|
154
|
+
}
|
|
155
|
+
100% {
|
|
156
|
+
opacity: 0;
|
|
157
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
158
|
+
transform: translate3d(0, -100%, 0);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
@keyframes bounceOutUp {
|
|
162
|
+
20% {
|
|
163
|
+
-webkit-transform: translate3d(0, -10px, 0);
|
|
164
|
+
transform: translate3d(0, -10px, 0);
|
|
165
|
+
}
|
|
166
|
+
40%,
|
|
167
|
+
45% {
|
|
168
|
+
opacity: 1;
|
|
169
|
+
-webkit-transform: translate3d(0, 20px, 0);
|
|
170
|
+
transform: translate3d(0, 20px, 0);
|
|
171
|
+
}
|
|
172
|
+
100% {
|
|
173
|
+
opacity: 0;
|
|
174
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
175
|
+
transform: translate3d(0, -100%, 0);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
.bounce-out-up {
|
|
179
|
+
-webkit-animation-name: bounceOutUp;
|
|
180
|
+
animation-name: bounceOutUp;
|
|
181
|
+
}
|
|
182
|
+
@-webkit-keyframes fadeOutUp {
|
|
183
|
+
20% {
|
|
184
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
185
|
+
transform: translate3d(0, 0px, 0);
|
|
186
|
+
}
|
|
187
|
+
40%,
|
|
188
|
+
45% {
|
|
189
|
+
opacity: 1;
|
|
190
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
191
|
+
transform: translate3d(0, 0px, 0);
|
|
192
|
+
}
|
|
193
|
+
100% {
|
|
194
|
+
opacity: 0;
|
|
195
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
196
|
+
transform: translate3d(0, -100%, 0);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
@keyframes fadeOutUp {
|
|
200
|
+
20% {
|
|
201
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
202
|
+
transform: translate3d(0, 0px, 0);
|
|
203
|
+
}
|
|
204
|
+
40%,
|
|
205
|
+
45% {
|
|
206
|
+
opacity: 1;
|
|
207
|
+
-webkit-transform: translate3d(0, 0px, 0);
|
|
208
|
+
transform: translate3d(0, 0px, 0);
|
|
209
|
+
}
|
|
210
|
+
100% {
|
|
211
|
+
opacity: 0;
|
|
212
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
213
|
+
transform: translate3d(0, -100%, 0);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
.fade-out-up {
|
|
217
|
+
-webkit-animation-name: fadeOutUp;
|
|
218
|
+
animation-name: fadeOutUp;
|
|
219
|
+
}
|
|
220
|
+
.menu-open {
|
|
221
|
+
height: 100%;
|
|
222
|
+
width: 100%;
|
|
223
|
+
}
|
|
224
|
+
.menu-open .mui-scroll-wrapper {
|
|
225
|
+
position: absolute;
|
|
226
|
+
top: 48;
|
|
227
|
+
bottom: 0;
|
|
228
|
+
left: 0;
|
|
229
|
+
z-index: 1;
|
|
230
|
+
width: 100%;
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
-webkit-backface-visibility: hidden;
|
|
233
|
+
}
|
|
234
|
+
.menu-backdrop {
|
|
235
|
+
display: none;
|
|
236
|
+
}
|
|
237
|
+
.menu-open .menu-backdrop {
|
|
238
|
+
position: fixed;
|
|
239
|
+
top: 0;
|
|
240
|
+
bottom: 0;
|
|
241
|
+
height: 100%;
|
|
242
|
+
width: 100%;
|
|
243
|
+
display: block;
|
|
244
|
+
z-index: 998;
|
|
245
|
+
}
|
|
246
|
+
.menu-wrapper {
|
|
247
|
+
position: absolute;
|
|
248
|
+
top: 48px;
|
|
249
|
+
left: 0;
|
|
250
|
+
right: 0;
|
|
251
|
+
z-index: 999;
|
|
252
|
+
text-align: center;
|
|
253
|
+
background-color: #333;
|
|
254
|
+
width: 100%;
|
|
255
|
+
}
|
|
256
|
+
.menu-wrapper.hidden {
|
|
257
|
+
-webkit-transform: translate3d(0, -100%, 0);
|
|
258
|
+
transform: translate3d(0, -100%, 0);
|
|
259
|
+
z-index: -1;
|
|
260
|
+
}
|
|
261
|
+
.menu {
|
|
262
|
+
width: 100%;
|
|
263
|
+
}
|
|
264
|
+
.menu .mui-table-view-inverted {
|
|
265
|
+
color: gray;
|
|
266
|
+
font-size: 19px;
|
|
267
|
+
}
|
|
268
|
+
.menu .mui-table-view-inverted .mui-table-view-cell:after {
|
|
269
|
+
height: 2px;
|
|
270
|
+
left: 0;
|
|
271
|
+
right: 0;
|
|
272
|
+
}
|
|
273
|
+
.menu-wrapper.mui-active,
|
|
274
|
+
.menu-wrapper.mui-active .menu {
|
|
275
|
+
-webkit-transform: translate3d(0, 0, 0);
|
|
276
|
+
transform: translate3d(0, 0, 0);
|
|
277
|
+
}
|
|
278
|
+
#info{
|
|
279
|
+
padding: 20px 10px ;
|
|
280
|
+
}
|
|
281
|
+
</style>
|
|
282
|
+
</head>
|
|
283
|
+
|
|
284
|
+
<body>
|
|
285
|
+
<header class="mui-bar mui-bar-nav">
|
|
286
|
+
<a id="icon-menu" class="mui-action-menu mui-icon mui-icon-bars mui-pull-left"></a>
|
|
287
|
+
<a class="mui-action-back mui-btn mui-btn-link mui-pull-right">关闭</a>
|
|
288
|
+
<h1 class="mui-title">div模式下拉菜单</h1>
|
|
289
|
+
</header>
|
|
290
|
+
<div class="mui-content">
|
|
291
|
+
<div class="mui-content-padded" >
|
|
292
|
+
<p>这是div模式下沉菜单示例,主页面和菜单在一个HTML文件中,
|
|
293
|
+
|
|
294
|
+
当前页面为主界面,你可以在主界面放置任何内容;
|
|
295
|
+
打开侧滑菜单有多种方式: 1、点击页面左上角的
|
|
296
|
+
<span class="mui-icon mui-icon-bars"></span> 图标;
|
|
297
|
+
2、通过JS API触发(例如点击如下蓝色按钮体验);
|
|
298
|
+
<span class="android-only">3、Android手机按menu键;</span>
|
|
299
|
+
</p>
|
|
300
|
+
<p style="padding: 5px 20px;margin-bottom: 5px;">
|
|
301
|
+
<button id="menu-btn" type="button" class="mui-btn mui-btn-primary mui-btn-block" style="padding: 10px;">
|
|
302
|
+
显示下拉菜单
|
|
303
|
+
</button>
|
|
304
|
+
</p>
|
|
305
|
+
<div id="info"></div>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
</div>
|
|
309
|
+
<div id="menu-wrapper" class="menu-wrapper hidden">
|
|
310
|
+
<div id="menu" class="menu">
|
|
311
|
+
<ul class="mui-table-view mui-table-view-inverted">
|
|
312
|
+
<li class="mui-table-view-cell">
|
|
313
|
+
<a href="javascript:;">Item 1</a>
|
|
314
|
+
</li>
|
|
315
|
+
<li class="mui-table-view-cell">
|
|
316
|
+
<a href="javascript:;">Item 2</a>
|
|
317
|
+
</li>
|
|
318
|
+
<li class="mui-table-view-cell">
|
|
319
|
+
<a href="javascript:;">Item 3</a>
|
|
320
|
+
</li>
|
|
321
|
+
<li class="mui-table-view-cell">
|
|
322
|
+
<a href="javascript:;">Item 4</a>
|
|
323
|
+
</li>
|
|
324
|
+
<li class="mui-table-view-cell">
|
|
325
|
+
<a href="javascript:;">Item 5</a>
|
|
326
|
+
</li>
|
|
327
|
+
<li class="mui-table-view-cell">
|
|
328
|
+
<a href="javascript:;">Item 6</a>
|
|
329
|
+
</li>
|
|
330
|
+
<li class="mui-table-view-cell">
|
|
331
|
+
<a href="javascript:;">Item 7</a>
|
|
332
|
+
</li>
|
|
333
|
+
</ul>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
<div id="menu-backdrop" class="menu-backdrop"></div>
|
|
337
|
+
<script src="../js/mui.min.js"></script>
|
|
338
|
+
<script>
|
|
339
|
+
mui.init({
|
|
340
|
+
swipeBack:true //启用右滑关闭功能
|
|
341
|
+
});
|
|
342
|
+
var menuWrapper = document.getElementById("menu-wrapper");
|
|
343
|
+
var menu = document.getElementById("menu");
|
|
344
|
+
var menuWrapperClassList = menuWrapper.classList;
|
|
345
|
+
var backdrop = document.getElementById("menu-backdrop");
|
|
346
|
+
var info = document.getElementById("info");
|
|
347
|
+
|
|
348
|
+
backdrop.addEventListener('tap', toggleMenu);
|
|
349
|
+
document.getElementById("menu-btn").addEventListener('tap', toggleMenu);
|
|
350
|
+
document.getElementById("icon-menu").addEventListener('tap',toggleMenu)
|
|
351
|
+
//下沉菜单中的点击事件
|
|
352
|
+
mui('#menu').on('tap', 'a', function() {
|
|
353
|
+
toggleMenu();
|
|
354
|
+
info.innerHTML = '你已选择:'+this.innerHTML;
|
|
355
|
+
});
|
|
356
|
+
var busying = false;
|
|
357
|
+
|
|
358
|
+
function toggleMenu() {
|
|
359
|
+
if (busying) {
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
busying = true;
|
|
363
|
+
if (menuWrapperClassList.contains('mui-active')) {
|
|
364
|
+
document.body.classList.remove('menu-open');
|
|
365
|
+
menuWrapper.className = 'menu-wrapper fade-out-up animated';
|
|
366
|
+
menu.className = 'menu bounce-out-up animated';
|
|
367
|
+
setTimeout(function() {
|
|
368
|
+
backdrop.style.opacity = 0;
|
|
369
|
+
menuWrapper.classList.add('hidden');
|
|
370
|
+
}, 500);
|
|
371
|
+
} else {
|
|
372
|
+
document.body.classList.add('menu-open');
|
|
373
|
+
menuWrapper.className = 'menu-wrapper fade-in-down animated mui-active';
|
|
374
|
+
menu.className = 'menu bounce-in-down animated';
|
|
375
|
+
backdrop.style.opacity = 1;
|
|
376
|
+
}
|
|
377
|
+
setTimeout(function() {
|
|
378
|
+
busying = false;
|
|
379
|
+
}, 500);
|
|
380
|
+
}
|
|
381
|
+
</script>
|
|
382
|
+
</body>
|
|
383
|
+
|
|
384
|
+
</html>
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>Hello MUI</title>
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
8
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
9
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
10
|
+
|
|
11
|
+
<link rel="stylesheet" href="../css/mui.min.css">
|
|
12
|
+
<style>
|
|
13
|
+
html,
|
|
14
|
+
body {
|
|
15
|
+
background-color: #efeff4;
|
|
16
|
+
}
|
|
17
|
+
p {
|
|
18
|
+
text-indent: 22px;
|
|
19
|
+
}
|
|
20
|
+
span.mui-icon {
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
color: #007aff;
|
|
23
|
+
margin-left: -15px;
|
|
24
|
+
padding-right: 10px;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
27
|
+
</head>
|
|
28
|
+
|
|
29
|
+
<body>
|
|
30
|
+
|
|
31
|
+
<header class="mui-bar mui-bar-nav">
|
|
32
|
+
<a class="mui-action-menu mui-icon mui-icon-bars mui-pull-right"></a>
|
|
33
|
+
<a class="mui-action-back mui-icon mui-icon-back mui-pull-left"></a>
|
|
34
|
+
<h1 class="mui-title">off canvas(侧滑导航)</h1>
|
|
35
|
+
</header>
|
|
36
|
+
<div class="mui-content">
|
|
37
|
+
<div class="mui-content-padded">
|
|
38
|
+
<p>这是webview模式右滑导航示例,主页面和菜单在不同的webview中,
|
|
39
|
+
优点是支持菜单内容在多页面的复用,缺点是不支持拖动手势(跟手);
|
|
40
|
+
当前页面为主界面,你可以在主界面放置任何内容;
|
|
41
|
+
打开侧滑菜单有多种方式:
|
|
42
|
+
1、在当前页面快速向左滑动(swipe);
|
|
43
|
+
2、点击页面右上角的
|
|
44
|
+
<span class="mui-icon mui-icon-bars"></span> 图标;
|
|
45
|
+
3、通过JS API触发(例如点击如下蓝色按钮体验);
|
|
46
|
+
<span class="android-only">4、Android手机按menu键;</span>
|
|
47
|
+
</p>
|
|
48
|
+
<p style="padding: 5px 20px;margin-bottom: 5px;">
|
|
49
|
+
<button id="show-btn" type="button" class="mui-btn mui-btn-primary mui-btn-block" style="padding: 10px;">
|
|
50
|
+
显示侧滑菜单
|
|
51
|
+
</button>
|
|
52
|
+
</p>
|
|
53
|
+
<p >侧滑菜单的移动动画,支持多种效果,切换如下选项体验不同动画效果:</p>
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
<form class="mui-input-group" style="margin-bottom: 15px;">
|
|
57
|
+
<div class="mui-input-row mui-radio">
|
|
58
|
+
<label>主界面移动、菜单不动</label>
|
|
59
|
+
<input name="style" type="radio" checked="" value="main-move">
|
|
60
|
+
</div>
|
|
61
|
+
<div class="mui-input-row mui-radio">
|
|
62
|
+
<label>主界面不动、菜单移动</label>
|
|
63
|
+
<input name="style" type="radio" value="menu-move">
|
|
64
|
+
</div>
|
|
65
|
+
<div class="mui-input-row mui-radio mui-hidden" id="move-togger">
|
|
66
|
+
<label>整体移动</label>
|
|
67
|
+
<input name="style" type="radio" value="all-move">
|
|
68
|
+
</div>
|
|
69
|
+
</form>
|
|
70
|
+
</div>
|
|
71
|
+
<script src="../js/mui.min.js"></script>
|
|
72
|
+
<script>
|
|
73
|
+
var main,menu, mask = mui.createMask(_closeMenu);
|
|
74
|
+
var showMenu = false,
|
|
75
|
+
mode = 'main-move';
|
|
76
|
+
|
|
77
|
+
//整体滑动暂不支持android手机,因为两个页面的移动动画,无法保证同步性;
|
|
78
|
+
if (!mui.os.android) {
|
|
79
|
+
//整体滑动暂不支持android手机,因为两个页面的移动动画,无法保证同步性;
|
|
80
|
+
document.getElementById("move-togger").classList.remove('mui-hidden');
|
|
81
|
+
var spans = document.querySelectorAll('.android-only');
|
|
82
|
+
for (var i=0,len=spans.length;i<len;i++) {
|
|
83
|
+
spans[i].style.display = "none";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
mui.init({
|
|
88
|
+
swipeBack: false,
|
|
89
|
+
beforeback: back
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
function back() {
|
|
93
|
+
if (showMenu) {
|
|
94
|
+
//菜单处于显示状态,返回键应该先关闭菜单,阻止主窗口执行mui.back逻辑;
|
|
95
|
+
closeMenu();
|
|
96
|
+
return false;
|
|
97
|
+
} else {
|
|
98
|
+
//菜单处于隐藏状态,执行返回时,要先close菜单页面,然后继续执行mui.back逻辑关闭主窗口;
|
|
99
|
+
menu.close('none');
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//plusReady事件后,自动创建menu窗口;
|
|
104
|
+
mui.plusReady(function() {
|
|
105
|
+
main = plus.webview.currentWebview();
|
|
106
|
+
//setTimeout的目的是等待窗体动画结束后,再执行create webview操作,避免资源竞争,导致窗口动画不流畅;
|
|
107
|
+
setTimeout(function () {
|
|
108
|
+
menu = mui.preload({
|
|
109
|
+
id: 'offcanvas-drag-left-plus-menu',
|
|
110
|
+
url: 'offcanvas-drag-left-plus-menu.html',
|
|
111
|
+
styles: {
|
|
112
|
+
left: "30%",
|
|
113
|
+
width: '70%',
|
|
114
|
+
zindex: 9997
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
},300);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
/*
|
|
121
|
+
* 显示菜单菜单
|
|
122
|
+
*/
|
|
123
|
+
function openMenu() {
|
|
124
|
+
if (!showMenu) {
|
|
125
|
+
//解决android 4.4以下版本webview移动时,导致fixed定位元素错乱的bug;
|
|
126
|
+
if (mui.os.android && parseFloat(mui.os.version) < 4.4) {
|
|
127
|
+
document.querySelector("header.mui-bar").style.position = "static";
|
|
128
|
+
//同时需要修改以下.mui-contnt的padding-top,否则会多出空白;
|
|
129
|
+
document.querySelector(".mui-bar-nav~.mui-content").style.paddingTop = "0px";
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
//侧滑菜单处于隐藏状态,则立即显示出来;
|
|
133
|
+
//显示完毕后,根据不同动画效果移动窗体;
|
|
134
|
+
menu.show('none', 0, function() {
|
|
135
|
+
switch (mode){
|
|
136
|
+
case 'main-move':
|
|
137
|
+
//主窗体开始侧滑;
|
|
138
|
+
main.setStyle({
|
|
139
|
+
left: '-70%',
|
|
140
|
+
transition: {
|
|
141
|
+
duration: 150
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
break;
|
|
145
|
+
case 'menu-move':
|
|
146
|
+
menu.setStyle({
|
|
147
|
+
left: '30%',
|
|
148
|
+
transition: {
|
|
149
|
+
duration: 150
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
break;
|
|
153
|
+
case 'all-move':
|
|
154
|
+
main.setStyle({
|
|
155
|
+
left: '-70%',
|
|
156
|
+
transition: {
|
|
157
|
+
duration: 150
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
menu.setStyle({
|
|
161
|
+
left: '30%',
|
|
162
|
+
transition: {
|
|
163
|
+
duration: 150
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
//显示主窗体遮罩
|
|
170
|
+
mask.show();
|
|
171
|
+
showMenu = true;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function closeMenu () {
|
|
175
|
+
//窗体移动
|
|
176
|
+
_closeMenu();
|
|
177
|
+
//关闭遮罩
|
|
178
|
+
mask.close();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 关闭侧滑菜单(业务部分)
|
|
183
|
+
*/
|
|
184
|
+
function _closeMenu() {
|
|
185
|
+
if (showMenu) {
|
|
186
|
+
//解决android 4.4以下版本webview移动时,导致fixed定位元素错乱的bug;
|
|
187
|
+
if (mui.os.android && parseFloat(mui.os.version) < 4.4) {
|
|
188
|
+
document.querySelector("header.mui-bar").style.position = "fixed";
|
|
189
|
+
//同时需要修改以下.mui-contnt的padding-top,否则会多出空白;
|
|
190
|
+
document.querySelector(".mui-bar-nav~.mui-content").style.paddingTop = "44px";
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
switch (mode){
|
|
194
|
+
case 'main-move':
|
|
195
|
+
//主窗体开始侧滑;
|
|
196
|
+
main.setStyle({
|
|
197
|
+
left: '0',
|
|
198
|
+
transition: {
|
|
199
|
+
duration: 150
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
break;
|
|
203
|
+
case 'menu-move':
|
|
204
|
+
//主窗体开始侧滑;
|
|
205
|
+
menu.setStyle({
|
|
206
|
+
left: '100%',
|
|
207
|
+
transition: {
|
|
208
|
+
duration: 150
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
break;
|
|
212
|
+
case 'all-move':
|
|
213
|
+
//主窗体开始侧滑;
|
|
214
|
+
main.setStyle({
|
|
215
|
+
left: '0',
|
|
216
|
+
transition: {
|
|
217
|
+
duration: 150
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
//menu页面同时移动
|
|
221
|
+
menu.setStyle({
|
|
222
|
+
left: '100%',
|
|
223
|
+
transition: {
|
|
224
|
+
duration: 150
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
//等窗体动画结束后,隐藏菜单webview,节省资源;
|
|
231
|
+
setTimeout(function() {
|
|
232
|
+
menu.hide();
|
|
233
|
+
}, 300);
|
|
234
|
+
showMenu = false;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
//变换侧滑动画移动效果;
|
|
239
|
+
mui('.mui-input-group').on('change', 'input', function() {
|
|
240
|
+
if (this.checked) {
|
|
241
|
+
switch (this.value) {
|
|
242
|
+
case 'main-move':
|
|
243
|
+
//仅主窗口移动的时候,menu页面的zindex值要低一点;
|
|
244
|
+
menu.setStyle({left:'30%',zindex:9997});
|
|
245
|
+
// menu.hide();
|
|
246
|
+
mode = 'main-move';
|
|
247
|
+
break;
|
|
248
|
+
case 'menu-move':
|
|
249
|
+
menu.setStyle({left:'100%',zindex:9999});
|
|
250
|
+
mode = 'menu-move';
|
|
251
|
+
break;
|
|
252
|
+
case 'all-move':
|
|
253
|
+
//切换为整体移动
|
|
254
|
+
//变换menu界面初始化位置,整体移动时,Menu界面left需要在-70%的地方;
|
|
255
|
+
menu.setStyle({
|
|
256
|
+
left: '100%'
|
|
257
|
+
});
|
|
258
|
+
mode = 'all-move';
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
document.getElementById("show-btn").addEventListener('tap',openMenu);
|
|
266
|
+
//点击侧滑图标,打开侧滑菜单;
|
|
267
|
+
document.querySelector('.mui-action-menu').addEventListener('tap', openMenu);
|
|
268
|
+
//在android4.4中的swipe事件,需要preventDefault一下,否则触发不正常
|
|
269
|
+
//故,在dragleft,dragright中preventDefault
|
|
270
|
+
window.addEventListener('dragright', function(e) {
|
|
271
|
+
e.detail.gesture.preventDefault();
|
|
272
|
+
});
|
|
273
|
+
window.addEventListener('dragleft', function(e) {
|
|
274
|
+
e.detail.gesture.preventDefault();
|
|
275
|
+
});
|
|
276
|
+
//主界面向左滑动,若菜单未显示,则显示菜单;否则不做任何操作;
|
|
277
|
+
window.addEventListener("swipeleft", openMenu);
|
|
278
|
+
//主界面向右滑动,若菜单已显示,则关闭菜单;否则,不做任何操作;
|
|
279
|
+
window.addEventListener("swiperight", closeMenu);
|
|
280
|
+
//menu页面向右滑动,关闭菜单;
|
|
281
|
+
window.addEventListener("menu:swiperight", closeMenu);
|
|
282
|
+
|
|
283
|
+
//重写mui.menu方法,Android版本menu按键按下可自动打开、关闭侧滑菜单;
|
|
284
|
+
mui.menu = function() {
|
|
285
|
+
if (showMenu) {
|
|
286
|
+
closeMenu();
|
|
287
|
+
} else {
|
|
288
|
+
openMenu();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
</script>
|
|
292
|
+
</body>
|
|
293
|
+
</html>
|