vue-moo
Version:
moo
23 lines (20 loc) • 367 B
JavaScript
let timeoutID = null;
const methods = {
open() {
this.m$Show = true;
this.$emit('onoff', true);
},
close() {
this.m$Show = false;
this.$emit('onoff', false);
},
sandClock() {
clearTimeout(timeoutID);
timeoutID = setTimeout(() => {
if (this.m$Show) this.close();
}, this.m$Timeout);
},
};
export default {
methods,
};