forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
506 B
33 lines
506 B
3 years ago
|
var returnThis = function () {
|
||
|
return this;
|
||
|
};
|
||
|
export const registEventFun = (Element) => {
|
||
|
[
|
||
|
'mousedown',
|
||
|
'mouseup',
|
||
|
'mousewheel',
|
||
|
'keydown',
|
||
|
'keyup',
|
||
|
'focus',
|
||
|
'focusin',
|
||
|
'focusout',
|
||
|
'click',
|
||
|
'on',
|
||
|
'off',
|
||
|
'bind',
|
||
|
'unbind',
|
||
|
'trigger',
|
||
|
'hover',
|
||
|
'scroll',
|
||
|
'scrollLeft',
|
||
|
'scrollTop',
|
||
|
'resize',
|
||
|
'show',
|
||
|
'hide',
|
||
|
'dblclick',
|
||
|
'blur',
|
||
|
].forEach((event) => {
|
||
|
Element.registerFunction(event, returnThis);
|
||
|
});
|
||
|
};
|