fujifilmtom

Results 5 comments of fujifilmtom

// 这里的报错原因感觉是这样的 1: function (){console.log(123)}(); // 报错 Uncaught SyntaxError: Function statements require a function name 2:function asdfas(){console.log(123)}();// 报错 Uncaught SyntaxError: Unexpected token ')' 1浏览器解析执行为: function (){console.log(123)();// 一个匿名函数表达式紧跟(),浏览器会解析该圆括号为函数调用(定义一个函数有三种方式:函数声明,new,赋值函数表达式),该匿名函数表达式既不是赋值函数表达式,也不是函数声明,也没有使用new操作符声明,由于定义函数的默认方式是函数声明,所以这里解析该匿名表达式为函数声明,所以报函数声明语法错误 new function (a){console.log(a)}(1)//...

对于第三点:3避免箭头函数写法 怎么看到一些网站函数式组件都使用的箭头函数写法 比如下面这个 https://reacttraining.com/react-router/web/example/url-params const Child = ({ match }) => ( ID: {match.params.id} ); 有什么性能差异吗?

@YutHelloWorld 谢谢,原来是这样

引入import '@tensorflow/tfjs-backend-wasm'; import {setWasmPath,setWasmPaths} from '@tensorflow/tfjs-backend-wasm'; 打印setWasmPath或者setWasmPaths都为空,试了很多微信版本 可以告知需要怎么引入吗?

有解决方案嘛,Textarea的placeholderClass h5也不支持,2年过去了