npm链接:https://www.npmjs.com/package/vue-cookies
npm install vue-cookies --save
import Vue from 'Vue'
import VueCookies from 'vue-cookies'
Vue.use(VueCookies)
this.$cookies.set(keyName, time) //return this
this.$cookies.get(keyName) // return value
this.$cookies.remove(keyName) // return false or true , warning: next version return this; use isKey(keyname) return true/false,please
查看一个cookie是否存在(通过keyName)
this.$cookies.isKey(keyName) // return false or true
this.$cookies.keys() // return a array