import { dictDataAll } from '@/api/dict' import { ref } from 'vue' export const getDictOptions = (dictType) => { const result = ref([]) dictDataAll({dictType}).then(data => { result.value = data.map(item => { return { text: item.name, value: item.value } }) }) return result; }