import { useGlobalInfo } from '#/store'

const store: { dictionaries: anyObj[] } = useGlobalInfo()
const getDict = (key: string) => {
  const d = store.dictionaries.find((i) => i.code === key)
  return d ? d.children : []
}

export default getDict
