We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
报错Error: Can't set headers after they are sent,需要找到res.send()后还在运行并有能力返回值的函数,发现在初始化创建页面时,绑定了一个监听npm run dev的事件,而在后续该事件依旧在继续触发,这里使用变量标识并禁止第二次以后的触发返回值。
Error: Can't set headers after they are sent
var child = shell.exec('npm run dev', { async: true }); // 监听webpack运行成功后返回http服务端口及域名,回传至前端用于模拟器iframe // Node.js不允许一次请求多次返回,使用变量标识,禁止第二次事件以后的数据返回 var initBack = true; child.stdout.on('data', function (data) { if (data.indexOf('http') !== -1) { initBack && res.send(data); initBack = false; }
不要向div中注入domProps.innerHTML变量,会覆盖递归调用createElement
因为是浅拷贝,需要改为深拷贝
deepClone(el) { return JSON.parse(JSON.stringify(el)); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一次请求多次返回处理
报错
Error: Can't set headers after they are sent
,需要找到res.send()后还在运行并有能力返回值的函数,发现在初始化创建页面时,绑定了一个监听npm run dev的事件,而在后续该事件依旧在继续触发,这里使用变量标识并禁止第二次以后的触发返回值。层叠失效
不要向div中注入domProps.innerHTML变量,会覆盖递归调用createElement
克隆拖拽,拖入层叠子元素时会同时注入相同父元素
因为是浅拷贝,需要改为深拷贝
The text was updated successfully, but these errors were encountered: