Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # web/src/utils/commonCrud.ts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// 引入fast-crud
|
||||
import {FastCrud, useTypes} from '@fast-crud/fast-crud';
|
||||
|
||||
const {getType} = useTypes();
|
||||
import '@fast-crud/fast-crud/dist/style.css';
|
||||
import {setLogger} from '@fast-crud/fast-crud';
|
||||
@@ -10,9 +11,8 @@ import { request } from '/@/utils/service';
|
||||
//扩展包
|
||||
import {FsExtendsEditor, FsExtendsUploader} from '@fast-crud/fast-extends';
|
||||
import '@fast-crud/fast-extends/dist/style.css';
|
||||
import { successMessage, successNotification } from '/@/utils/message';
|
||||
import {successNotification} from '/@/utils/message';
|
||||
import XEUtils from "xe-utils";
|
||||
import {commonCrudConfig} from "/@/utils/commonCrud";
|
||||
export default {
|
||||
async install(app: any, options: any) {
|
||||
// 先安装ui
|
||||
@@ -121,6 +121,7 @@ export default {
|
||||
const dictComponentList = ['dict-cascader', 'dict-checkbox', 'dict-radio', 'dict-select', 'dict-switch', 'dict-tree'];
|
||||
dictComponentList.forEach((val) => {
|
||||
getType(val).column.component.color = 'auto';
|
||||
getType(val).column.align = 'center';
|
||||
});
|
||||
// 设置placeholder 的默认值
|
||||
const placeholderComponentList = [
|
||||
@@ -140,6 +141,13 @@ export default {
|
||||
} else if (getType(val.key)?.form) {
|
||||
getType(val.key).form.component = {placeholder: val.placeholder};
|
||||
}
|
||||
if (getType(val.key)?.column?.align) {
|
||||
getType(val.key).column.align = 'center'
|
||||
} else if (getType(val.key)?.column) {
|
||||
getType(val.key).column = {align: 'center'};
|
||||
} else if (getType(val.key)) {
|
||||
getType(val.key).column = {align: 'center'};
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@@ -156,12 +156,6 @@ export const commonCrudConfig = (options = {
|
||||
column: {
|
||||
width: 160,
|
||||
show: options.create_datetime?.table || false,
|
||||
},
|
||||
form: {
|
||||
show: false,
|
||||
},
|
||||
viewForm: {
|
||||
show: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user