采用了new Function 的执行方法 也可也用eval() 但是eval不能return 必须 eval('(function(){ return function *(){'+str+'};})()');