We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
版本号:3.5.3 问题描述: src/utils/dict/JDictSelectUtil.js中的getDictItems方法出错 缓存中没有,就请求后台时,ajaxGetDictItems接口返回数据是处理后的,单是接收的参数却用没处理前的返回结果
截图&代码:
/** 通过code获取字典数组 */ export async function getDictItems(dictCode, params) { //优先从缓存中读取字典配置 if (getDictItemsByCode(dictCode)) { let desformDictItems = getDictItemsByCode(dictCode).map((item) => ({ ...item, label: item.text, })); return desformDictItems; } //缓存中没有,就请求后台 // ajaxGetDictItems没有设置不处理返回结果,所以then里的参数应该只有result return await ajaxGetDictItems(dictCode, params) .then(({ success, result }) => { if (success) { let res = result.map((item) => ({ ...item, label: item.text })); console.log('------- 从DB中获取到了字典-------dictCode : ', dictCode, res); return Promise.resolve(res); } else { console.error('getDictItems error: : ', res); return Promise.resolve([]); } }) .catch((res) => { console.error('getDictItems error: ', res); return Promise.resolve([]); }); }
The text was updated successfully, but these errors were encountered:
已经修复,下一版本发布。
Sorry, something went wrong.
No branches or pull requests
版本号:3.5.3
问题描述:
src/utils/dict/JDictSelectUtil.js中的getDictItems方法出错
缓存中没有,就请求后台时,ajaxGetDictItems接口返回数据是处理后的,单是接收的参数却用没处理前的返回结果
截图&代码:
The text was updated successfully, but these errors were encountered: