@u3u/vue-hooks
Version:
⚡️ Awesome Vue Hooks
17 lines (16 loc) • 452 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var runtime = {};
function getRuntimeVM() {
if (runtime.vm)
return runtime.vm;
throw new ReferenceError('[vue-hooks] Not found vue instance.');
}
exports.getRuntimeVM = getRuntimeVM;
function setRuntimeVM(vue) {
var vm = this || vue;
if (typeof vm.$options.setup === 'function') {
runtime.vm = vm;
}
}
exports.setRuntimeVM = setRuntimeVM;