我是Vue.js的新手,想要使用单文件组件,但我不了解工作流程.
例如,我有三个组成部分:App,Grid和List
App.vue
<template>
<div id="app">
<div id="grid"></div>
<div id="right"></div>
</div>
</template>
<script>
export default {
name: 'app',
data () {
return {
message: 'Hello Vue!'
}
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
Grid.vue
<template>
<div id="left"></div>
</template>
<script>
export default {
name: 'grid',
data: function () {
return {
grid: 'some-data'
}
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
List.vue
<template>
<div id="right"></div>
</template>
<script>
export default {
name: 'list',
data: function () {
return {
text: 'some-text'
}
}
} …Run Code Online (Sandbox Code Playgroud) 我正在使用该 repo https://github.com/SimulatedGREG/electron-vue 并尝试像这样设置 VS Code 调试配置
{ //main
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"sourceMaps": true
},
{
"name": "Debug Renderer Process",
"type": "chrome",
"request": "attach",
"url": "http://localhost:9080",
"webRoot": "${workspaceRoot}/src"
}
Run Code Online (Sandbox Code Playgroud)
并收到类似的消息
Invalid responce {
"description": "node.js instance",
"devtoolsFrontendUrl": "chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5858/0f2c936f-b1cd-4ac9-aab3-f63b0f33d55e",
"faviconUrl": "https://nodejs.org/static/favicon.ico",
"id": "0f2c936f-b1cd-4ac9-aab3-f63b0f33d55e",
"title": "node",
"type": "node",
"url": "file://",
"webSocketDebuggerUrl": "ws://127.0.0.1:5858/0f2c936f-b1cd-4ac9-aab3-f63b0f33d55e"
}
Run Code Online (Sandbox Code Playgroud)
用于主connect ECONNREFUSED 127.0.0.1:9229
进程和
渲染进程。
我知道 main 和 renderer proc 都由提供服务webpack 3,webpack-dev-server 2但找不到调试配置。
使用 Chrome 使用类似chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5858/6c1d575a-d0f6-4ffa-9465-065ebc3d302c作品的链接调试主进程,但想使用 VS …
我是javascript的新手,无法理解简单的事情 - 有什么区别
...(x) => { return x*2}
Run Code Online (Sandbox Code Playgroud)
和
...x => { return x*2} //(just for example, may not work)
Run Code Online (Sandbox Code Playgroud)
有人可以解释或给出描述链接吗?