mirror of
https://gitee.com/eolink_admin/postcat.git
synced 2024-11-30 02:37:57 +08:00
feat: add parseTree type check
This commit is contained in:
parent
fe43cf39a4
commit
669c8b1ac6
@ -55,9 +55,10 @@ export const parseTree = (key, value, level = 0) => {
|
||||
children: data ? Object.keys(data).map((it) => parseTree(it, data[it], level + 1)) : [],
|
||||
};
|
||||
}
|
||||
// * value is string & number & null
|
||||
return {
|
||||
name: key,
|
||||
value,
|
||||
value: value == null ? '' : value.toString(),
|
||||
description: '',
|
||||
type: whatType(value),
|
||||
required: true,
|
||||
|
Loading…
Reference in New Issue
Block a user