UNPKG

vue-plugin-helper-decorator

Version:
24 lines 737 B
import { createDecorator } from 'vue-class-component'; /** * Idle-vue helper * Reflect the method to component onIdle option * https://github.com/soixantecircuits/idle-vue */ export function OnIdle() { return createDecorator(function (componentOptions, handler) { const options = componentOptions; options.onIdle = options.methods[handler]; }); } /** * Idle-vue helper * Reflect the method to component onActive option * https://github.com/soixantecircuits/idle-vue */ export function OnActive() { return createDecorator(function (componentOptions, handler) { const options = componentOptions; options.onActive = options.methods[handler]; }); } //# sourceMappingURL=idle-vue.js.map