alfhen / vue-cookie

A Vue.js plugin for manipulating cookies
MIT License
822 stars 72 forks source link

TypeError: Cannot read property '$cookies' of undefined #53

Closed yangyongkangse closed 4 years ago

yangyongkangse commented 4 years ago

import Vue from "vue"; import VueCookies from 'vue-cookies'; import App from "./App.vue"; import router from "./router"; import store from "./store"; import Axios from "axios"; import Api from "./index"; import ElementUI from "element-ui"; import "element-ui/lib/theme-chalk/index.css";

Vue.config.productionTip = false; Vue.use(VueCookies) Vue.use(ElementUI); Vue.prototype.$http = Api; new Vue({ VueCookies, router, store, Axios, ElementUI, render: h => h(App) }).$mount("#app");