mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
fix(VFormDesign): findIndex === -1 (#3305)
This commit is contained in:
parent
6c0b857d7d
commit
d7472b8a2e
@ -1122,13 +1122,11 @@ export const baseComponentAttrs: IBaseComponentProps = componentAttrs;
|
|||||||
|
|
||||||
//在所有的选项中查找需要配置项
|
//在所有的选项中查找需要配置项
|
||||||
const findCompoentProps = (props, name) => {
|
const findCompoentProps = (props, name) => {
|
||||||
const idx = props.findIndex((value: BaseFormAttrs, _index) => {
|
const idx = props.findIndex((value: BaseFormAttrs) => {
|
||||||
return value.name == name;
|
return value.name === name;
|
||||||
});
|
});
|
||||||
if (idx) {
|
if (props[idx] && props[idx].componentProps) {
|
||||||
if (props[idx].componentProps) {
|
return props[idx].componentProps;
|
||||||
return props[idx].componentProps;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user