You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
464 B
TypeScript

3 weeks ago
import { computed } from 'vue';
import { useOptionsStore } from '@/stores/modules/options';
import type { DictCustom } from '@/api/types/system/dict';
/**
* Hook store
* @param dictName
* @returns
*/
export const useDictOptions = (dictName: string) => {
const optionsStore = useOptionsStore();
return computed<DictCustom[]>(() => optionsStore.getDictOptions(dictName) || []);
};