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

15 lines
300 B

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;
}