This commit is contained in:
2023-08-11 10:45:20 +08:00
commit 161ca982f3
31850 changed files with 2706500 additions and 0 deletions

29
node_modules/vant/es/mixins/bind-event.js generated vendored Normal file
View File

@ -0,0 +1,29 @@
/**
* Bind event when mounted or activated
*/
import { on, off } from '../utils/dom/event';
var uid = 0;
export function BindEventMixin(handler) {
var key = "binded_" + uid++;
function bind() {
if (!this[key]) {
handler.call(this, on, true);
this[key] = true;
}
}
function unbind() {
if (this[key]) {
handler.call(this, off, false);
this[key] = false;
}
}
return {
mounted: bind,
activated: bind,
deactivated: unbind,
beforeDestroy: unbind
};
}