mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-24 21:15:08 +00:00
处理(Warning 'Use of eval is strongly discouraged')警告 (#2424)
This commit is contained in:
@@ -93,7 +93,7 @@ export function useFormEvents({
|
|||||||
} else {
|
} else {
|
||||||
nestKeyArray.forEach((nestKey: string) => {
|
nestKeyArray.forEach((nestKey: string) => {
|
||||||
try {
|
try {
|
||||||
const value = eval('values' + delimiter + nestKey);
|
const value = nestKey.split('.').reduce((out, item) => out[item], values);
|
||||||
if (isDef(value)) {
|
if (isDef(value)) {
|
||||||
formModel[nestKey] = value;
|
formModel[nestKey] = value;
|
||||||
validKeys.push(nestKey);
|
validKeys.push(nestKey);
|
||||||
|
Reference in New Issue
Block a user