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,14 +1122,12 @@ export const baseComponentAttrs: IBaseComponentProps = componentAttrs;
|
||||
|
||||
//在所有的选项中查找需要配置项
|
||||
const findCompoentProps = (props, name) => {
|
||||
const idx = props.findIndex((value: BaseFormAttrs, _index) => {
|
||||
return value.name == name;
|
||||
const idx = props.findIndex((value: BaseFormAttrs) => {
|
||||
return value.name === name;
|
||||
});
|
||||
if (idx) {
|
||||
if (props[idx].componentProps) {
|
||||
if (props[idx] && props[idx].componentProps) {
|
||||
return props[idx].componentProps;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 根据其它选项的值更新自身控件配置值
|
||||
|
Loading…
Reference in New Issue
Block a user