File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ # 常见问题
2
+
3
+ * [ 为什么运行 ` npm run dev ` 之后我的 electron 应用程序是空白的?] ( #why-is-my-electron-app-blank-after-running-npm-run-dev )
4
+ * [ 为什么我的 electron 程序显示文件浏览器?] ( #why-does-my-electron-app-show-a-file-explorer )
5
+ * [ 为什么没有 ` vue-devtools ` 或 ` devtron ` ?] ( #why-is-vue-devtoolsdevtron-missing )
6
+ * [ 在哪里放置我的静态资源?] ( #where-do-i-put-static-assets )
7
+ * [ 为什么 ` npm run lint ` 会出现错误?] ( #why-did-npm-run-lint-end-with-an-error )
8
+ * [ 为什么我无法在网页浏览器中加载应用程序?] ( #why-cant-i-load-my-app-in-a-web-browser )
9
+ * [ 如何导入 ` jquery ` ?] ( #how-do-import-jquery )
10
+ * [ 如何调试 ` main ` 进程?] ( #how-can-i-debug-the-main-process )
11
+
12
+ ---
13
+
14
+ ## 为什么运行 ` npm run dev ` 之后我的 electron 程序是空白的?
15
+
16
+ #### 简要
17
+
18
+ 确保你没有设置可能篡改 ` webpack-dev-server ` 的个人** 代理** 。
19
+
20
+ ## 为什么我的 electron 程序显示文件浏览器?
21
+
22
+ #### 简要
23
+
24
+ 你的 ` src/renderer ` 包含错误。请检查 控制台 (console),修复错误,然后用 ` CommandOrControl+R ` 刷新 electron。
25
+
26
+ ##### 详述
27
+
28
+ 如果你的 ` src/renderer ` 中出现错误,则会在首次运行时与 ESLint 产生冲突。接着,一个无效的 webpack 的 ` renderer.js ` 会被生成出来,它会打断 ` HtmlWebpackPlugin ` 创建 ` index.html ` 。由于 ` webpack-dev-server ` 没有 ` index.html ` 可以提供服务,所以服务器失败,返回到文件浏览器。
29
+
30
+ ## 为什么没有 ` vue-devtools ` 或 ` devtron ` ?
31
+
32
+ 如果缺少 ` vue-devtools ` 或 ` devtron ` ,请确保首次启动时,关闭并重新打开开发者工具面板。另外,请检查你的终端,是否在安装过程中有任何可能的错误消息。
33
+
34
+ ## 在哪里放置我的静态资源?
35
+
36
+ [ ** 静态资源的使用** ] ( /using-static-assets.md )
37
+
38
+ ## 为什么 ` npm run lint ` 会出现错误?
39
+
40
+ eslint 的默认属性是将控制台的错误打印出来,如果发现脚本以非零值退出结束时 \( 它会产生 npm 错误\) 。这是正常的行为。
41
+
42
+ ## 为什么我无法在网页浏览器中加载应用程序?
43
+
44
+ [ \# 195] ( https://github.com/SimulatedGREG/electron-vue/issues/195 )
45
+
46
+ ## 如何导入 ` jquery ` ?
47
+
48
+ 如果你想使用 ` bootstrap ` ,我将不得不在此打住你。在同一环境中使用 ` vue ` 和 ` jquery ` 并不是一个好的做法,这导致两个框架相互冲突。我强烈建议使用 ` bootstrap ` 的替代方法,并使用 ` vue ` 提供 JavaScript 的功能。一些建议包括使用 [ ` bootstrap-vue ` ] ( https://github.com/bootstrap-vue/bootstrap-vue ) 和 [ ` vue-strap ` ] ( https://github.com/yuche/vue-strap ) 。若有任何原因使你必须使用 ` jquery ` ,记得从 ` webpack ` 的文档里寻求有关 ` ProvidePlugin ` 的指导,或者参见 [ \# 192] ( https://github.com/SimulatedGREG/electron-vue/issues/192 ) 。
49
+
50
+ ## 如何调试 ` main ` 进程?
51
+
52
+ 当使用 ` electron@^1.7.2 ` 时,你可以打开 Google Chrome,然后转到 ` chrome://inspect ` ,在应用程序以开发模式运行时,弹出远程 electron 进程。
53
+
54
+ [ Electron 文档] (https://github.com/electron/electron/blob/master/docs/tutorial/debugging-main-process.md)
You can’t perform that action at this time.
0 commit comments