dictionaryData: function(dictionaryType) {
if (dictionaryType) {
let res =helper.ajaxPromise({
url: `/system/dict-biz/list?code=${dictionaryType}`,
})
return res
}
}
//promise 返回的是一个promise对象 需要async和await 获取
const res=await jnpf.dictionaryData(fields[i].__config__.dictionaryType)
_options=res.data.data[0].children
调用函数拿到promise返回值
于 2023-02-15 17:07:58 首次发布