Commit ee023d26 authored by hbcui1984's avatar hbcui1984

解决hello mui点击圆形图标时,取值错误的bug

parent a6103f68
...@@ -1087,7 +1087,7 @@ input[type="submit"]:enabled:active, input[type="submit"].mui-active:enabled, ...@@ -1087,7 +1087,7 @@ input[type="submit"]:enabled:active, input[type="submit"].mui-active:enabled,
height: 44px; height: 44px;
padding-right: 10px; padding-right: 10px;
padding-left: 10px; padding-left: 10px;
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
border-bottom: 0; border-bottom: 0;
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .85); -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .85);
box-shadow: 0 0 1px rgba(0, 0, 0, .85); box-shadow: 0 0 1px rgba(0, 0, 0, .85);
...@@ -2564,7 +2564,7 @@ select:focus { ...@@ -2564,7 +2564,7 @@ select:focus {
z-index: 999; z-index: 999;
display: none; display: none;
width: 280px; width: 280px;
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
border-radius: 7px; border-radius: 7px;
-webkit-box-shadow: 0 0 15px rgba(0, 0, 0, .1); -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, .1);
box-shadow: 0 0 15px rgba(0, 0, 0, .1); box-shadow: 0 0 15px rgba(0, 0, 0, .1);
...@@ -2592,7 +2592,7 @@ select:focus { ...@@ -2592,7 +2592,7 @@ select:focus {
width: 26px; width: 26px;
height: 26px; height: 26px;
content: ' '; content: ' ';
background: rgba(247, 247, 247, .98); background: #f7f7f7;
border-radius: 3px; border-radius: 3px;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -2718,7 +2718,7 @@ select:focus { ...@@ -2718,7 +2718,7 @@ select:focus {
margin-bottom: 0; margin-bottom: 0;
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
background-image: none; background-image: none;
border-radius: 7px; border-radius: 7px;
} }
...@@ -3055,8 +3055,8 @@ select:focus { ...@@ -3055,8 +3055,8 @@ select:focus {
content: "Off"; content: "Off";
} }
.mui-switch.mui-dragging { .mui-switch.mui-dragging {
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
border-color: rgba(247, 247, 247, .98); border-color: #f7f7f7;
} }
.mui-switch.mui-dragging .mui-switch-handle { .mui-switch.mui-dragging .mui-switch-handle {
width: 38px; width: 38px;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -681,6 +681,7 @@ var mui = (function(document, undefined) { ...@@ -681,6 +681,7 @@ var mui = (function(document, undefined) {
clickEvent.initMouseEvent('click', true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); clickEvent.initMouseEvent('click', true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
clickEvent.forwardedTouchEvent = true; clickEvent.forwardedTouchEvent = true;
targetElement.dispatchEvent(clickEvent); targetElement.dispatchEvent(clickEvent);
event.detail && event.detail.gesture.preventDefault();
} }
}; };
window.addEventListener('tap', dispatchEvent); window.addEventListener('tap', dispatchEvent);
...@@ -6355,10 +6356,17 @@ var mui = (function(document, undefined) { ...@@ -6355,10 +6356,17 @@ var mui = (function(document, undefined) {
var Numbox = $.Numbox = $.Class.extend({ var Numbox = $.Numbox = $.Class.extend({
init: function(holder, options) { init: function(holder, options) {
var self = this; var self = this;
if (!holder) {
throw "构造 numbox 时缺少容器元素";
}
self.holder = holder;
//避免重复初始化开始
if (self.holder.__numbox_inited) return;
self.holder.__numbox_inited = true;
//避免重复初始化结束
options = options || {}; options = options || {};
options.step = parseInt(options.step || 1); options.step = parseInt(options.step || 1);
self.options = options; self.options = options;
self.holder = holder;
self.input = $.qsa('.' + inputClassName, self.holder)[0]; self.input = $.qsa('.' + inputClassName, self.holder)[0];
self.plus = $.qsa('.' + plusClassName, self.holder)[0]; self.plus = $.qsa('.' + plusClassName, self.holder)[0];
self.minus = $.qsa('.' + minusClassName, self.holder)[0]; self.minus = $.qsa('.' + minusClassName, self.holder)[0];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1087,7 +1087,7 @@ input[type="submit"]:enabled:active, input[type="submit"].mui-active:enabled, ...@@ -1087,7 +1087,7 @@ input[type="submit"]:enabled:active, input[type="submit"].mui-active:enabled,
height: 44px; height: 44px;
padding-right: 10px; padding-right: 10px;
padding-left: 10px; padding-left: 10px;
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
border-bottom: 0; border-bottom: 0;
-webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .85); -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, .85);
box-shadow: 0 0 1px rgba(0, 0, 0, .85); box-shadow: 0 0 1px rgba(0, 0, 0, .85);
...@@ -2564,7 +2564,7 @@ select:focus { ...@@ -2564,7 +2564,7 @@ select:focus {
z-index: 999; z-index: 999;
display: none; display: none;
width: 280px; width: 280px;
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
border-radius: 7px; border-radius: 7px;
-webkit-box-shadow: 0 0 15px rgba(0, 0, 0, .1); -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, .1);
box-shadow: 0 0 15px rgba(0, 0, 0, .1); box-shadow: 0 0 15px rgba(0, 0, 0, .1);
...@@ -2592,7 +2592,7 @@ select:focus { ...@@ -2592,7 +2592,7 @@ select:focus {
width: 26px; width: 26px;
height: 26px; height: 26px;
content: ' '; content: ' ';
background: rgba(247, 247, 247, .98); background: #f7f7f7;
border-radius: 3px; border-radius: 3px;
-webkit-transform: rotate(45deg); -webkit-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
...@@ -2718,7 +2718,7 @@ select:focus { ...@@ -2718,7 +2718,7 @@ select:focus {
margin-bottom: 0; margin-bottom: 0;
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
background-image: none; background-image: none;
border-radius: 7px; border-radius: 7px;
} }
...@@ -3055,8 +3055,8 @@ select:focus { ...@@ -3055,8 +3055,8 @@ select:focus {
content: "Off"; content: "Off";
} }
.mui-switch.mui-dragging { .mui-switch.mui-dragging {
background-color: rgba(247, 247, 247, .98); background-color: #f7f7f7;
border-color: rgba(247, 247, 247, .98); border-color: #f7f7f7;
} }
.mui-switch.mui-dragging .mui-switch-handle { .mui-switch.mui-dragging .mui-switch-handle {
width: 38px; width: 38px;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -681,6 +681,7 @@ var mui = (function(document, undefined) { ...@@ -681,6 +681,7 @@ var mui = (function(document, undefined) {
clickEvent.initMouseEvent('click', true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); clickEvent.initMouseEvent('click', true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
clickEvent.forwardedTouchEvent = true; clickEvent.forwardedTouchEvent = true;
targetElement.dispatchEvent(clickEvent); targetElement.dispatchEvent(clickEvent);
event.detail && event.detail.gesture.preventDefault();
} }
}; };
window.addEventListener('tap', dispatchEvent); window.addEventListener('tap', dispatchEvent);
...@@ -6355,10 +6356,17 @@ var mui = (function(document, undefined) { ...@@ -6355,10 +6356,17 @@ var mui = (function(document, undefined) {
var Numbox = $.Numbox = $.Class.extend({ var Numbox = $.Numbox = $.Class.extend({
init: function(holder, options) { init: function(holder, options) {
var self = this; var self = this;
if (!holder) {
throw "构造 numbox 时缺少容器元素";
}
self.holder = holder;
//避免重复初始化开始
if (self.holder.__numbox_inited) return;
self.holder.__numbox_inited = true;
//避免重复初始化结束
options = options || {}; options = options || {};
options.step = parseInt(options.step || 1); options.step = parseInt(options.step || 1);
self.options = options; self.options = options;
self.holder = holder;
self.input = $.qsa('.' + inputClassName, self.holder)[0]; self.input = $.qsa('.' + inputClassName, self.holder)[0];
self.plus = $.qsa('.' + plusClassName, self.holder)[0]; self.plus = $.qsa('.' + plusClassName, self.holder)[0];
self.minus = $.qsa('.' + minusClassName, self.holder)[0]; self.minus = $.qsa('.' + minusClassName, self.holder)[0];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -604,10 +604,10 @@ ...@@ -604,10 +604,10 @@
if (!id) { if (!id) {
id = ++$.uuid; id = ++$.uuid;
$.data[id] = viewApi = new View(self, options); $.data[id] = viewApi = new View(self, options);
self.setAttribute('data-view', id);
} else { } else {
viewApi = $.data[id]; viewApi = $.data[id];
} }
return viewApi; return viewApi;
} }
})(mui, window); })(mui, window);
\ No newline at end of file
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
clickEvent.initMouseEvent('click', true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null); clickEvent.initMouseEvent('click', true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
clickEvent.forwardedTouchEvent = true; clickEvent.forwardedTouchEvent = true;
targetElement.dispatchEvent(clickEvent); targetElement.dispatchEvent(clickEvent);
event.detail && event.detail.gesture.preventDefault();
} }
}; };
window.addEventListener('tap', dispatchEvent); window.addEventListener('tap', dispatchEvent);
......
...@@ -18,10 +18,17 @@ ...@@ -18,10 +18,17 @@
var Numbox = $.Numbox = $.Class.extend({ var Numbox = $.Numbox = $.Class.extend({
init: function(holder, options) { init: function(holder, options) {
var self = this; var self = this;
if (!holder) {
throw "构造 numbox 时缺少容器元素";
}
self.holder = holder;
//避免重复初始化开始
if (self.holder.__numbox_inited) return;
self.holder.__numbox_inited = true;
//避免重复初始化结束
options = options || {}; options = options || {};
options.step = parseInt(options.step || 1); options.step = parseInt(options.step || 1);
self.options = options; self.options = options;
self.holder = holder;
self.input = $.qsa('.' + inputClassName, self.holder)[0]; self.input = $.qsa('.' + inputClassName, self.holder)[0];
self.plus = $.qsa('.' + plusClassName, self.holder)[0]; self.plus = $.qsa('.' + plusClassName, self.holder)[0];
self.minus = $.qsa('.' + minusClassName, self.holder)[0]; self.minus = $.qsa('.' + minusClassName, self.holder)[0];
......
...@@ -20,7 +20,8 @@ $line-height-default: 21px !default; ...@@ -20,7 +20,8 @@ $line-height-default: 21px !default;
$primary-color: #007aff !default; $primary-color: #007aff !default;
//green theme //green theme
//$primary-color: #4cd964 !default; //$primary-color: #4cd964 !default;
$chrome-color: rgba(247,247,247,.98) !default; //$chrome-color: rgba(247,247,247,.98) !default;
$chrome-color: rgb(247,247,247) !default;
// Action colors // Action colors
$default-color: #929292 !default; $default-color: #929292 !default;
......
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