会报 eval can be harmful"/>
使用eval,vue eslint会报 eval can be harmful
eval(this.sevenDateValueList.join('+') // eval can be harmful
// 解决
evil (fn) {let Fn = Function // 一个变量指向Function,防止有些前端编译工具报错return new Fn('return ' + fn)()}this.evil(this.sevenDateValueList.join('+'))
更多推荐
使用eval,vue eslint会报 eval can be harmful
发布评论