/**
 * 权限按钮
 */
import {apiGetAuthBtnList} from '@/api/common';
import { defineStore } from "pinia";
export const useAuthBtnStore = defineStore('authBtn',{
    state:()=>{
        return {
            authBtnList:[]
        }
    },
    actions:{
        getAuthList(){
            return new Promise((resolve)=>{
                apiGetAuthBtnList().then(res=>{
                    this.authBtnList = res.Data||[]
                })
                /* 
                //mock
                this.authBtnList = [
                    {ButtonCode:'reportManage:reportAdd'},
                ] */
                resolve('权限获取成功')
            })
        }
    }
})