mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 04:11:05 +08:00
docs: sync documents (#1260)
This commit is contained in:
parent
e78557ec24
commit
3972093ede
@ -11,7 +11,7 @@ sidebar_position: 2
|
||||
|
||||
为了快速启动和运行,您可以通过运行`wails init -n myproject`生成一个默认项目。这将创建一个名为`myproject`的目录,并使用默认模板填充它。
|
||||
|
||||
也可以使用 `wails init -l`列出其他可用模板。
|
||||
其他可用的项目模板可以使用 `wails init -l`列出。这里也有提供不同功能和框架的[社区模板](/docs/community/templates)。
|
||||
|
||||
要查看其他可用选项,您可以运行 `wails init -help`。 更多详细信息可以在 [初始化命令](/docs/reference/cli#初始化)中找到。
|
||||
|
||||
|
@ -53,7 +53,7 @@ Wails CLI 为项目做了很多繁重的工作,但有时需要手动构建项
|
||||
|
||||
##### Windows
|
||||
|
||||
- 它创建的图标大小有 256、128、64、48、32 和 16。这是使用[winicon](https://github.com/leaanthony/winicon)完成的。
|
||||
- 如果`build/windows/icon.ico`不存在,它将从`build/appicon.png`创建 256、128、64、48、32 和 16 大小的图标。这是使用[winicon](https://github.com/leaanthony/winicon)完成的。
|
||||
- 如果`build/windows/<projectname>.manifest`文件不存在,它会从默认版本创建它。
|
||||
- 将应用程序编译为生产版本(如上所述)。
|
||||
- 使用[winres](https://github.com/tc-hib/winres)将 icon 和 manifest 打包到一个`.syso`文件。
|
||||
|
@ -62,4 +62,21 @@ window.go.main.App.TestFunc(msg, args)
|
||||
});
|
||||
```
|
||||
|
||||
勋章:https://github.com/wailsapp/wails/issues/1186
|
||||
归功于:https://github.com/wailsapp/wails/issues/1186
|
||||
|
||||
## 尝试安装 Wails 时遇到代理错误
|
||||
|
||||
如果您遇到这样的错误:
|
||||
|
||||
```
|
||||
"https://proxy.golang.org/github.com/wailsapp/wails/cmd/wails/@v/list": dial tcp 172.217.163.49:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
|
||||
```
|
||||
|
||||
这可能是因为官方 Go Proxy 被阻止(中国用户反馈了这一点)。解决方案是手动设置代理,例如:
|
||||
|
||||
```
|
||||
go env -w GO111MODULE=on
|
||||
go env -w GOPROXY=https://goproxy.cn,direct
|
||||
```
|
||||
|
||||
来源:https://github.com/wailsapp/wails/issues/1233
|
||||
|
@ -238,7 +238,7 @@ func main() {
|
||||
|
||||
类型:func(ctx context.Context)
|
||||
|
||||
在前端加载`index.html`完毕并且 DOM 准备就绪后调用此回调。它提供了应用程序上下文。
|
||||
在前端加载完毕`index.html`及其资源后调用此回调。它提供了应用程序上下文。
|
||||
|
||||
### 应用退出回调
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user