修复BUG: 修复demo缺少文件问题
This commit is contained in:
@@ -21,10 +21,10 @@ export default {
|
|||||||
app.use(FastCrud, {
|
app.use(FastCrud, {
|
||||||
//i18n, //i18n配置,可选,默认使用中文,具体用法请看demo里的 src/i18n/index.js 文件
|
//i18n, //i18n配置,可选,默认使用中文,具体用法请看demo里的 src/i18n/index.js 文件
|
||||||
// 此处配置公共的dictRequest(字典请求)
|
// 此处配置公共的dictRequest(字典请求)
|
||||||
async dictRequest({dict}: any) {
|
async dictRequest({dict,url}: any) {
|
||||||
const {isTree} = dict
|
const {isTree} = dict
|
||||||
//根据dict的url,异步返回一个字典数组
|
//根据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) {
|
if (isTree) {
|
||||||
return XEUtils.toArrayTree(res.data, {parentKey: 'parent'})
|
return XEUtils.toArrayTree(res.data, {parentKey: 'parent'})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,9 @@ export const createCrudOptions = function ({
|
|||||||
username: {
|
username: {
|
||||||
title: '测试自定义组件',
|
title: '测试自定义组件',
|
||||||
dict:dict({
|
dict:dict({
|
||||||
url:'/api/system/role/',
|
url({form}){
|
||||||
|
return '/api/system/role/'
|
||||||
|
},
|
||||||
label:'name',
|
label:'name',
|
||||||
value:'id'
|
value:'id'
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user