处理(Warning 'Use of eval is strongly discouraged')警告 (#2424)
This commit is contained in:
parent
ce030d2d1d
commit
87ee7cd27a
|
|
@ -93,7 +93,7 @@ export function useFormEvents({
|
|||
} else {
|
||||
nestKeyArray.forEach((nestKey: string) => {
|
||||
try {
|
||||
const value = eval('values' + delimiter + nestKey);
|
||||
const value = nestKey.split('.').reduce((out, item) => out[item], values);
|
||||
if (isDef(value)) {
|
||||
formModel[nestKey] = value;
|
||||
validKeys.push(nestKey);
|
||||
|
|
|
|||
Loading…
Reference in New Issue