import store from '@/store'
import { MessageFu } from './message'

// 看下有没有权限
export const authorityFu = (id: number, txt: string, fu: () => void) => {
  const authorityIds = store.getState().A0Layout.authorityIds

  if (authorityIds.includes(id)) fu()
  else MessageFu.warning(txt)
}
