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,
opacity: .3;
}
.mui-bar .mui-btn .mui-icon {
top: 3px;
top: 1px;
padding: 0;
margin: 0;
}
......@@ -1293,9 +1293,14 @@ input[type="submit"]:active, input[type="submit"].mui-active,
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;
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 {
......@@ -1884,6 +1889,9 @@ input[type="submit"]:active, input[type="submit"].mui-active,
padding: 10px 0;
margin: 0;
}
.mui-grid-view.mui-grid-9:before {
height: 0;
}
.mui-grid-view.mui-grid-9 .mui-media {
color: #797979;
}
......@@ -2321,11 +2329,6 @@ select:focus {
opacity: .8;
}
.mui-bar .mui-input-row.mui-search .mui-icon-speech {
top: -2px;
right: 10px;
}
.mui-search {
position: relative;
}
......@@ -3112,6 +3115,10 @@ select:focus {
top: 44px;
}
.mui-bar-nav ~ .mui-bar-header-secondary ~ .mui-content .mui-pull-top-pocket {
top: 88px;
}
.mui-pull-bottom-pocket {
position: relative;
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 @@
*/
var mui = (function(document, undefined) {
var readyRE = /complete|loaded|interactive/;
var idSelectorRE = /^#([\w-]*)$/;
var idSelectorRE = /^#([\w-]+)$/;
var classSelectorRE = /^\.([\w-]+)$/;
var tagSelectorRE = /^[\w-]+$/;
var translateRE = /translate(?:3d)?\((.+?)\)/;
......@@ -23,14 +23,15 @@ var mui = (function(document, undefined) {
return wrap([selector], null);
if (typeof selector === 'function')
return $.ready(selector);
if (typeof selector === 'string') {
try {
selector = selector.trim();
if (idSelectorRE.test(selector)) {
var found = document.getElementById(RegExp.$1);
return wrap(found ? [found] : []);
}
return wrap($.qsa(selector, context), selector);
} catch (e) {
} catch (e) {}
}
return wrap();
};
......@@ -179,7 +180,7 @@ var mui = (function(document, undefined) {
$.map = function(elements, callback) {
var value, values = [],
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++) {
value = callback(elements[i], i);
if (value != null) values.push(value);
......@@ -484,11 +485,9 @@ var mui = (function(document, undefined) {
};
var evt = document.createEvent('Events');
var bubbles = true;
if (params) {
for (var name in params) {
(name === 'bubbles') ? (bubbles = !!params[name]) : (evt[name] = params[name]);
}
}
evt.initEvent(event, bubbles, true);
return evt;
};
......@@ -553,13 +552,9 @@ var mui = (function(document, undefined) {
* @returns {undefined}
*/
(function(window) {
var lastTime = 0;
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = window.webkitRequestAnimationFrame;
window.cancelAnimationFrame = window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame;
}
if (!window.requestAnimationFrame) {
window.requestAnimationFrame = function(callback, element) {
var lastTime = 0;
window.requestAnimationFrame = window.webkitRequestAnimationFrame || function(callback, element) {
var currTime = new Date().getTime();
var timeToCall = Math.max(0, 16.7 - (currTime - lastTime));
var id = window.setTimeout(function() {
......@@ -568,12 +563,10 @@ var mui = (function(document, undefined) {
lastTime = currTime + timeToCall;
return id;
};
}
if (!window.cancelAnimationFrame) {
window.cancelAnimationFrame = function(id) {
window.cancelAnimationFrame = window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || function(id) {
clearTimeout(id);
};
}
};
}(window));
/**
* fastclick(only for radio,checkbox)
......@@ -1641,7 +1634,7 @@ var mui = (function(document, undefined) {
webview = plus.webview.create(options.url, id, options.styles, options.extras);
//TODO 理论上,子webview也应该计算到预加载队列中,但这样就麻烦了,要退必须退整体,否则可能出现问题;
webview.addEventListener('loaded', function() {
$.currentWebview.append(webview);
plus.webview.currentWebview().append(webview);
});
$.webviews[id] = options;
}
......@@ -1670,21 +1663,21 @@ var mui = (function(document, undefined) {
$.appendWebview(subpage);
});
//判断是否首页
if ($.currentWebview === plus.webview.getWebviewById(plus.runtime.appid)) {
if (plus.webview.currentWebview() === plus.webview.getWebviewById(plus.runtime.appid)) {
$.isHomePage = true;
//首页需要自己激活预加载;
//timeout因为子页面loaded之后才append的,防止子页面尚未append、从而导致其preload未触发的问题;
setTimeout(function() {
triggerPreload($.currentWebview);
triggerPreload(plus.webview.currentWebview());
}, 300);
}
//设置ios顶部状态栏颜色;
if ($.os.ios && $.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后,父窗体标题延迟渲染的问题;
if(plus.webview.currentWebview().parent()==null){
if (plus.webview.currentWebview().parent() == null) {
document.addEventListener("resume", function() {
var body = document.body;
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 @@
</p>
<p>更多详细介绍,请到<a href="http://dcloudio.github.io/mui">mui官网</a>查看;</p>
<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>
<p>
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