core: 修复无法删除自定权限组的问题

This commit is contained in:
undefined committed 2020-11-04 23:46:17 +08:00
1 parent f570ef70a0
commit fa10caaba1
3 files changed
+8 -2

No files matched your search

+5
View File
@@ -63,6 +63,7 @@ export interface Types {
Date: Type,
Time: Type,
Range: (range: Array<string | number> | Dictionary<any>) => Type,
Array: Type,
}
export const Types: Types = {
@@ -130,6 +131,10 @@ export const Types: Types = {
return false;
},
],
Array: [(v) => {
if (v instanceof Array) return v;
return [v] || [];
}, null],
};
function _buildParam(name: string, source: 'get' | 'post' | 'all' | 'route', ...args: Array<Type | boolean | Validator | Converter>) {