|
|
@ -44659,6 +44659,7 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
BI.Input.superclass._init.apply(this, arguments); |
|
|
|
BI.Input.superclass._init.apply(this, arguments); |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var ctrlKey = false; |
|
|
|
var ctrlKey = false; |
|
|
|
|
|
|
|
var keyCode = null; |
|
|
|
var inputEventValid = false; |
|
|
|
var inputEventValid = false; |
|
|
|
var _keydown = BI.debounce(function (keyCode) { |
|
|
|
var _keydown = BI.debounce(function (keyCode) { |
|
|
|
self.onKeyDown(keyCode, ctrlKey); |
|
|
|
self.onKeyDown(keyCode, ctrlKey); |
|
|
@ -44680,20 +44681,24 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
.keydown(function (e) { |
|
|
|
.keydown(function (e) { |
|
|
|
inputEventValid = false; |
|
|
|
inputEventValid = false; |
|
|
|
ctrlKey = e.ctrlKey; |
|
|
|
ctrlKey = e.ctrlKey; |
|
|
|
|
|
|
|
keyCode = e.keyCode; |
|
|
|
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments); |
|
|
|
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.keyup(function (e) { |
|
|
|
.keyup(function (e) { |
|
|
|
|
|
|
|
keyCode = null; |
|
|
|
if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { |
|
|
|
if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) { |
|
|
|
self._keydown_ = true; |
|
|
|
self._keydown_ = true; |
|
|
|
_keydown(e.keyCode); |
|
|
|
_keydown(e.keyCode); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.on("input propertychange", function (e) { |
|
|
|
.on("input propertychange", function (e) { |
|
|
|
|
|
|
|
// 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了
|
|
|
|
// 这个事件在input的属性发生改变的时候就会触发(class的变化也算)
|
|
|
|
// 这个事件在input的属性发生改变的时候就会触发(class的变化也算)
|
|
|
|
if (BI.isNotNull(e.keyCode)) { |
|
|
|
if (BI.isNotNull(keyCode)) { |
|
|
|
|
|
|
|
keyCode = null; |
|
|
|
inputEventValid = true; |
|
|
|
inputEventValid = true; |
|
|
|
self._keydown_ = true; |
|
|
|
self._keydown_ = true; |
|
|
|
_keydown(e.keyCode); |
|
|
|
_keydown(keyCode); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.click(function (e) { |
|
|
|
.click(function (e) { |
|
|
@ -44937,7 +44942,8 @@ BI.Input.EVENT_VALID = "EVENT_VALID"; |
|
|
|
BI.Input.EVENT_ERROR = "EVENT_ERROR"; |
|
|
|
BI.Input.EVENT_ERROR = "EVENT_ERROR"; |
|
|
|
BI.Input.EVENT_ENTER = "EVENT_ENTER"; |
|
|
|
BI.Input.EVENT_ENTER = "EVENT_ENTER"; |
|
|
|
BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT"; |
|
|
|
BI.Input.EVENT_RESTRICT = "EVENT_RESTRICT"; |
|
|
|
BI.shortcut("bi.input", BI.Input);/** |
|
|
|
BI.shortcut("bi.input", BI.Input); |
|
|
|
|
|
|
|
/** |
|
|
|
* guy |
|
|
|
* guy |
|
|
|
* @extends BI.Single |
|
|
|
* @extends BI.Single |
|
|
|
* @type {*|void|Object} |
|
|
|
* @type {*|void|Object} |
|
|
|