修复BUG: 修复demo缺少文件问题

This commit is contained in:
猿小天
2024-05-09 10:20:41 +08:00
parent a6e20d88da
commit a03b14a32d
2 changed files with 5 additions and 3 deletions

View File

@@ -21,10 +21,10 @@ export default {
app.use(FastCrud, {
//i18n, //i18n配置可选默认使用中文具体用法请看demo里的 src/i18n/index.js 文件
// 此处配置公共的dictRequest字典请求
async dictRequest({dict}: any) {
async dictRequest({dict,url}: any) {
const {isTree} = dict
//根据dict的url异步返回一个字典数组
return await request({url: dict.url, params: dict.params || {}}).then((res: any) => {
return await request({url: url, params: dict.params || {}}).then((res: any) => {
if (isTree) {
return XEUtils.toArrayTree(res.data, {parentKey: 'parent'})
}