vue中设置对象内置函数并引用
auth.js:
import Cookies from 'js-cookie'
const TokenKey = 'vue_admin_template_token'
const auth = {};
auth.getToken = function() {
return Cookies.get(TokenKey)
}
auth.setToken = function(token) {
return Cookies.set(TokenKey, token)
}
auth.rem..
原创
2021-11-19 11:13:23 ·
1187 阅读 ·
0 评论