放弃vuex改用pinia (#872)

Co-authored-by: bypanghu <bypanghu@163.com>
This commit is contained in:
奇淼(piexlmax
2022-01-07 12:29:32 +08:00
committed by GitHub
co-authored by bypanghu
parent eca5967b4d
commit 727caf3f4f
60 changed files with 681 additions and 918 deletions
+3 -2
View File
@@ -1,11 +1,12 @@
// 权限按钮展示指令
import { store } from '@/store'
import { useUserStore } from '@/pinia/modules/user'
export default {
install: (app) => {
const userStore = useUserStore()
app.directive('auth', {
// 当被绑定的元素插入到 DOM 中时……
mounted: function(el, binding) {
const userInfo = store.getters['user/userInfo']
const userInfo = userStore.userInfo
let type = ''
switch (Object.prototype.toString.call(binding.value)) {
case '[object Array]':