Commit 46297ad4 authored by hbcui1984's avatar hbcui1984

编译至v1.4.0

parent b4ceb1dd
/*! /*!
* ===================================================== * =====================================================
* Mui v1.3.0 (https://github.com/dcloudio/mui) * Mui v1.4.0 (https://github.com/dcloudio/mui)
* ===================================================== * =====================================================
*/ */
...@@ -1267,7 +1267,7 @@ input[type="submit"]:active, input[type="submit"].mui-active, ...@@ -1267,7 +1267,7 @@ input[type="submit"]:active, input[type="submit"].mui-active,
opacity: .3; opacity: .3;
} }
.mui-bar .mui-btn .mui-icon { .mui-bar .mui-btn .mui-icon {
top: 3px; top: 1px;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
...@@ -1293,9 +1293,14 @@ input[type="submit"]:active, input[type="submit"].mui-active, ...@@ -1293,9 +1293,14 @@ input[type="submit"]:active, input[type="submit"].mui-active,
margin-top: -10px; margin-top: -10px;
} }
.mui-bar .mui-input-row .mui-input-clear ~ .mui-icon-clear, .mui-input-row .mui-input-speech ~ .mui-icon-speech { .mui-bar .mui-input-row .mui-input-clear ~ .mui-icon-clear, .mui-bar .mui-input-row .mui-input-speech ~ .mui-icon-speech {
top: 0; top: 0;
right: 17%; right: 12px;
}
.mui-bar.mui-bar-header-secondary .mui-input-row .mui-input-clear ~ .mui-icon-clear, .mui-bar.mui-bar-header-secondary .mui-input-row .mui-input-speech ~ .mui-icon-speech {
top: 0;
right: 0;
} }
.mui-bar .mui-segmented-control { .mui-bar .mui-segmented-control {
...@@ -1884,6 +1889,9 @@ input[type="submit"]:active, input[type="submit"].mui-active, ...@@ -1884,6 +1889,9 @@ input[type="submit"]:active, input[type="submit"].mui-active,
padding: 10px 0; padding: 10px 0;
margin: 0; margin: 0;
} }
.mui-grid-view.mui-grid-9:before {
height: 0;
}
.mui-grid-view.mui-grid-9 .mui-media { .mui-grid-view.mui-grid-9 .mui-media {
color: #797979; color: #797979;
} }
...@@ -2321,11 +2329,6 @@ select:focus { ...@@ -2321,11 +2329,6 @@ select:focus {
opacity: .8; opacity: .8;
} }
.mui-bar .mui-input-row.mui-search .mui-icon-speech {
top: -2px;
right: 10px;
}
.mui-search { .mui-search {
position: relative; position: relative;
} }
...@@ -3112,6 +3115,10 @@ select:focus { ...@@ -3112,6 +3115,10 @@ select:focus {
top: 44px; top: 44px;
} }
.mui-bar-nav ~ .mui-bar-header-secondary ~ .mui-content .mui-pull-top-pocket {
top: 88px;
}
.mui-pull-bottom-pocket { .mui-pull-bottom-pocket {
position: relative; position: relative;
bottom: 0; bottom: 0;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*! /*!
* ===================================================== * =====================================================
* Mui v1.3.0 (https://github.com/dcloudio/mui) * Mui v1.4.0 (https://github.com/dcloudio/mui)
* ===================================================== * =====================================================
*/ */
/** /**
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
*/ */
var mui = (function(document, undefined) { var mui = (function(document, undefined) {
var readyRE = /complete|loaded|interactive/; var readyRE = /complete|loaded|interactive/;
var idSelectorRE = /^#([\w-]*)$/; var idSelectorRE = /^#([\w-]+)$/;
var classSelectorRE = /^\.([\w-]+)$/; var classSelectorRE = /^\.([\w-]+)$/;
var tagSelectorRE = /^[\w-]+$/; var tagSelectorRE = /^[\w-]+$/;
var translateRE = /translate(?:3d)?\((.+?)\)/; var translateRE = /translate(?:3d)?\((.+?)\)/;
...@@ -23,14 +23,15 @@ var mui = (function(document, undefined) { ...@@ -23,14 +23,15 @@ var mui = (function(document, undefined) {
return wrap([selector], null); return wrap([selector], null);
if (typeof selector === 'function') if (typeof selector === 'function')
return $.ready(selector); return $.ready(selector);
if (typeof selector === 'string') {
try { try {
selector = selector.trim();
if (idSelectorRE.test(selector)) { if (idSelectorRE.test(selector)) {
var found = document.getElementById(RegExp.$1); var found = document.getElementById(RegExp.$1);
return wrap(found ? [found] : []); return wrap(found ? [found] : []);
} }
return wrap($.qsa(selector, context), selector); return wrap($.qsa(selector, context), selector);
} catch (e) { } catch (e) {}
} }
return wrap(); return wrap();
}; };
...@@ -179,7 +180,7 @@ var mui = (function(document, undefined) { ...@@ -179,7 +180,7 @@ var mui = (function(document, undefined) {
$.map = function(elements, callback) { $.map = function(elements, callback) {
var value, values = [], var value, values = [],
i, key; i, key;
if (typeof elements.length === 'number') { if (typeof elements.length === 'number') { //TODO 此处逻辑不严谨,可能会有Object:{a:'b',length:1}的情况未处理
for (i = 0, len = elements.length; i < len; i++) { for (i = 0, len = elements.length; i < len; i++) {
value = callback(elements[i], i); value = callback(elements[i], i);
if (value != null) values.push(value); if (value != null) values.push(value);
...@@ -484,11 +485,9 @@ var mui = (function(document, undefined) { ...@@ -484,11 +485,9 @@ var mui = (function(document, undefined) {
}; };
var evt = document.createEvent('Events'); var evt = document.createEvent('Events');
var bubbles = true; var bubbles = true;
if (params) {
for (var name in params) { for (var name in params) {
(name === 'bubbles') ? (bubbles = !!params[name]) : (evt[name] = params[name]); (name === 'bubbles') ? (bubbles = !!params[name]) : (evt[name] = params[name]);
} }
}
evt.initEvent(event, bubbles, true); evt.initEvent(event, bubbles, true);
return evt; return evt;
}; };
...@@ -553,13 +552,9 @@ var mui = (function(document, undefined) { ...@@ -553,13 +552,9 @@ var mui = (function(document, undefined) {
* @returns {undefined} * @returns {undefined}
*/ */
(function(window) { (function(window) {
var lastTime = 0;
if (!window.requestAnimationFrame) { if (!window.requestAnimationFrame) {
window.requestAnimationFrame = window.webkitRequestAnimationFrame; var lastTime = 0;
window.cancelAnimationFrame = window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame; window.requestAnimationFrame = window.webkitRequestAnimationFrame || function(callback, element) {
}
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = function(callback, element) {
var currTime = new Date().getTime(); var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16.7 - (currTime - lastTime)); var timeToCall = Math.max(0, 16.7 - (currTime - lastTime));
var id = window.setTimeout(function() { var id = window.setTimeout(function() {
...@@ -568,12 +563,10 @@ var mui = (function(document, undefined) { ...@@ -568,12 +563,10 @@ var mui = (function(document, undefined) {
lastTime = currTime + timeToCall; lastTime = currTime + timeToCall;
return id; return id;
}; };
} window.cancelAnimationFrame = window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || function(id) {
if (!window.cancelAnimationFrame) {
window.cancelAnimationFrame = function(id) {
clearTimeout(id); clearTimeout(id);
}; };
} };
}(window)); }(window));
/** /**
* fastclick(only for radio,checkbox) * fastclick(only for radio,checkbox)
...@@ -1641,7 +1634,7 @@ var mui = (function(document, undefined) { ...@@ -1641,7 +1634,7 @@ var mui = (function(document, undefined) {
webview = plus.webview.create(options.url, id, options.styles, options.extras); webview = plus.webview.create(options.url, id, options.styles, options.extras);
//TODO 理论上,子webview也应该计算到预加载队列中,但这样就麻烦了,要退必须退整体,否则可能出现问题; //TODO 理论上,子webview也应该计算到预加载队列中,但这样就麻烦了,要退必须退整体,否则可能出现问题;
webview.addEventListener('loaded', function() { webview.addEventListener('loaded', function() {
$.currentWebview.append(webview); plus.webview.currentWebview().append(webview);
}); });
$.webviews[id] = options; $.webviews[id] = options;
} }
...@@ -1670,21 +1663,21 @@ var mui = (function(document, undefined) { ...@@ -1670,21 +1663,21 @@ var mui = (function(document, undefined) {
$.appendWebview(subpage); $.appendWebview(subpage);
}); });
//判断是否首页 //判断是否首页
if ($.currentWebview === plus.webview.getWebviewById(plus.runtime.appid)) { if (plus.webview.currentWebview() === plus.webview.getWebviewById(plus.runtime.appid)) {
$.isHomePage = true; $.isHomePage = true;
//首页需要自己激活预加载; //首页需要自己激活预加载;
//timeout因为子页面loaded之后才append的,防止子页面尚未append、从而导致其preload未触发的问题; //timeout因为子页面loaded之后才append的,防止子页面尚未append、从而导致其preload未触发的问题;
setTimeout(function() { setTimeout(function() {
triggerPreload($.currentWebview); triggerPreload(plus.webview.currentWebview());
}, 300); }, 300);
} }
//设置ios顶部状态栏颜色; //设置ios顶部状态栏颜色;
if ($.os.ios && $.options.statusBarBackground) { if ($.os.ios && $.options.statusBarBackground) {
plus.navigator.setStatusBarBackground($.options.statusBarBackground); plus.navigator.setStatusBarBackground($.options.statusBarBackground);
} }
if($.os.android&&parseFloat($.os.version) < 4.4){ if ($.os.android && parseFloat($.os.version) < 4.4) {
//解决Android平台4.4版本以下,resume后,父窗体标题延迟渲染的问题; //解决Android平台4.4版本以下,resume后,父窗体标题延迟渲染的问题;
if(plus.webview.currentWebview().parent()==null){ if (plus.webview.currentWebview().parent() == null) {
document.addEventListener("resume", function() { document.addEventListener("resume", function() {
var body = document.body; var body = document.body;
body.style.display = 'none'; body.style.display = 'none';
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</p> </p>
<p>更多详细介绍,请到<a href="http://dcloudio.github.io/mui">mui官网</a>查看;</p> <p>更多详细介绍,请到<a href="http://dcloudio.github.io/mui">mui官网</a>查看;</p>
<h4>版本介绍</h4> <h4>版本介绍</h4>
<p>当前版本为1.3.0,可到<a href="https://github.com/dcloudio/mui">Github</a>上获取最新版本。</p> <p>当前版本为1.4.0,可到<a href="https://github.com/dcloudio/mui">Github</a>上获取最新版本。</p>
<h4>License</h4> <h4>License</h4>
<p> <p>
mui遵循MIT License,源码已提交至Github,<a href="https://github.com/dcloudio/mui">点击查看</a>; mui遵循MIT License,源码已提交至Github,<a href="https://github.com/dcloudio/mui">点击查看</a>;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment