UNPKG

@a-latte/vue2-helpers

Version:

A util package to use Vue 2 with Composition API easily

10 lines (9 loc) 545 B
/** * @agan/vue2-helpers@2.0.2 * A util package to use Vue 2 with Composition API easily * @author Agan <1094143007@qq.com> * @license Apache-2.0 * @see {@link https://github.com/AganAgain/vue2-helpers#readme} */ import o,{getCurrentInstance as n}from"vue";import e,{Store as r}from"vuex";var t=console.warn;function u(n){return o.use(e),new r(n)}function i(){var o=n();if(o)return o.proxy.$store;t("method can only be used inside setup() or functional components")}export{u as createStore,i as useStore}; //# sourceMappingURL=vuex.js.map