let a = eval('v_' + arr1[0]) 报错 eval can be harmful
解决办法:
// methods中定义一个evil 方法
methods:{
evil (fn) {
let Fn = Function
return new Fn('return ' + fn)()
},
aa(){
let a = this..evil('v_' + arr1[0])
}
}
let a = eval('v_' + arr1[0]) 报错 eval can be harmful
解决办法:
// methods中定义一个evil 方法
methods:{
evil (fn) {
let Fn = Function
return new Fn('return ' + fn)()
},
aa(){
let a = this..evil('v_' + arr1[0])
}
}