处理(Warning 'Use of eval is strongly discouraged')警告 (#2424)

This commit is contained in:
yaoyylm 2022-11-25 08:42:02 +08:00 committed by GitHub
parent ce030d2d1d
commit 87ee7cd27a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);