+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+directory
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+`, }} />
+
+## Contributors
+
+
+
+
+
+
+
+
+
+
+
+## Special Mentions
+
+- [John Chadwick](https://github.com/jchv) - His amazing work on [go-webview2](https://github.com/jchv/go-webview2) and [go-winloader](https://github.com/jchv/go-winloader) have made the Windows version possible.
+- [Tad Vizbaras](https://github.com/tadvi) - His winc project was the first step down the path to a pure Go Wails.
+- [Mat Ryer](https://github.com/matryer) - For advice, support and bants.
+- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - His support and feedback has been invaluable.
+- [Justen Walker](https://github.com/justenwalker/) - For helping wrangle COM issues which got v2 over the line.
+- [Wang, Chi](https://github.com/patr0nus/) - The DeskGap project was a huge influence on the direction of Wails v2.
+- [Serge Zaitsev](https://github.com/zserge) - Whilst Wails does not use the Webview project, it is still a source of inspiration.
diff --git a/website/i18n/ja/docusaurus-plugin-content-pages/faq.md b/website/i18n/ja/docusaurus-plugin-content-pages/faq.md
new file mode 100644
index 000000000..32cce9075
--- /dev/null
+++ b/website/i18n/ja/docusaurus-plugin-content-pages/faq.md
@@ -0,0 +1 @@
+# FAQ
\ No newline at end of file
diff --git a/website/i18n/ja/docusaurus-plugin-content-pages/markdown-page.md b/website/i18n/ja/docusaurus-plugin-content-pages/markdown-page.md
new file mode 100644
index 000000000..9756c5b66
--- /dev/null
+++ b/website/i18n/ja/docusaurus-plugin-content-pages/markdown-page.md
@@ -0,0 +1,7 @@
+---
+title: Markdown page example
+---
+
+# Markdown page example
+
+You don't need React to write simple standalone pages.
diff --git a/website/i18n/ja/docusaurus-plugin-content-pages/stats.mdx b/website/i18n/ja/docusaurus-plugin-content-pages/stats.mdx
new file mode 100644
index 000000000..dd174cd99
--- /dev/null
+++ b/website/i18n/ja/docusaurus-plugin-content-pages/stats.mdx
@@ -0,0 +1,24 @@
+# Website Stats
+
+To enable us to understand how better to focus our efforts on translations and platform support, we use [Plausible](https://plausible.io/privacy-focused-web-analytics) to gather **anonymous** stats like country and platform. We chose Plausible because we believe in respecting the privacy of our users. We also believe in transparency, therefore have made the dashboard public.
+
+If you have any concerns or suggestions, please raise them in the projects github discussions.
+
+
+
+
+
+export const NewComponent = () => (
+
+
+
+);
+
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx
index 1c7a2c6f9..1953d5574 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-09-27-v2-beta1-release-notes.mdx
@@ -1,98 +1,72 @@
---
slug: wails-v2-beta-for-windows
title: Windows ๅนณๅฐ็ Wails v2 ๆต่ฏ็
-authors: [leaanthony]
-tags: [wails, v2]
+authors:
+ - leaanthony
+tags:
+ - wails
+ - v2
---
+
-

+
-
-ไธคๅนดๅคๅ๏ผๅจๆๅฐผ็็ซ่ฝฆไธ๏ผๅฝๆ็ฌฌไธๆฌกๅจ Reddit ๅฎฃๅธ Wails ๆถ๏ผๆๆฒกๆณๅฐๅฎไผๅผ่ตทๅคชๅคๅ
ณๆณจใๅ ๅคฉๅ๏ผไธไฝๅคไบง็็งๆ่ง้ขๅไธปๅๅธไบไธไธชๆ็จ่ง้ข๏ผๅนถ็ปไบไบๆญฃ้ข่ฏไปท๏ผไป้ฃๆถ่ตท๏ผไบบไปฌๅฏน่ฏฅ้กน็ฎ็ๅ
ด่ถฃ็ๅขใ
+
-ๅพๆๆพ๏ผไบบไปฌๅฏนๅฐ Web ๅ็ซฏๆทปๅ ๅฐไปไปฌ็ Go ้กน็ฎๆๅฐๅ
ดๅฅ๏ผๅ ไน็ซๅณๅฐ้กน็ฎๆจๅจๅฐ่ถ
ๅบๆๅๅปบ่ฟไธช้กน็ฎ็่ฎพๆณใๅฝๆถ๏ผWails ไฝฟ็จ [webview](https://github.com/webview/webview) ้กน็ฎๆฅๅค็ๅ็ซฏ๏ผ
-Windows ็ๅฏไธ้ๆฉๆฏ IE11 ๆธฒๆๅจใ่ฎธๅค้่ฏฏๆฅๅ้ฝๅ ไธบๅๅฐๅฎ็้ๅถ๏ผ็ณ็ณ็ JavaScript/CSS ๆฏๆๅนถไธๆฒกๆๅผๅๅทฅๅ
ทๆฅ่ฐ่ฏๅฎใ่ฟๆฏไธๆฎตไปคไบบๆฒฎไธง็ๅผๅ็ปๅ๏ผไฝๆไปฌไนๆฒกๆ้ๅไปไนๆชๆฝๅป็บ ๆญฃๅฎใ
-ๅพ้ฟไธๆฎตๆถ้ดไปฅๆฅ๏ผๆไธ็ดๅไฟกๅพฎ่ฝฏๆ็ปไผ่งฃๅณไปไปฌ็ๆต่งๅจ้ฎ้ขใไธ็ๅจไธๆญ่ฟๆญฅ๏ผๅ็ซฏๅผๅๆญฃๅจ่ฌๅๅๅฑ๏ผ่ IE ๅนถๆฒกๆๅๅฐ่ฟไธ็นใๅฝๅพฎ่ฝฏๅฎฃๅธๅฐ Chromium ไฝไธบๅ
ถๆฐๆต่งๅจๆนๅ็ๅบ็กๆถ๏ผ
-ๆ็ฅ้ Wails ่ฝๅคไฝฟ็จๅฎๅนถๅฐ Windows ๅผๅ่
็ไฝ้ชๆๅๅฐไธไธไธชๆฐดๅนณๅชๆฏๆถ้ด้ฎ้ขใ
+ไธคๅนดๅคๅ๏ผๅจๆๅฐผ็็ซ่ฝฆไธ๏ผๅฝๆ็ฌฌไธๆฌกๅจ Reddit ๅฎฃๅธ Wails ๆถ๏ผๆๆฒกๆณๅฐๅฎไผๅผ่ตทๅคชๅคๅ
ณๆณจใ ๅ ๅคฉๅ๏ผไธไฝๅคไบง็็งๆ่ง้ขๅไธปๅๅธไบไธไธชๆ็จ่ง้ข๏ผๅนถ็ปไบไบๆญฃ้ข่ฏไปท๏ผไป้ฃๆถ่ตท๏ผไบบไปฌๅฏน่ฏฅ้กน็ฎ็ๅ
ด่ถฃ็ๅขใ
-ไปๅคฉ๏ผๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผ**Windows ็ Wails v2 ๅ
ฌๆตๅฆ**๏ผๆญค็ๆฌไธญๆๅคง้ๅ
ๅฎน้่ฆๅฑๅผๆฅ่ฏด๏ผๆไปฅ๏ผ่ฏทๅไธๆฏ่ถ๏ผๅฑไปฌๅไธๆฅๆ
ขๆ
ข่ฎฒ......
+ๅพๆๆพ๏ผไบบไปฌๅฏนๅฐ Web ๅ็ซฏๆทปๅ ๅฐไปไปฌ็ Go ้กน็ฎๆๅฐๅ
ดๅฅ๏ผๅ ไน็ซๅณๅฐ้กน็ฎๆจๅจๅฐ่ถ
ๅบๆๅๅปบ่ฟไธช้กน็ฎ็่ฎพๆณใ ๅฝๆถ๏ผWails ไฝฟ็จ [webview](https://github.com/webview/webview) ้กน็ฎๆฅๅค็ๅ็ซฏ๏ผ Windows ็ๅฏไธ้ๆฉๆฏ IE11 ๆธฒๆๅจใ ่ฎธๅค้่ฏฏๆฅๅ้ฝๅ ไธบๅๅฐๅฎ็้ๅถ๏ผ็ณ็ณ็ JavaScript/CSS ๆฏๆๅนถไธๆฒกๆๅผๅๅทฅๅ
ทๆฅ่ฐ่ฏๅฎใ ่ฟๆฏไธๆฎตไปคไบบๆฒฎไธง็ๅผๅ็ปๅ๏ผไฝๆไปฌไนๆฒกๆ้ๅไปไนๆชๆฝๅป็บ ๆญฃๅฎใ
+
+ๅพ้ฟไธๆฎตๆถ้ดไปฅๆฅ๏ผๆไธ็ดๅไฟกๅพฎ่ฝฏๆ็ปไผ่งฃๅณไปไปฌ็ๆต่งๅจ้ฎ้ขใ ไธ็ๅจไธๆญ่ฟๆญฅ๏ผๅ็ซฏๅผๅๆญฃๅจ่ฌๅๅๅฑ๏ผ่ IE ๅนถๆฒกๆๅๅฐ่ฟไธ็นใ ๅฝๅพฎ่ฝฏๅฎฃๅธๅฐ Chromium ไฝไธบๅ
ถๆฐๆต่งๅจๆนๅ็ๅบ็กๆถ๏ผ ๆ็ฅ้ Wails ่ฝๅคไฝฟ็จๅฎๅนถๅฐ Windows ๅผๅ่
็ไฝ้ชๆๅๅฐไธไธไธชๆฐดๅนณๅชๆฏๆถ้ด้ฎ้ขใ
+
+ไปๅคฉ๏ผๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผ**Windows ็ Wails v2 ๅ
ฌๆตๅฆ**๏ผ ๆญค็ๆฌไธญๆๅคง้ๅ
ๅฎน้่ฆๅฑๅผๆฅ่ฏด๏ผๆไปฅ๏ผ่ฏทๅไธๆฏ่ถ๏ผๅฑไปฌๅไธๆฅๆ
ขๆ
ข่ฎฒ......
### ๆฒกๆ CGO ไพ่ต
-ไธ๏ผๆไธๆฏๅจๅผ็ฉ็ฌ๏ผ*ๆฒกๆ CGO ไพ่ต*๐คฏ๏ผWindows ็้ฎ้ขๅจไบ๏ผไธ MacOS ๅ Linux ไธๅ๏ผๅฎๆฒกๆ้ป่ฎค็ผ่ฏๅจใ
-ๆญคๅค๏ผCGO ้่ฆไธไธช mingw ็ผ่ฏๅจ๏ผๅนถไธๆๅคง้ไธๅ็ๅฎ่ฃ
้้กนใๅ ้ค CGO ็่ฆๆฑๅคงๅคง็ฎๅไบ่ฎพ็ฝฎ๏ผๅนถไฝฟ่ฐ่ฏๅๅพ้ๅธธๅฎนๆใ
-่ฝ็ถๆๅทฒ็ปไปๅบไบ็ธๅฝๅค็ๅชๅๆฅๅฎๆ่ฟ้กนๅทฅไฝ๏ผไฝๅคง้จๅๅๅณๅบ่ฏฅๅฝๅไบ[John Chadwick](https://github.com/jchv)๏ผไปไธไป
ๅฏๅจไบๅ ไธช้กน็ฎไฝฟ่ฟๆไธบๅฏ่ฝ๏ผ
-่ไธ่ฟๅฏนๆฅๅ่ฟไบ้กน็ฎๅนถไปฅๆญคไธบๅบ็ก็ไบบๆๅผๆพๆๅบฆ. ่ฟ่ฆๅฝๅไบ[Tad Vizbaras](https://github.com/tadvi)๏ผไป็[winc](https://github.com/tadvi/winc)้กน็ฎ่ฎฉๆ่ตฐไธไบ่ฟๆก้่ทฏใ
+ไธ๏ผๆไธๆฏๅจๅผ็ฉ็ฌ๏ผ*ๆฒกๆ CGO ไพ่ต*๐คฏ๏ผ Windows ็้ฎ้ขๅจไบ๏ผไธ MacOS ๅ Linux ไธๅ๏ผๅฎๆฒกๆ้ป่ฎค็ผ่ฏๅจใ ๆญคๅค๏ผCGO ้่ฆไธไธช mingw ็ผ่ฏๅจ๏ผๅนถไธๆๅคง้ไธๅ็ๅฎ่ฃ
้้กนใ ๅ ้ค CGO ็่ฆๆฑๅคงๅคง็ฎๅไบ่ฎพ็ฝฎ๏ผๅนถไฝฟ่ฐ่ฏๅๅพ้ๅธธๅฎนๆใ ่ฝ็ถๆๅทฒ็ปไปๅบไบ็ธๅฝๅค็ๅชๅๆฅๅฎๆ่ฟ้กนๅทฅไฝ๏ผไฝๅคง้จๅๅๅณๅบ่ฏฅๅฝๅไบ[John Chadwick](https://github.com/jchv)๏ผไปไธไป
ๅฏๅจไบๅ ไธช้กน็ฎไฝฟ่ฟๆไธบๅฏ่ฝ๏ผ ่ไธ่ฟๅฏนๆฅๅ่ฟไบ้กน็ฎๅนถไปฅๆญคไธบๅบ็ก็ไบบๆๅผๆพๆๅบฆ. ่ฟ่ฆๅฝๅไบ[Tad Vizbaras](https://github.com/tadvi)๏ผไป็[winc](https://github.com/tadvi/winc)้กน็ฎ่ฎฉๆ่ตฐไธไบ่ฟๆก้่ทฏใ Credit also to [Tad Vizbaras](https://github.com/tadvi) whose [winc](https://github.com/tadvi/winc) project started me down this path.
### WebView2 Chromium ๆธฒๆๅผๆ
-

+
-
-ๆ็ป๏ผWindows ๅผๅไบบๅไธบไปไปฌ็ๅบ็จ็จๅบ่ทๅพไบไธๆต็ๆธฒๆๅผๆ๏ผๆญๆฒๅ็ซฏไปฃ็ ไปฅๅจ Windows ไธๅทฅไฝ็ๆฅๅญๅทฒ็ปไธๅปไธๅค่ฟไบใๆ้่ฆ็ๆฏ๏ผๆจๅฐ่ทๅพไธๆต็ๅผๅ่
ๅทฅๅ
ทไฝ้ช๏ผ
+
-ไฝๆฏ๏ผWebView2 ็ปไปถ็กฎๅฎ้่ฆๅฐๅ
ถๆพ็ฝฎ`WebView2Loader.dll`ๅจไบ่ฟๅถๆไปถๆ่พนใ่ฟไฝฟๅพๅๅๆฏๆไปฌ gophers ไน ๆฏ็ๆด็่ฆใๆๆไฝฟ็จ WebView2 ็่งฃๅณๆนๆกๅๅบ๏ผๆ็ฅ้็๏ผ้ฝๅ
ทๆ่ฟ็งไพ่ตๆงใ
+ๆ็ป๏ผWindows ๅผๅไบบๅไธบไปไปฌ็ๅบ็จ็จๅบ่ทๅพไบไธๆต็ๆธฒๆๅผๆ๏ผ ๆญๆฒๅ็ซฏไปฃ็ ไปฅๅจ Windows ไธๅทฅไฝ็ๆฅๅญๅทฒ็ปไธๅปไธๅค่ฟไบใ ๆ้่ฆ็ๆฏ๏ผๆจๅฐ่ทๅพไธๆต็ๅผๅ่
ๅทฅๅ
ทไฝ้ช๏ผ
-็ถ่๏ผๆ็็ๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผWails ๅบ็จ็จๅบ*ๆฒกๆ่ฟๆ ท็่ฆๆฑ*๏ผๆ่ฐข[John Chadwick](https://github.com/jchv)็้ญๆณ๏ผๆไปฌ่ฝๅคๅฐ่ฟไธช dll ๆๅ
ๅจไบ่ฟๅถๆไปถไธญ๏ผๅนถ่ฎฉ Windows ๅ ่ฝฝๅฎ๏ผๅฐฑๅๅฎๅญๅจไบ็ฃ็ไธไธๆ ทใ
+ไฝๆฏ๏ผWebView2 ็ปไปถ็กฎๅฎ้่ฆๅฐๅ
ถๆพ็ฝฎ`WebView2Loader.dll`ๅจไบ่ฟๅถๆไปถๆ่พนใ ่ฟไฝฟๅพๅๅๆฏๆไปฌ gophers ไน ๆฏ็ๆด็่ฆใ ๆๆไฝฟ็จ WebView2 ็่งฃๅณๆนๆกๅๅบ๏ผๆ็ฅ้็๏ผ้ฝๅ
ทๆ่ฟ็งไพ่ตๆงใ
-Gophers ๆฌขๅผๅง๏ผๅไธชไบ่ฟๅถๆไปถ็ๆๆณไพ็ถๅญๅจ๏ผ
+็ถ่๏ผๆ็็ๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผWails ๅบ็จ็จๅบ*ๆฒกๆ่ฟๆ ท็่ฆๆฑ*๏ผ ๆ่ฐข[John Chadwick](https://github.com/jchv)็้ญๆณ๏ผๆไปฌ่ฝๅคๅฐ่ฟไธช dll ๆๅ
ๅจไบ่ฟๅถๆไปถไธญ๏ผๅนถ่ฎฉ Windows ๅ ่ฝฝๅฎ๏ผๅฐฑๅๅฎๅญๅจไบ็ฃ็ไธไธๆ ทใ
+
+Gophers ๆฌขๅผๅง๏ผ ๅไธชไบ่ฟๅถๆไปถ็ๆๆณไพ็ถๅญๅจ๏ผ
### ๆฐๅ่ฝ
-

+
-
-ๆๅพๅคๅฏนๅ็่ๅๆฏๆ็่ฏทๆฑใWails ็ปไบๅธฎๆจๆๅฎไบใๅบ็จ็จๅบ่ๅ็ฐๅทฒๅฏ็จ๏ผๅนถไธๅ
ๆฌๅฏนๅคงๅคๆฐๅ็่ๅๅ่ฝ็ๆฏๆใ่ฟๅ
ๆฌๆ ๅ่ๅ้กนใๅค้ๆกใๅ้็ปใๅญ่ๅๅๅ้็ฌฆใ
+
-ๅจ v1 ไธญๆๅคง้็่ฏทๆฑ๏ผ่ฆๆฑ่ฝๅคๆดๅฅฝๅฐๆงๅถ็ชๅฃๆฌ่บซใๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๆไธ้จ็จไบๆญค็ๆฐ่ฟ่กๆถ APIใๅฎๅ่ฝไธฐๅฏ๏ผๆฏๆๅคๆพ็คบๅจ้
็ฝฎใ
-่ฟๆไธไธชๆน่ฟ็ๅฏน่ฏๆก API๏ผ็ฐๅจ๏ผๆจๅฏไปฅๆฅๆๅ
ทๆไธฐๅฏ้
็ฝฎ็็ฐไปฃๅ็ๅฏน่ฏๆก๏ผไปฅๆปก่ถณๆจ็ๆๆๅฏน่ฏๆก้ๆฑใ
+ๆๅพๅคๅฏนๅ็่ๅๆฏๆ็่ฏทๆฑใ Wails ็ปไบๅธฎๆจๆๅฎไบใ ๅบ็จ็จๅบ่ๅ็ฐๅทฒๅฏ็จ๏ผๅนถไธๅ
ๆฌๅฏนๅคงๅคๆฐๅ็่ๅๅ่ฝ็ๆฏๆใ ่ฟๅ
ๆฌๆ ๅ่ๅ้กนใๅค้ๆกใๅ้็ปใๅญ่ๅๅๅ้็ฌฆใ
-็ฐๅจๅฏไปฅ้ๆฉ้้กน็ฎ็ๆ IDE ้
็ฝฎใ่ฟๆๅณ็ๅฆๆๆจๅจๅๆฏๆ็ IDE ไธญๆๅผๆจ็้กน็ฎ๏ผๅฎๅทฒ็ป่ขซ้
็ฝฎไธบๆๅปบๅ่ฐ่ฏๆจ็ๅบ็จ็จๅบใ็ฎๅๆฏๆ VSCode๏ผไฝๆไปฌๅธๆๅฐฝๅฟซๆฏๆๅ
ถไป IDE๏ผไพๅฆ Golandใ
+ๅจ v1 ไธญๆๅคง้็่ฏทๆฑ๏ผ่ฆๆฑ่ฝๅคๆดๅฅฝๅฐๆงๅถ็ชๅฃๆฌ่บซใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๆไธ้จ็จไบๆญค็ๆฐ่ฟ่กๆถ APIใ ๅฎๅ่ฝไธฐๅฏ๏ผๆฏๆๅคๆพ็คบๅจ้
็ฝฎใ ่ฟๆไธไธชๆน่ฟ็ๅฏน่ฏๆก API๏ผ็ฐๅจ๏ผๆจๅฏไปฅๆฅๆๅ
ทๆไธฐๅฏ้
็ฝฎ็็ฐไปฃๅ็ๅฏน่ฏๆก๏ผไปฅๆปก่ถณๆจ็ๆๆๅฏน่ฏๆก้ๆฑใ
+
+็ฐๅจๅฏไปฅ้ๆฉ้้กน็ฎ็ๆ IDE ้
็ฝฎใ ่ฟๆๅณ็ๅฆๆๆจๅจๅๆฏๆ็ IDE ไธญๆๅผๆจ็้กน็ฎ๏ผๅฎๅทฒ็ป่ขซ้
็ฝฎไธบๆๅปบๅ่ฐ่ฏๆจ็ๅบ็จ็จๅบใ ็ฎๅๆฏๆ VSCode๏ผไฝๆไปฌๅธๆๅฐฝๅฟซๆฏๆๅ
ถไป IDE๏ผไพๅฆ Golandใ
-

+
-
+
+
### ๆ ้ๆๅ
่ตๆบ
-v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS ๆไปถใๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅฏนไบ v2๏ผไธ้่ฆไปฅไปปไฝๅฝขๅผๆๅ
่ตๆบใ
-ๆณ่ฆๅ ่ฝฝๆฌๅฐๅพ็๏ผไฝฟ็จๅธฆๆๆฌๅฐ`src`่ทฏๅพ็`
![]()
`ๆ ็ญพใๆณไฝฟ็จๅพ้
ท็ๅญไฝๅ๏ผๅคๅถๅฎๅนถๅจไฝ ็ CSS ไธญๆทปๅ ๅฎ็่ทฏๅพใ
+v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS ๆไปถใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅฏนไบ v2๏ผไธ้่ฆไปฅไปปไฝๅฝขๅผๆๅ
่ตๆบใ ๆณ่ฆๅ ่ฝฝๆฌๅฐๅพ็๏ผ ไฝฟ็จๅธฆๆๆฌๅฐ`src`่ทฏๅพ็`
![]()
`ๆ ็ญพใ ๆณไฝฟ็จๅพ้
ท็ๅญไฝๅ๏ผ ๅคๅถๅฎๅนถๅจไฝ ็ CSS ไธญๆทปๅ ๅฎ็่ทฏๅพใ
> ๅ๏ผ่ฟๅฌ่ตทๆฅๅไธไธช็ฝ็ปๆๅกๅจ......
@@ -100,61 +74,47 @@ v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS
> ้ฃไนๆๅฆไฝๅ
ๅซๆ็่ตๆบ๏ผ
-ๆจๅช้ๅฐ`embed.FS`ๅ
ๅซๆๆ่ตๆบ็ๅไธชๆไปถไผ ้ๅฐๆจ็ๅบ็จ็จๅบ้
็ฝฎไธญใไปไปฌ็่ณไธ้่ฆๅจ้กถ็บง็ฎๅฝไธญโโWails ไผไธบไฝ ่งฃๅณ่ฟไธช้ฎ้ขใ
+ๆจๅช้ๅฐ`embed.FS`ๅ
ๅซๆๆ่ตๆบ็ๅไธชๆไปถไผ ้ๅฐๆจ็ๅบ็จ็จๅบ้
็ฝฎไธญใ ไปไปฌ็่ณไธ้่ฆๅจ้กถ็บง็ฎๅฝไธญโโWails ไผไธบไฝ ่งฃๅณ่ฟไธช้ฎ้ขใ
### ๅ
จๆฐ็ๅผๅไฝ้ช
-

+
-
-็ฐๅจไธ้่ฆๆๅ
่ตๆบ๏ผๅฎๅฏ็จไบๅ
จๆฐ็ๅผๅไฝ้ชใๆฐ`wails dev`ๅฝไปคๅฐๆๅปบๅนถ่ฟ่กๆจ็ๅบ็จ็จๅบ๏ผไฝๅฎไธไฝฟ็จ`embed.FS`ไธญ็่ตๆบ๏ผ่ๆฏ็ดๆฅไป็ฃ็ๅ ่ฝฝๅฎไปฌใ
+
+
+
+็ฐๅจไธ้่ฆๆๅ
่ตๆบ๏ผๅฎๅฏ็จไบๅ
จๆฐ็ๅผๅไฝ้ชใ ๆฐ`wails dev`ๅฝไปคๅฐๆๅปบๅนถ่ฟ่กๆจ็ๅบ็จ็จๅบ๏ผไฝๅฎไธไฝฟ็จ`embed.FS`ไธญ็่ตๆบ๏ผ่ๆฏ็ดๆฅไป็ฃ็ๅ ่ฝฝๅฎไปฌใ
ๅฎ่ฟๆไพไบ้ๅ ๅ่ฝ๏ผ
-- ็ญ้่ฝฝ - ๅฏนๅ็ซฏ่ตๆบ็ไปปไฝๆดๆน้ฝๅฐ่งฆๅๅนถ่ชๅจ้่ฝฝๅบ็จ็จๅบๅ็ซฏ
-- ่ชๅจ้ๆฐๆๅปบ - ๅฏน Go ไปฃ็ ็ไปปไฝๆดๆน้ฝๅฐ้ๆฐๆๅปบๅนถ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบ
+ - ็ญ้่ฝฝ - ๅฏนๅ็ซฏ่ตๆบ็ไปปไฝๆดๆน้ฝๅฐ่งฆๅๅนถ่ชๅจ้่ฝฝๅบ็จ็จๅบๅ็ซฏ
+ - ่ชๅจ้ๆฐๆๅปบ - ๅฏน Go ไปฃ็ ็ไปปไฝๆดๆน้ฝๅฐ้ๆฐๆๅปบๅนถ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบ
-้คๆญคไนๅค๏ผ็ฝ็ปๆๅกๅจๅฐๅจ็ซฏๅฃ 34115 ไธๅฏๅจใ่ฟๅฐไธบๆจ็ๅบ็จ็จๅบๆไพ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจใๆๆ่ฟๆฅ็ Web ๆต่งๅจ้ฝไผๅๅบ็ณป็ปไบไปถ๏ผไพๅฆ่ตๆบๆดๆนๆถ็็ญ้่ฝฝใ
+้คๆญคไนๅค๏ผ็ฝ็ปๆๅกๅจๅฐๅจ็ซฏๅฃ 34115 ไธๅฏๅจใ ่ฟๅฐไธบๆจ็ๅบ็จ็จๅบๆไพ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจใ ๆๆ่ฟๆฅ็ Web ๆต่งๅจ้ฝไผๅๅบ็ณป็ปไบไปถ๏ผไพๅฆ่ตๆบๆดๆนๆถ็็ญ้่ฝฝใ
-ๅจ Go ไธญ๏ผๆไปฌไน ๆฏไบๅจๅบ็จ็จๅบไธญๅค็็ปๆใๅฐ็ปๆๅ้ๅฐๆไปฌ็ๅ็ซฏๅนถๅฐๅฎไปฌ็จไฝๆไปฌๅบ็จ็จๅบไธญ็็ถๆ้ๅธธๅพๆ็จใๅจ v1 ไธญ๏ผ่ฟๆฏไธไธช้ๅธธ้่ฆๆๅจ็่ฟ็จ๏ผๅฏนๅผๅไบบๅๆฅ่ฏดๆ็น่ดๆ
ใ
-ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅจ v2 ไธญ๏ผไปปไฝๅจๅผๅๆจกๅผไธ่ฟ่ก็ๅบ็จ็จๅบ้ฝๅฐ่ชๅจไธบๆๆ็ปๆ็ๆ Typescript ๆจกๅ๏ผ่ฟไบ็ปๆๆฏ็ปๅฎๆนๆณ็่พๅ
ฅๆ่พๅบๅๆฐใ่ฟๅฎ็ฐไบไธคไธชไธ็ไน้ดๆฐๆฎๆจกๅ็ๆ ็ผไบคๆขใ
+ๅจ Go ไธญ๏ผๆไปฌไน ๆฏไบๅจๅบ็จ็จๅบไธญๅค็็ปๆใ ๅฐ็ปๆๅ้ๅฐๆไปฌ็ๅ็ซฏๅนถๅฐๅฎไปฌ็จไฝๆไปฌๅบ็จ็จๅบไธญ็็ถๆ้ๅธธๅพๆ็จใ ๅจ v1 ไธญ๏ผ่ฟๆฏไธไธช้ๅธธ้่ฆๆๅจ็่ฟ็จ๏ผๅฏนๅผๅไบบๅๆฅ่ฏดๆ็น่ดๆ
ใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅจ v2 ไธญ๏ผไปปไฝๅจๅผๅๆจกๅผไธ่ฟ่ก็ๅบ็จ็จๅบ้ฝๅฐ่ชๅจไธบๆๆ็ปๆ็ๆ Typescript ๆจกๅ๏ผ่ฟไบ็ปๆๆฏ็ปๅฎๆนๆณ็่พๅ
ฅๆ่พๅบๅๆฐใ ่ฟๅฎ็ฐไบไธคไธชไธ็ไน้ดๆฐๆฎๆจกๅ็ๆ ็ผไบคๆขใ
-้คๆญคไนๅค๏ผ่ฟไผๅจๆ็ๆๅฆไธไธช JS ๆจกๅๆฅๅ
่ฃ
ๆจ็ๆๆ็ปๅฎๆนๆณใ่ฟไธบๆจ็ๆนๆณๆไพไบ JSDoc๏ผๅจๆจ็ IDE ไธญๆไพไปฃ็ ๅฎๆๅๆ็คบใๅฝๆจๅจ่ชๅจ็ๆ็ๅ
ๅซ Go ไปฃ็ ็ๆจกๅไธญ็นๅป Tab ๆถ่ชๅจๅฏผๅ
ฅๆฐๆฎๆจกๅ๏ผ่ฟ็็ๅพ้
ท๏ผ
+้คๆญคไนๅค๏ผ่ฟไผๅจๆ็ๆๅฆไธไธช JS ๆจกๅๆฅๅ
่ฃ
ๆจ็ๆๆ็ปๅฎๆนๆณใ ่ฟไธบๆจ็ๆนๆณๆไพไบ JSDoc๏ผๅจๆจ็ IDE ไธญๆไพไปฃ็ ๅฎๆๅๆ็คบใ ๅฝๆจๅจ่ชๅจ็ๆ็ๅ
ๅซ Go ไปฃ็ ็ๆจกๅไธญ็นๅป Tab ๆถ่ชๅจๅฏผๅ
ฅๆฐๆฎๆจกๅ๏ผ่ฟ็็ๅพ้
ท๏ผ
### ่ฟ็จๆจกๆฟ
-

+
-
-่ฎฉๅบ็จ็จๅบๅฟซ้ๅฏๅจๅนถ่ฟ่กไธ็ดๆฏ Wails ้กน็ฎ็ไธไธชๅ
ณ้ฎ็ฎๆ ใๅฝๆไปฌๆจๅบๆถ๏ผๆไปฌ่ฏๅพๆถต็ๅฝๆถ็ๅพๅค็ฐไปฃๆกๆถ๏ผreactใvue ๅ angularใๅ็ซฏๅผๅ็ไธ็้ๅธธๅบๆงๅทฑ่ง๏ผๅๅฑ่ฟ
้๏ผๅพ้พไฟๆ้ขๅ
ๅฐไฝ๏ผ
-็ปๆ๏ผๆไปฌๅ็ฐๆไปฌ็ๅบๆฌๆจกๆฟๅพๅฟซๅฐฑ่ฟๆถไบ๏ผ่ฟๅฏผ่ดไบ็ปดๆค้ฎ้ขใ่ฟไนๆๅณ็๏ผๆไปฌๆฒกๆไธบๆๆฐๅๆไผๅคง็ๆๆฏๆ ๆไพ้
ท็ซ็็ฐไปฃๆจกๆฟใ
+
-ๅจ v2 ไธญ๏ผๆๅธๆ้่ฟ่ฎฉๆจ่ฝๅค่ชๅทฑๅๅปบๅๆ็ฎกๆจกๆฟๆฅๅขๅผบ็คพๅบ็่ฝๅ๏ผ่ไธๆฏไพ่ตไบ Wails ้กน็ฎใๆไปฅ็ฐๅจๆจๅฏไปฅไฝฟ็จ็คพๅบๆฏๆ็ๆจกๆฟๅๅปบ้กน็ฎ๏ผ
-ๆๅธๆ่ฟๅฐๆฟๅฑๅผๅไบบๅๅๅปบไธไธชๅ
ๆปกๆดปๅ็้กน็ฎๆจกๆฟ็ๆ็ณป็ปใๆๅฏนๆไปฌ็ๅผๅ่
็คพๅบๅฏไปฅๅ้ ็ไธ่ฅฟๆๅฐ้ๅธธๅ
ดๅฅ๏ผ
+่ฎฉๅบ็จ็จๅบๅฟซ้ๅฏๅจๅนถ่ฟ่กไธ็ดๆฏ Wails ้กน็ฎ็ไธไธชๅ
ณ้ฎ็ฎๆ ใ ๅฝๆไปฌๆจๅบๆถ๏ผๆไปฌ่ฏๅพๆถต็ๅฝๆถ็ๅพๅค็ฐไปฃๆกๆถ๏ผreactใvue ๅ angularใ ๅ็ซฏๅผๅ็ไธ็้ๅธธๅบๆงๅทฑ่ง๏ผๅๅฑ่ฟ
้๏ผๅพ้พไฟๆ้ขๅ
ๅฐไฝ๏ผ ็ปๆ๏ผๆไปฌๅ็ฐๆไปฌ็ๅบๆฌๆจกๆฟๅพๅฟซๅฐฑ่ฟๆถไบ๏ผ่ฟๅฏผ่ดไบ็ปดๆค้ฎ้ขใ ่ฟไนๆๅณ็๏ผๆไปฌๆฒกๆไธบๆๆฐๅๆไผๅคง็ๆๆฏๆ ๆไพ้
ท็ซ็็ฐไปฃๆจกๆฟใ
+
+ๅจ v2 ไธญ๏ผๆๅธๆ้่ฟ่ฎฉๆจ่ฝๅค่ชๅทฑๅๅปบๅๆ็ฎกๆจกๆฟๆฅๅขๅผบ็คพๅบ็่ฝๅ๏ผ่ไธๆฏไพ่ตไบ Wails ้กน็ฎใ ๆไปฅ็ฐๅจๆจๅฏไปฅไฝฟ็จ็คพๅบๆฏๆ็ๆจกๆฟๅๅปบ้กน็ฎ๏ผ ๆๅธๆ่ฟๅฐๆฟๅฑๅผๅไบบๅๅๅปบไธไธชๅ
ๆปกๆดปๅ็้กน็ฎๆจกๆฟ็ๆ็ณป็ปใ ๆๅฏนๆไปฌ็ๅผๅ่
็คพๅบๅฏไปฅๅ้ ็ไธ่ฅฟๆๅฐ้ๅธธๅ
ดๅฅ๏ผ
### ็ป่ฏญ
-Wails v2 ไปฃ่กจไบ่ฏฅ้กน็ฎ็ๆฐ่ตท็นใๆญค็ๆฌ็็ฎ็ๆฏ่ทๅพๆๅ
ณๆฐๆนๅผ็ๅ้ฆ๏ผๅนถๅจๅฎๆด็ๆฌๅๅธไนๅ่งฃๅณๆๆ้่ฏฏใๆฌข่ฟๆๅบๆจ็ๆ่งใ่ฏท็ดๆฅๅ้ฆๅฐ [v2 ๆต่ฏ็](https://github.com/wailsapp/wails/discussions/828)่ฎจ่ฎบๆฟใ
+Wails v2 ไปฃ่กจไบ่ฏฅ้กน็ฎ็ๆฐ่ตท็นใ ๆญค็ๆฌ็็ฎ็ๆฏ่ทๅพๆๅ
ณๆฐๆนๅผ็ๅ้ฆ๏ผๅนถๅจๅฎๆด็ๆฌๅๅธไนๅ่งฃๅณๆๆ้่ฏฏใ ๆฌข่ฟๆๅบๆจ็ๆ่งใ ่ฏท็ดๆฅๅ้ฆๅฐ [v2 ๆต่ฏ็](https://github.com/wailsapp/wails/discussions/828)่ฎจ่ฎบๆฟใ
-ไธบไบ่พพๅฐ่ฟไธ็น๏ผ็ปๅไบ่ฎธๅคๆฒๆๅๅๅทใ้จๅๅๅ ๆฏๆฉๆ็ๆๆฏๅณ็ญ้่ฆๆนๅ๏ผๅฆไธ้จๅๅๅ ๆฏๆไปฌ่ฑๆถ้ดๆๅปบ็ไธไบๆ ธๅฟ้ฎ้ข็ๅ้ๆนๅผๅทฒ็ปๅจไธๆธธๅพๅฐไบ่งฃๅณ๏ผGo ็ embed ็นๆงๅฐฑๆฏไธไธชๅพๅฅฝ็ไพๅญใๅนธ่ฟ็ๆฏ๏ผไธๅ้ฝๅๅๅฅฝ๏ผไปๅคฉๆไปฌๆไบๆไปฌๆ่ฝๆฅๆ็ๆๅฅฝ็่งฃๅณๆนๆกใๆ็ธไฟก็ญๅพ
ๆฏๅผๅพ็ - ่ฟๅจไธคไธชๆๅๆฏๅฎๅ
จไธๅฏ่ฝ็ใ
+ไธบไบ่พพๅฐ่ฟไธ็น๏ผ็ปๅไบ่ฎธๅคๆฒๆๅๅๅทใ ้จๅๅๅ ๆฏๆฉๆ็ๆๆฏๅณ็ญ้่ฆๆนๅ๏ผๅฆไธ้จๅๅๅ ๆฏๆไปฌ่ฑๆถ้ดๆๅปบ็ไธไบๆ ธๅฟ้ฎ้ข็ๅ้ๆนๅผๅทฒ็ปๅจไธๆธธๅพๅฐไบ่งฃๅณ๏ผGo ็ embed ็นๆงๅฐฑๆฏไธไธชๅพๅฅฝ็ไพๅญใ ๅนธ่ฟ็ๆฏ๏ผไธๅ้ฝๅๅๅฅฝ๏ผไปๅคฉๆไปฌๆไบๆไปฌๆ่ฝๆฅๆ็ๆๅฅฝ็่งฃๅณๆนๆกใ ๆ็ธไฟก็ญๅพ
ๆฏๅผๅพ็ - ่ฟๅจไธคไธชๆๅๆฏๅฎๅ
จไธๅฏ่ฝ็ใ
ๆ่ฟ้่ฆ็นๅซๆ่ฐข :pray: ไปฅไธไบบๅ๏ผๅ ไธบๆฒกๆไปไปฌ๏ผ่ฟไธช็ๆฌๅฐฑไธไผๅญๅจ๏ผ
@@ -169,6 +129,6 @@ Wails v2 ไปฃ่กจไบ่ฏฅ้กน็ฎ็ๆฐ่ตท็นใๆญค็ๆฌ็็ฎ็ๆฏ่ทๅพๆๅ
ณๆฐ
Lea.
-PS๏ผMacOS ๅ Linux ็จๆทไธๅฟ
ๆๅฐ่ขซๅฟฝ็ฅไบโโ็งปๆคๅฐ่ฟไธชๆฐๅบ็กไธ็ๅทฅไฝๆญฃๅจ็งฏๆ่ฟ่กไธญ๏ผๅคง้จๅๅคๆ็ๅทฅไฝๅทฒ็ปๅฎๆใๅๆไธๅป...
+PS๏ผMacOS ๅ Linux ็จๆทไธๅฟ
ๆๅฐ่ขซๅฟฝ็ฅไบโโ็งปๆคๅฐ่ฟไธชๆฐๅบ็กไธ็ๅทฅไฝๆญฃๅจ็งฏๆ่ฟ่กไธญ๏ผๅคง้จๅๅคๆ็ๅทฅไฝๅทฒ็ปๅฎๆใ ๅๆไธๅป...
-PPS๏ผๅฆๆๆจๆๆจ็ๅ
ฌๅธๅ็ฐ Wails ๆ็จ๏ผๅฏไปฅ่่[่ตๅฉ่ฏฅ้กน็ฎ](https://github.com/sponsors/leaanthony)ใ่ฐข่ฐข๏ผ
+PPS๏ผๅฆๆๆจๆๆจ็ๅ
ฌๅธๅ็ฐ Wails ๆ็จ๏ผๅฏไปฅ่่[่ตๅฉ่ฏฅ้กน็ฎ](https://github.com/sponsors/leaanthony)ใ ่ฐข่ฐข๏ผ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx
index 019c87dae..aad2712e8 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2021-11-08-v2-beta2-release-notes.mdx
@@ -1,59 +1,50 @@
---
slug: wails-v2-beta-for-mac
title: Mac ๅนณๅฐ็ Wails v2 ๆต่ฏ็
-authors: [leaanthony]
-tags: [wails, v2]
+authors:
+ - leaanthony
+tags:
+ - wails
+ - v2
---
+
-

+
-
-ไปๅคฉๆฏ Mac ็ Wails v2 ็็ฌฌไธไธชๆต่ฏ็๏ผ่ฑไบๅพ้ฟๆถ้ดๆ่ตฐๅฐ่ฟไธๆญฅ๏ผๆๅธๆไปๅคฉ็็ๆฌไผ็ปไฝ ไธไบ็ธๅฝๆ็จ็ไธ่ฅฟใไธบไบ่พพๅฐ่ฟไธ็น๏ผ็ปๅไบ่ฎธๅคๆฒๆ๏ผๆๅธๆๅจๆจ็ๅธฎๅฉไธ๏ผๆถ้ค้ฎ้ขๅนถไธบๆ็ป็ v2 ็ๆฌๅฎๅ Mac ็ซฏๅฃใ
+
-ไฝ ็ๆๆๆฏ่ฟ่ฟๆฒกๆๅๅคๅฅฝ็ไบง๏ผๅฏนไบๆจ็็จไพ๏ผๅฎๅฏ่ฝๅทฒ็ปๅๅคๅฐฑ็ปช๏ผไฝไป็ถๅญๅจ่ฎธๅคๅทฒ็ฅ้ฎ้ข๏ผๅ ๆญค่ฏทๅฏๅๅ
ณๆณจๆญค[้กน็ฎๆฟ](https://github.com/wailsapp/wails/projects/7)๏ผๅฆๆๆจๆฟๆๅๅบ่ดก็ฎ๏ผๆไปฌๅฐ้ๅธธๆฌข่ฟๆจ๏ผ
+ไปๅคฉๆฏ Mac ็ Wails v2 ็็ฌฌไธไธชๆต่ฏ็๏ผ ่ฑไบๅพ้ฟๆถ้ดๆ่ตฐๅฐ่ฟไธๆญฅ๏ผๆๅธๆไปๅคฉ็็ๆฌไผ็ปไฝ ไธไบ็ธๅฝๆ็จ็ไธ่ฅฟใ ไธบไบ่พพๅฐ่ฟไธ็น๏ผ็ปๅไบ่ฎธๅคๆฒๆ๏ผๆๅธๆๅจๆจ็ๅธฎๅฉไธ๏ผๆถ้ค้ฎ้ขๅนถไธบๆ็ป็ v2 ็ๆฌๅฎๅ Mac ็ซฏๅฃใ
-้ฃไน Mac ็ Wails v2 ไธ v1 ๆๅชไบๆฐๅๅ๏ผๆ็คบ๏ผๅฎไธ Windows Beta ้ๅธธ็ธไผผ ๐
+ไฝ ็ๆๆๆฏ่ฟ่ฟๆฒกๆๅๅคๅฅฝ็ไบง๏ผ ๅฏนไบๆจ็็จไพ๏ผๅฎๅฏ่ฝๅทฒ็ปๅๅคๅฐฑ็ปช๏ผไฝไป็ถๅญๅจ่ฎธๅคๅทฒ็ฅ้ฎ้ข๏ผๅ ๆญค่ฏทๅฏๅๅ
ณๆณจๆญค[้กน็ฎๆฟ](https://github.com/wailsapp/wails/projects/7)๏ผๅฆๆๆจๆฟๆๅๅบ่ดก็ฎ๏ผๆไปฌๅฐ้ๅธธๆฌข่ฟๆจ๏ผ
+
+้ฃไน Mac ็ Wails v2 ไธ v1 ๆๅชไบๆฐๅๅ๏ผ ๆ็คบ๏ผๅฎไธ Windows Beta ้ๅธธ็ธไผผ ๐
### ๆฐ็นๆง
-

+
-
-ๆๅพๅคๅฏนๅ็่ๅๆฏๆ็้ๆฑใWails ็ปไบๅธฎๆจๆๅฎไบใๅบ็จ็จๅบ่ๅ็ฐๅทฒๅฏ็จ๏ผๅนถไธๅ
ๆฌๅฏนๅคงๅคๆฐๆฌๅ็่ๅๅ่ฝ็ๆฏๆใ่ฟๅ
ๆฌๆ ๅ่ๅ้กนใๅค้ๆกใๅ้็ปใๅญ่ๅๅๅ้็ฌฆใ
+
-ๅจ v1 ไธญๆๅคง้็้ๆฑ๏ผ่ฆๆฑ่ฝๅคๆดๅฅฝๅฐๆงๅถ็ชๅฃๆฌ่บซใๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๆไธ้จ็จไบๆญค็ๆฐ่ฟ่กๆถ APIใๅฎๅ่ฝไธฐๅฏ๏ผๆฏๆๅคๆพ็คบๅจ้
็ฝฎใ่ฟๆไธไธชๆน่ฟ็ๅฏน่ฏๆก API๏ผ็ฐๅจ๏ผๆจๅฏไปฅๆฅๆๅ
ทๆไธฐๅฏ้
็ฝฎ็็ฐไปฃๅ็ๅฏน่ฏๆก๏ผไปฅๆปก่ถณๆจๆๆ็ๅฏน่ฏๆก้ๆฑใ
+ๆๅพๅคๅฏนๅ็่ๅๆฏๆ็้ๆฑใ Wails ็ปไบๅธฎๆจๆๅฎไบใ ๅบ็จ็จๅบ่ๅ็ฐๅทฒๅฏ็จ๏ผๅนถไธๅ
ๆฌๅฏนๅคงๅคๆฐๆฌๅ็่ๅๅ่ฝ็ๆฏๆใ ่ฟๅ
ๆฌๆ ๅ่ๅ้กนใๅค้ๆกใๅ้็ปใๅญ่ๅๅๅ้็ฌฆใ
+
+ๅจ v1 ไธญๆๅคง้็้ๆฑ๏ผ่ฆๆฑ่ฝๅคๆดๅฅฝๅฐๆงๅถ็ชๅฃๆฌ่บซใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๆไธ้จ็จไบๆญค็ๆฐ่ฟ่กๆถ APIใ ๅฎๅ่ฝไธฐๅฏ๏ผๆฏๆๅคๆพ็คบๅจ้
็ฝฎใ ่ฟๆไธไธชๆน่ฟ็ๅฏน่ฏๆก API๏ผ็ฐๅจ๏ผๆจๅฏไปฅๆฅๆๅ
ทๆไธฐๅฏ้
็ฝฎ็็ฐไปฃๅ็ๅฏน่ฏๆก๏ผไปฅๆปก่ถณๆจๆๆ็ๅฏน่ฏๆก้ๆฑใ
### Mac ็นๅฎ้้กน
้คไบๆฎ้็ๅบ็จ็จๅบ้้กน๏ผWails v2 for Mac ่ฟๅธฆๆฅไบไธไบ Mac ้ๅ ๅ่ฝ๏ผ
-- ่ฎฉไฝ ็็ชๅฃๅๅพๆถ้ซฆๅๅ้ๆ๏ผๅฐฑๅๆๆ Swift ๅบ็จ็จๅบไธๆ ท๏ผ
-- ้ซๅบฆๅฏๅฎๅถ็ๆ ้ขๆ
-- ๆไปฌๆฏๆๅบ็จ็จๅบ็ NSAppearance ้้กน
-- ่ชๅจๅๅปบโๅ
ณไบโ่ๅ็็ฎๅ้
็ฝฎ
+ - ่ฎฉไฝ ็็ชๅฃๅๅพๆถ้ซฆๅๅ้ๆ๏ผๅฐฑๅๆๆ Swift ๅบ็จ็จๅบไธๆ ท๏ผ
+ - ้ซๅบฆๅฏๅฎๅถ็ๆ ้ขๆ
+ - ๆไปฌๆฏๆๅบ็จ็จๅบ็ NSAppearance ้้กน
+ - ่ชๅจๅๅปบโๅ
ณไบโ่ๅ็็ฎๅ้
็ฝฎ
### ๆ ้ๆๅ
่ตๆบ
-v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS ๆไปถใๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅฏนไบ v2๏ผไธ้่ฆไปฅไปปไฝๅฝขๅผๆๅ
่ตๆบใ
-ๆณ่ฆๅ ่ฝฝๆฌๅฐๅพ็๏ผไฝฟ็จๅธฆๆๆฌๅฐ`src`่ทฏๅพ็`
![]()
`ๆ ็ญพใๆณไฝฟ็จๅพ้
ท็ๅญไฝๅ๏ผๅคๅถๅฎๅนถๅจไฝ ็ CSS ไธญๆทปๅ ๅฎ็่ทฏๅพใ
+v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS ๆไปถใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅฏนไบ v2๏ผไธ้่ฆไปฅไปปไฝๅฝขๅผๆๅ
่ตๆบใ ๆณ่ฆๅ ่ฝฝๆฌๅฐๅพ็๏ผ ไฝฟ็จๅธฆๆๆฌๅฐ`src`่ทฏๅพ็`
![]()
`ๆ ็ญพใ ๆณไฝฟ็จๅพ้
ท็ๅญไฝๅ๏ผ ๅคๅถๅฎๅนถๅจไฝ ็ CSS ไธญๆทปๅ ๅฎ็่ทฏๅพใ
> ๅ๏ผ่ฟๅฌ่ตทๆฅๅไธไธช็ฝ็ปๆๅกๅจ......
@@ -61,111 +52,79 @@ v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS
> ้ฃไนๆๅฆไฝๅ
ๅซๆ็่ตๆบ๏ผ
-ๆจๅช้ๅฐ`embed.FS`ๅ
ๅซๆๆ่ตๆบ็ๅไธชๆไปถไผ ้ๅฐๆจ็ๅบ็จ็จๅบ้
็ฝฎไธญใไปไปฌ็่ณไธ้่ฆๅจ้กถ็บง็ฎๅฝไธญโโWails ไผไธบไฝ ่งฃๅณ่ฟไธช้ฎ้ขใ
+ๆจๅช้ๅฐ`embed.FS`ๅ
ๅซๆๆ่ตๆบ็ๅไธชๆไปถไผ ้ๅฐๆจ็ๅบ็จ็จๅบ้
็ฝฎไธญใ ไปไปฌ็่ณไธ้่ฆๅจ้กถ็บง็ฎๅฝไธญโโWails ไผไธบไฝ ่งฃๅณ่ฟไธช้ฎ้ขใ
### ๅ
จๆฐ็ๅผๅไฝ้ช
-็ฐๅจไธ้่ฆๆๅ
่ตๆบ๏ผๅฎๅฏ็จไบๅ
จๆฐ็ๅผๅไฝ้ชใๆฐ`wails dev`ๅฝไปคๅฐๆๅปบๅนถ่ฟ่กๆจ็ๅบ็จ็จๅบ๏ผไฝๅฎไธไฝฟ็จ`embed.FS`ไธญ็่ตๆบ๏ผ่ๆฏ็ดๆฅไป็ฃ็ๅ ่ฝฝๅฎไปฌใ
+็ฐๅจไธ้่ฆๆๅ
่ตๆบ๏ผๅฎๅฏ็จไบๅ
จๆฐ็ๅผๅไฝ้ชใ ๆฐ`wails dev`ๅฝไปคๅฐๆๅปบๅนถ่ฟ่กๆจ็ๅบ็จ็จๅบ๏ผไฝๅฎไธไฝฟ็จ`embed.FS`ไธญ็่ตๆบ๏ผ่ๆฏ็ดๆฅไป็ฃ็ๅ ่ฝฝๅฎไปฌใ
ๅฎ่ฟๆไพไบ้ๅ ๅ่ฝ๏ผ
-- ็ญ้่ฝฝ - ๅฏนๅ็ซฏ่ตๆบ็ไปปไฝๆดๆน้ฝๅฐ่งฆๅๅนถ่ชๅจ้่ฝฝๅบ็จ็จๅบๅ็ซฏ
-- ่ชๅจ้ๆฐๆๅปบ - ๅฏน Go ไปฃ็ ็ไปปไฝๆดๆน้ฝๅฐ้ๆฐๆๅปบๅนถ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบ
+ - ็ญ้่ฝฝ - ๅฏนๅ็ซฏ่ตๆบ็ไปปไฝๆดๆน้ฝๅฐ่งฆๅๅนถ่ชๅจ้่ฝฝๅบ็จ็จๅบๅ็ซฏ
+ - ่ชๅจ้ๆฐๆๅปบ - ๅฏน Go ไปฃ็ ็ไปปไฝๆดๆน้ฝๅฐ้ๆฐๆๅปบๅนถ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบ
-้คๆญคไนๅค๏ผ็ฝ็ปๆๅกๅจๅฐๅจ็ซฏๅฃ 34115 ไธๅฏๅจใ่ฟๅฐไธบๆจ็ๅบ็จ็จๅบๆไพ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจใๆๆ่ฟๆฅ็ Web ๆต่งๅจ้ฝไผๅๅบ็ณป็ปไบไปถ๏ผไพๅฆ่ตๆบๆดๆนๆถ็็ญ้่ฝฝใ
+้คๆญคไนๅค๏ผ็ฝ็ปๆๅกๅจๅฐๅจ็ซฏๅฃ 34115 ไธๅฏๅจใ ่ฟๅฐไธบๆจ็ๅบ็จ็จๅบๆไพ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจใ ๆๆ่ฟๆฅ็ Web ๆต่งๅจ้ฝไผๅๅบ็ณป็ปไบไปถ๏ผไพๅฆ่ตๆบๆดๆนๆถ็็ญ้่ฝฝใ
-ๅจ Go ไธญ๏ผๆไปฌไน ๆฏไบๅจๅบ็จ็จๅบไธญๅค็็ปๆใๅฐ็ปๆๅ้ๅฐๆไปฌ็ๅ็ซฏๅนถๅฐๅฎไปฌ็จไฝๆไปฌๅบ็จ็จๅบไธญ็็ถๆ้ๅธธๅพๆ็จใๅจ v1 ไธญ๏ผ่ฟๆฏไธไธช้ๅธธ้่ฆๆๅจ็่ฟ็จ๏ผๅฏนๅผๅไบบๅๆฅ่ฏดๆ็น่ดๆ
ใ
-ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅจ v2 ไธญ๏ผไปปไฝๅจๅผๅๆจกๅผไธ่ฟ่ก็ๅบ็จ็จๅบ้ฝๅฐ่ชๅจไธบๆๆ็ปๆ็ๆ Typescript ๆจกๅ๏ผ่ฟไบ็ปๆๆฏ็ปๅฎๆนๆณ็่พๅ
ฅๆ่พๅบๅๆฐใ่ฟๅฎ็ฐไบไธคไธชไธ็ไน้ดๆฐๆฎๆจกๅ็ๆ ็ผไบคๆขใ
+ๅจ Go ไธญ๏ผๆไปฌไน ๆฏไบๅจๅบ็จ็จๅบไธญๅค็็ปๆใ ๅฐ็ปๆๅ้ๅฐๆไปฌ็ๅ็ซฏๅนถๅฐๅฎไปฌ็จไฝๆไปฌๅบ็จ็จๅบไธญ็็ถๆ้ๅธธๅพๆ็จใ ๅจ v1 ไธญ๏ผ่ฟๆฏไธไธช้ๅธธ้่ฆๆๅจ็่ฟ็จ๏ผๅฏนๅผๅไบบๅๆฅ่ฏดๆ็น่ดๆ
ใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅจ v2 ไธญ๏ผไปปไฝๅจๅผๅๆจกๅผไธ่ฟ่ก็ๅบ็จ็จๅบ้ฝๅฐ่ชๅจไธบๆๆ็ปๆ็ๆ Typescript ๆจกๅ๏ผ่ฟไบ็ปๆๆฏ็ปๅฎๆนๆณ็่พๅ
ฅๆ่พๅบๅๆฐใ ่ฟๅฎ็ฐไบไธคไธชไธ็ไน้ดๆฐๆฎๆจกๅ็ๆ ็ผไบคๆขใ
-้คๆญคไนๅค๏ผ่ฟไผๅจๆ็ๆๅฆไธไธช JS ๆจกๅๆฅๅ
่ฃ
ๆจ็ๆๆ็ปๅฎๆนๆณใ่ฟไธบๆจ็ๆนๆณๆไพไบ JSDoc๏ผๅจๆจ็ IDE ไธญๆไพไปฃ็ ๅฎๆๅๆ็คบใๅฝๆจๅจ่ชๅจ็ๆ็ๅ
ๅซ Go ไปฃ็ ็ๆจกๅไธญ็นๅป Tab ๆถ่ชๅจๅฏผๅ
ฅๆฐๆฎๆจกๅ๏ผ่ฟ็็ๅพ้
ท๏ผ
+้คๆญคไนๅค๏ผ่ฟไผๅจๆ็ๆๅฆไธไธช JS ๆจกๅๆฅๅ
่ฃ
ๆจ็ๆๆ็ปๅฎๆนๆณใ ่ฟไธบๆจ็ๆนๆณๆไพไบ JSDoc๏ผๅจๆจ็ IDE ไธญๆไพไปฃ็ ๅฎๆๅๆ็คบใ ๅฝๆจๅจ่ชๅจ็ๆ็ๅ
ๅซ Go ไปฃ็ ็ๆจกๅไธญ็นๅป Tab ๆถ่ชๅจๅฏผๅ
ฅๆฐๆฎๆจกๅ๏ผ่ฟ็็ๅพ้
ท๏ผ
### ่ฟ็จๆจกๆฟ
-

+
-
-่ฎฉๅบ็จ็จๅบๅฟซ้ๅฏๅจๅนถ่ฟ่กไธ็ดๆฏ Wails ้กน็ฎ็ไธไธชๅ
ณ้ฎ็ฎๆ ใๅฝๆไปฌๆจๅบๆถ๏ผๆไปฌ่ฏๅพๆถต็ๅฝๆถ็ๅพๅค็ฐไปฃๆกๆถ๏ผreactใvue ๅ angularใๅ็ซฏๅผๅ็ไธ็้ๅธธๅบๆงๅทฑ่ง๏ผๅๅฑ่ฟ
้๏ผๅพ้พไฟๆ้ขๅ
ๅฐไฝ๏ผ
-็ปๆ๏ผๆไปฌๅ็ฐๆไปฌ็ๅบๆฌๆจกๆฟๅพๅฟซๅฐฑ่ฟๆถไบ๏ผ่ฟๅฏผ่ดไบ็ปดๆค้ฎ้ขใ่ฟไนๆๅณ็๏ผๆไปฌๆฒกๆไธบๆๆฐๅๆไผๅคง็ๆๆฏๆ ๆไพ้
ท็ซ็็ฐไปฃๆจกๆฟใ
+
-ๅจ v2 ไธญ๏ผๆๅธๆ้่ฟ่ฎฉๆจ่ฝๅค่ชๅทฑๅๅปบๅๆ็ฎกๆจกๆฟๆฅๅขๅผบ็คพๅบ็่ฝๅ๏ผ่ไธๆฏไพ่ตไบ Wails ้กน็ฎใๆไปฅ็ฐๅจๆจๅฏไปฅไฝฟ็จ็คพๅบๆฏๆ็ๆจกๆฟๅๅปบ้กน็ฎ๏ผ
-ๆๅธๆ่ฟๅฐๆฟๅฑๅผๅไบบๅๅๅปบไธไธชๅ
ๆปกๆดปๅ็้กน็ฎๆจกๆฟ็ๆ็ณป็ปใๆๅฏนๆไปฌ็ๅผๅ่
็คพๅบๅฏไปฅๅ้ ็ไธ่ฅฟๆๅฐ้ๅธธๅ
ดๅฅ๏ผ
+่ฎฉๅบ็จ็จๅบๅฟซ้ๅฏๅจๅนถ่ฟ่กไธ็ดๆฏ Wails ้กน็ฎ็ไธไธชๅ
ณ้ฎ็ฎๆ ใ ๅฝๆไปฌๆจๅบๆถ๏ผๆไปฌ่ฏๅพๆถต็ๅฝๆถ็ๅพๅค็ฐไปฃๆกๆถ๏ผreactใvue ๅ angularใ ๅ็ซฏๅผๅ็ไธ็้ๅธธๅบๆงๅทฑ่ง๏ผๅๅฑ่ฟ
้๏ผๅพ้พไฟๆ้ขๅ
ๅฐไฝ๏ผ ็ปๆ๏ผๆไปฌๅ็ฐๆไปฌ็ๅบๆฌๆจกๆฟๅพๅฟซๅฐฑ่ฟๆถไบ๏ผ่ฟๅฏผ่ดไบ็ปดๆค้ฎ้ขใ ่ฟไนๆๅณ็๏ผๆไปฌๆฒกๆไธบๆๆฐๅๆไผๅคง็ๆๆฏๆ ๆไพ้
ท็ซ็็ฐไปฃๆจกๆฟใ
+
+ๅจ v2 ไธญ๏ผๆๅธๆ้่ฟ่ฎฉๆจ่ฝๅค่ชๅทฑๅๅปบๅๆ็ฎกๆจกๆฟๆฅๅขๅผบ็คพๅบ็่ฝๅ๏ผ่ไธๆฏไพ่ตไบ Wails ้กน็ฎใ ๆไปฅ็ฐๅจๆจๅฏไปฅไฝฟ็จ็คพๅบๆฏๆ็ๆจกๆฟๅๅปบ้กน็ฎ๏ผ ๆๅธๆ่ฟๅฐๆฟๅฑๅผๅไบบๅๅๅปบไธไธชๅ
ๆปกๆดปๅ็้กน็ฎๆจกๆฟ็ๆ็ณป็ปใ ๆๅฏนๆไปฌ็ๅผๅ่
็คพๅบๅฏไปฅๅ้ ็ไธ่ฅฟๆๅฐ้ๅธธๅ
ดๅฅ๏ผ
### ๅ็ M1 ๆฏๆ
ๆ่ฐข[Mat Ryer](https://github.com/matryer/)็ๆไบบๆฏๆ๏ผWails ้กน็ฎ็ฐๅจๆฏๆ M1 ๅ็ๆๅปบ๏ผ
-

+
-
+
+
ๆจไนๅฏไปฅๆๅฎ`darwin/amd64`ไธบ็ฎๆ ๏ผ
-

+
-
+
+
ๅฆ๏ผๆๅทฎ็นๅฟไบ....ไฝ ไนๅฏไปฅๅ`darwin/universal`....๐
-

+
-
+
+
### ไบคๅ็ผ่ฏๅฐ Windows
ๅ ไธบ Windows ็ Wails v2 ๆฏ็บฏ Go๏ผๆไปฅไฝ ๅฏไปฅๅจๆฒกๆ docker ็ๆ
ๅตไธ้ๅฏน Windows ๆๅปบใ
-

+
-
+
+
+
### WKWebView ๆธฒๆๅจ
-V1 ไพ่ตไบ WebView๏ผ็ฐๅทฒๅผ็จ๏ผ็ปไปถใV2 ไฝฟ็จๆๆฐ็ WKWebKit ็ปไปถ๏ผๆไปฅๆๅพ
Apple ็ๆๆฐๅๆๆฃ็็ปไปถใ
+V1 ไพ่ตไบ WebView๏ผ็ฐๅทฒๅผ็จ๏ผ็ปไปถใ V2 ไฝฟ็จๆๆฐ็ WKWebKit ็ปไปถ๏ผๆไปฅๆๅพ
Apple ็ๆๆฐๅๆๆฃ็็ปไปถใ
### ็ป่ฏญ
-ๆญฃๅฆๆๅจ Windows ๅ่ก่ฏดๆไธญๆ่ฏด๏ผWails v2 ไปฃ่กจไบ่ฏฅ้กน็ฎ็ๆฐ่ตท็นใๆญค็ๆฌ็็ฎ็ๆฏ่ทๅพๆๅ
ณๆฐๆนๅผ็ๅ้ฆ๏ผๅนถๅจๅฎๆด็ๆฌๅๅธไนๅ่งฃๅณๆๆ้่ฏฏใ้ๅธธๆฌข่ฟๆจ็ๆ่ง๏ผ่ฏทๅฐไปปไฝๅ้ฆๅ้ๅฐ[v2 ๆต่ฏ็](https://github.com/wailsapp/wails/discussions/828)่ฎจ่ฎบๆฟใ
+ๆญฃๅฆๆๅจ Windows ๅ่ก่ฏดๆไธญๆ่ฏด๏ผWails v2 ไปฃ่กจไบ่ฏฅ้กน็ฎ็ๆฐ่ตท็นใ ๆญค็ๆฌ็็ฎ็ๆฏ่ทๅพๆๅ
ณๆฐๆนๅผ็ๅ้ฆ๏ผๅนถๅจๅฎๆด็ๆฌๅๅธไนๅ่งฃๅณๆๆ้่ฏฏใ ้ๅธธๆฌข่ฟๆจ็ๆ่ง๏ผ ่ฏทๅฐไปปไฝๅ้ฆๅ้ๅฐ[v2 ๆต่ฏ็](https://github.com/wailsapp/wails/discussions/828)่ฎจ่ฎบๆฟใ
ๆๅ๏ผๆ่ฟ่ฆ็นๅซๆ่ฐขๅ
ๆฌ[JetBrains](https://www.jetbrains.com?from=Wails)ๅจๅ
็ๆๆ้กน็ฎ[่ตๅฉๅ](/credits#sponsors)๏ผไปไปฌ็ๅนๅๆฏๆไปฅๅค็งๆนๅผๆจๅจไบ่ฏฅ้กน็ฎใ
@@ -175,4 +134,4 @@ Lea.
PS: Linux ็จๆทไปฌ๏ผไฝ ไปฌๅฐๆฏไธไธไธช๏ผ
-PPS๏ผๅฆๆๆจๆๆจ็ๅ
ฌๅธๅ็ฐ Wails ๆ็จ๏ผๅฏไปฅ่่[่ตๅฉ่ฏฅ้กน็ฎ](https://github.com/sponsors/leaanthony)ใ่ฐข่ฐข๏ผ
+PPS๏ผๅฆๆๆจๆๆจ็ๅ
ฌๅธๅ็ฐ Wails ๆ็จ๏ผๅฏไปฅ่่[่ตๅฉ่ฏฅ้กน็ฎ](https://github.com/sponsors/leaanthony)ใ ่ฐข่ฐข๏ผ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx
index 6f36fc8ab..91757a655 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/2022-02-22-v2-beta3-release-notes.mdx
@@ -1,46 +1,37 @@
---
slug: wails-v2-beta-for-linux
title: Linux ๅนณๅฐ็ Wails v2 ๆต่ฏ็
-authors: [leaanthony]
-tags: [wails, v2]
+authors:
+ - leaanthony
+tags:
+ - wails
+ - v2
---
-
-

-
-
-ๆๅพ้ซๅ
ด็ปไบๅฎฃๅธ๏ผWails v2 ็ฐๅจๅคไบ Linux ๆต่ฏ็ไธญ๏ผๆ็น่ฎฝๅบ็ๆฏ๏ผv2 ็็ฌฌไธๆฌกๅฎ้ชๆฏๅจ Linux ไธ่ฟ่ก็๏ผไฝๅฎๆ็ปๆไธบไบๆๅไธไธช็ๆฌใ่ฏ่ฝๅฆๆญค๏ผๆไปฌไปๅคฉๆฅๆ็ v2 ไธๆๅ็ๅฎ้ช้ๅธธไธๅใๅ ๆญค๏ผไบไธๅฎ่ฟ๏ผ่ฎฉๆไปฌๅ้กพไธไธๆฐๅ่ฝ๏ผ
+
+

+
+
+
+
+ๆๅพ้ซๅ
ด็ปไบๅฎฃๅธ๏ผWails v2 ็ฐๅจๅคไบ Linux ๆต่ฏ็ไธญ๏ผ ๆ็น่ฎฝๅบ็ๆฏ๏ผv2 ็็ฌฌไธๆฌกๅฎ้ชๆฏๅจ Linux ไธ่ฟ่ก็๏ผไฝๅฎๆ็ปๆไธบไบๆๅไธไธช็ๆฌใ ่ฏ่ฝๅฆๆญค๏ผๆไปฌไปๅคฉๆฅๆ็ v2 ไธๆๅ็ๅฎ้ช้ๅธธไธๅใ ๅ ๆญค๏ผไบไธๅฎ่ฟ๏ผ่ฎฉๆไปฌๅ้กพไธไธๆฐๅ่ฝ๏ผ
### ๆฐๅ่ฝ
-

+
-
-ๆๅพๅคๅฏนๅ็่ๅๆฏๆ็้ๆฑใWails ็ปไบๅธฎๆจๆๅฎไบใๅบ็จ็จๅบ่ๅ็ฐๅทฒๅฏ็จ๏ผๅนถไธๅ
ๆฌๅฏนๅคงๅคๆฐๆฌๅ็่ๅๅ่ฝ็ๆฏๆใ่ฟๅ
ๆฌๆ ๅ่ๅ้กนใๅค้ๆกใๅ้็ปใๅญ่ๅๅๅ้็ฌฆใ
+
-ๅจ v1 ไธญๆๅคง้็้ๆฑ๏ผ่ฆๆฑ่ฝๅคๆดๅฅฝๅฐๆงๅถ็ชๅฃๆฌ่บซใๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๆไธ้จ็จไบๆญค็ๆฐ่ฟ่กๆถ APIใๅฎๅ่ฝไธฐๅฏ๏ผๆฏๆๅคๆพ็คบๅจ้
็ฝฎใ่ฟๆไธไธชๆน่ฟ็ๅฏน่ฏๆก API๏ผ็ฐๅจ๏ผๆจๅฏไปฅๆฅๆๅ
ทๆไธฐๅฏ้
็ฝฎ็็ฐไปฃๅ็ๅฏน่ฏๆก๏ผไปฅๆปก่ถณๆจๆๆ็ๅฏน่ฏๆก้ๆฑใ
+ๆๅพๅคๅฏนๅ็่ๅๆฏๆ็้ๆฑใ Wails ็ปไบๅธฎๆจๆๅฎไบใ ๅบ็จ็จๅบ่ๅ็ฐๅทฒๅฏ็จ๏ผๅนถไธๅ
ๆฌๅฏนๅคงๅคๆฐๆฌๅ็่ๅๅ่ฝ็ๆฏๆใ ่ฟๅ
ๆฌๆ ๅ่ๅ้กนใๅค้ๆกใๅ้็ปใๅญ่ๅๅๅ้็ฌฆใ
+
+ๅจ v1 ไธญๆๅคง้็้ๆฑ๏ผ่ฆๆฑ่ฝๅคๆดๅฅฝๅฐๆงๅถ็ชๅฃๆฌ่บซใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๆไธ้จ็จไบๆญค็ๆฐ่ฟ่กๆถ APIใ ๅฎๅ่ฝไธฐๅฏ๏ผๆฏๆๅคๆพ็คบๅจ้
็ฝฎใ ่ฟๆไธไธชๆน่ฟ็ๅฏน่ฏๆก API๏ผ็ฐๅจ๏ผๆจๅฏไปฅๆฅๆๅ
ทๆไธฐๅฏ้
็ฝฎ็็ฐไปฃๅ็ๅฏน่ฏๆก๏ผไปฅๆปก่ถณๆจๆๆ็ๅฏน่ฏๆก้ๆฑใ
### ๆ ้ๆๅ
่ตๆบ
-v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS ๆไปถใๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅฏนไบ v2๏ผไธ้่ฆไปฅไปปไฝๅฝขๅผๆๅ
่ตๆบใ
-ๆณ่ฆๅ ่ฝฝๆฌๅฐๅพ็๏ผไฝฟ็จๅธฆๆๆฌๅฐ`src`่ทฏๅพ็`
![]()
`ๆ ็ญพใๆณไฝฟ็จๅพ้
ท็ๅญไฝๅ๏ผๅคๅถๅฎๅนถๅจไฝ ็ CSS ไธญๆทปๅ ๅฎ็่ทฏๅพใ
+v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS ๆไปถใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅฏนไบ v2๏ผไธ้่ฆไปฅไปปไฝๅฝขๅผๆๅ
่ตๆบใ ๆณ่ฆๅ ่ฝฝๆฌๅฐๅพ็๏ผ ไฝฟ็จๅธฆๆๆฌๅฐ`src`่ทฏๅพ็`
![]()
`ๆ ็ญพใ ๆณไฝฟ็จๅพ้
ท็ๅญไฝๅ๏ผ ๅคๅถๅฎๅนถๅจไฝ ็ CSS ไธญๆทปๅ ๅฎ็่ทฏๅพใ
> ๅ๏ผ่ฟๅฌ่ตทๆฅๅไธไธช็ฝ็ปๆๅกๅจ......
@@ -48,65 +39,51 @@ v1 ็ไธไธชๅทจๅคง็็นๆฏ้่ฆๅฐๆดไธชๅบ็จ็จๅบๅ็ผฉไธบๅไธช JS ๅ CSS
> ้ฃไนๆๅฆไฝๅ
ๅซๆ็่ตๆบ๏ผ
-ๆจๅช้ๅฐ`embed.FS`ๅ
ๅซๆๆ่ตๆบ็ๅไธชๆไปถไผ ้ๅฐๆจ็ๅบ็จ็จๅบ้
็ฝฎไธญใไปไปฌ็่ณไธ้่ฆๅจ้กถ็บง็ฎๅฝไธญโโWails ไผไธบไฝ ่งฃๅณ่ฟไธช้ฎ้ขใ
+ๆจๅช้ๅฐ`embed.FS`ๅ
ๅซๆๆ่ตๆบ็ๅไธชๆไปถไผ ้ๅฐๆจ็ๅบ็จ็จๅบ้
็ฝฎไธญใ ไปไปฌ็่ณไธ้่ฆๅจ้กถ็บง็ฎๅฝไธญโโWails ไผไธบไฝ ่งฃๅณ่ฟไธช้ฎ้ขใ
### ๅ
จๆฐ็ๅผๅไฝ้ช
-็ฐๅจไธ้่ฆๆๅ
่ตๆบ๏ผๅฎๅฏ็จไบๅ
จๆฐ็ๅผๅไฝ้ชใๆฐ`wails dev`ๅฝไปคๅฐๆๅปบๅนถ่ฟ่กๆจ็ๅบ็จ็จๅบ๏ผไฝๅฎไธไฝฟ็จ`embed.FS`ไธญ็่ตๆบ๏ผ่ๆฏ็ดๆฅไป็ฃ็ๅ ่ฝฝๅฎไปฌใ
+็ฐๅจไธ้่ฆๆๅ
่ตๆบ๏ผๅฎๅฏ็จไบๅ
จๆฐ็ๅผๅไฝ้ชใ ๆฐ`wails dev`ๅฝไปคๅฐๆๅปบๅนถ่ฟ่กๆจ็ๅบ็จ็จๅบ๏ผไฝๅฎไธไฝฟ็จ`embed.FS`ไธญ็่ตๆบ๏ผ่ๆฏ็ดๆฅไป็ฃ็ๅ ่ฝฝๅฎไปฌใ
ๅฎ่ฟๆไพไบ้ๅ ๅ่ฝ๏ผ
-- ็ญ้่ฝฝ - ๅฏนๅ็ซฏ่ตๆบ็ไปปไฝๆดๆน้ฝๅฐ่งฆๅๅนถ่ชๅจ้่ฝฝๅบ็จ็จๅบๅ็ซฏ
-- ่ชๅจ้ๆฐๆๅปบ - ๅฏน Go ไปฃ็ ็ไปปไฝๆดๆน้ฝๅฐ้ๆฐๆๅปบๅนถ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบ
+ - ็ญ้่ฝฝ - ๅฏนๅ็ซฏ่ตๆบ็ไปปไฝๆดๆน้ฝๅฐ่งฆๅๅนถ่ชๅจ้่ฝฝๅบ็จ็จๅบๅ็ซฏ
+ - ่ชๅจ้ๆฐๆๅปบ - ๅฏน Go ไปฃ็ ็ไปปไฝๆดๆน้ฝๅฐ้ๆฐๆๅปบๅนถ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบ
-้คๆญคไนๅค๏ผ็ฝ็ปๆๅกๅจๅฐๅจ็ซฏๅฃ 34115 ไธๅฏๅจใ่ฟๅฐไธบๆจ็ๅบ็จ็จๅบๆไพ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจใๆๆ่ฟๆฅ็ Web ๆต่งๅจ้ฝไผๅๅบ็ณป็ปไบไปถ๏ผไพๅฆ่ตๆบๆดๆนๆถ็็ญ้่ฝฝใ
+้คๆญคไนๅค๏ผ็ฝ็ปๆๅกๅจๅฐๅจ็ซฏๅฃ 34115 ไธๅฏๅจใ ่ฟๅฐไธบๆจ็ๅบ็จ็จๅบๆไพ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจใ ๆๆ่ฟๆฅ็ Web ๆต่งๅจ้ฝไผๅๅบ็ณป็ปไบไปถ๏ผไพๅฆ่ตๆบๆดๆนๆถ็็ญ้่ฝฝใ
-ๅจ Go ไธญ๏ผๆไปฌไน ๆฏไบๅจๅบ็จ็จๅบไธญๅค็็ปๆใๅฐ็ปๆๅ้ๅฐๆไปฌ็ๅ็ซฏๅนถๅฐๅฎไปฌ็จไฝๆไปฌๅบ็จ็จๅบไธญ็็ถๆ้ๅธธๅพๆ็จใๅจ v1 ไธญ๏ผ่ฟๆฏไธไธช้ๅธธ้่ฆๆๅจ็่ฟ็จ๏ผๅฏนๅผๅไบบๅๆฅ่ฏดๆ็น่ดๆ
ใ
-ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅจ v2 ไธญ๏ผไปปไฝๅจๅผๅๆจกๅผไธ่ฟ่ก็ๅบ็จ็จๅบ้ฝๅฐ่ชๅจไธบๆๆ็ปๆ็ๆ Typescript ๆจกๅ๏ผ่ฟไบ็ปๆๆฏ็ปๅฎๆนๆณ็่พๅ
ฅๆ่พๅบๅๆฐใ่ฟๅฎ็ฐไบไธคไธชไธ็ไน้ดๆฐๆฎๆจกๅ็ๆ ็ผไบคๆขใ
+ๅจ Go ไธญ๏ผๆไปฌไน ๆฏไบๅจๅบ็จ็จๅบไธญๅค็็ปๆใ ๅฐ็ปๆๅ้ๅฐๆไปฌ็ๅ็ซฏๅนถๅฐๅฎไปฌ็จไฝๆไปฌๅบ็จ็จๅบไธญ็็ถๆ้ๅธธๅพๆ็จใ ๅจ v1 ไธญ๏ผ่ฟๆฏไธไธช้ๅธธ้่ฆๆๅจ็่ฟ็จ๏ผๅฏนๅผๅไบบๅๆฅ่ฏดๆ็น่ดๆ
ใ ๆๅพ้ซๅ
ดๅฐๅฎฃๅธ๏ผๅจ v2 ไธญ๏ผไปปไฝๅจๅผๅๆจกๅผไธ่ฟ่ก็ๅบ็จ็จๅบ้ฝๅฐ่ชๅจไธบๆๆ็ปๆ็ๆ Typescript ๆจกๅ๏ผ่ฟไบ็ปๆๆฏ็ปๅฎๆนๆณ็่พๅ
ฅๆ่พๅบๅๆฐใ ่ฟๅฎ็ฐไบไธคไธชไธ็ไน้ดๆฐๆฎๆจกๅ็ๆ ็ผไบคๆขใ
-้คๆญคไนๅค๏ผ่ฟไผๅจๆ็ๆๅฆไธไธช JS ๆจกๅๆฅๅ
่ฃ
ๆจ็ๆๆ็ปๅฎๆนๆณใ่ฟไธบๆจ็ๆนๆณๆไพไบ JSDoc๏ผๅจๆจ็ IDE ไธญๆไพไปฃ็ ๅฎๆๅๆ็คบใๅฝๆจๅจ่ชๅจ็ๆ็ๅ
ๅซ Go ไปฃ็ ็ๆจกๅไธญ็นๅป Tab ๆถ่ชๅจๅฏผๅ
ฅๆฐๆฎๆจกๅ๏ผ่ฟ็็ๅพ้
ท๏ผ
+้คๆญคไนๅค๏ผ่ฟไผๅจๆ็ๆๅฆไธไธช JS ๆจกๅๆฅๅ
่ฃ
ๆจ็ๆๆ็ปๅฎๆนๆณใ ่ฟไธบๆจ็ๆนๆณๆไพไบ JSDoc๏ผๅจๆจ็ IDE ไธญๆไพไปฃ็ ๅฎๆๅๆ็คบใ ๅฝๆจๅจ่ชๅจ็ๆ็ๅ
ๅซ Go ไปฃ็ ็ๆจกๅไธญ็นๅป Tab ๆถ่ชๅจๅฏผๅ
ฅๆฐๆฎๆจกๅ๏ผ่ฟ็็ๅพ้
ท๏ผ
### ่ฟ็จๆจกๆฟ
-

+
-
-่ฎฉๅบ็จ็จๅบๅฟซ้ๅฏๅจๅนถ่ฟ่กไธ็ดๆฏ Wails ้กน็ฎ็ไธไธชๅ
ณ้ฎ็ฎๆ ใๅฝๆไปฌๆจๅบๆถ๏ผๆไปฌ่ฏๅพๆถต็ๅฝๆถ็ๅพๅค็ฐไปฃๆกๆถ๏ผreactใvue ๅ angularใๅ็ซฏๅผๅ็ไธ็้ๅธธๅบๆงๅทฑ่ง๏ผๅๅฑ่ฟ
้๏ผๅพ้พไฟๆ้ขๅ
ๅฐไฝ๏ผ
-็ปๆ๏ผๆไปฌๅ็ฐๆไปฌ็ๅบๆฌๆจกๆฟๅพๅฟซๅฐฑ่ฟๆถไบ๏ผ่ฟๅฏผ่ดไบ็ปดๆค้ฎ้ขใ่ฟไนๆๅณ็๏ผๆไปฌๆฒกๆไธบๆๆฐๅๆไผๅคง็ๆๆฏๆ ๆไพ้
ท็ซ็็ฐไปฃๆจกๆฟใ
+
-ๅจ v2 ไธญ๏ผๆๅธๆ้่ฟ่ฎฉๆจ่ฝๅค่ชๅทฑๅๅปบๅๆ็ฎกๆจกๆฟๆฅๅขๅผบ็คพๅบ็่ฝๅ๏ผ่ไธๆฏไพ่ตไบ Wails ้กน็ฎใๆไปฅ็ฐๅจๆจๅฏไปฅไฝฟ็จ็คพๅบๆฏๆ็ๆจกๆฟๅๅปบ้กน็ฎ๏ผ
-ๆๅธๆ่ฟๅฐๆฟๅฑๅผๅไบบๅๅๅปบไธไธชๅ
ๆปกๆดปๅ็้กน็ฎๆจกๆฟ็ๆ็ณป็ปใๆๅฏนๆไปฌ็ๅผๅ่
็คพๅบๅฏไปฅๅ้ ็ไธ่ฅฟๆๅฐ้ๅธธๅ
ดๅฅ๏ผ
+่ฎฉๅบ็จ็จๅบๅฟซ้ๅฏๅจๅนถ่ฟ่กไธ็ดๆฏ Wails ้กน็ฎ็ไธไธชๅ
ณ้ฎ็ฎๆ ใ ๅฝๆไปฌๆจๅบๆถ๏ผๆไปฌ่ฏๅพๆถต็ๅฝๆถ็ๅพๅค็ฐไปฃๆกๆถ๏ผreactใvue ๅ angularใ ๅ็ซฏๅผๅ็ไธ็้ๅธธๅบๆงๅทฑ่ง๏ผๅๅฑ่ฟ
้๏ผๅพ้พไฟๆ้ขๅ
ๅฐไฝ๏ผ ็ปๆ๏ผๆไปฌๅ็ฐๆไปฌ็ๅบๆฌๆจกๆฟๅพๅฟซๅฐฑ่ฟๆถไบ๏ผ่ฟๅฏผ่ดไบ็ปดๆค้ฎ้ขใ ่ฟไนๆๅณ็๏ผๆไปฌๆฒกๆไธบๆๆฐๅๆไผๅคง็ๆๆฏๆ ๆไพ้
ท็ซ็็ฐไปฃๆจกๆฟใ
+
+ๅจ v2 ไธญ๏ผๆๅธๆ้่ฟ่ฎฉๆจ่ฝๅค่ชๅทฑๅๅปบๅๆ็ฎกๆจกๆฟๆฅๅขๅผบ็คพๅบ็่ฝๅ๏ผ่ไธๆฏไพ่ตไบ Wails ้กน็ฎใ ๆไปฅ็ฐๅจๆจๅฏไปฅไฝฟ็จ็คพๅบๆฏๆ็ๆจกๆฟๅๅปบ้กน็ฎ๏ผ ๆๅธๆ่ฟๅฐๆฟๅฑๅผๅไบบๅๅๅปบไธไธชๅ
ๆปกๆดปๅ็้กน็ฎๆจกๆฟ็ๆ็ณป็ปใ ๆๅฏนๆไปฌ็ๅผๅ่
็คพๅบๅฏไปฅๅ้ ็ไธ่ฅฟๆๅฐ้ๅธธๅ
ดๅฅ๏ผ
### ไบคๅ็ผ่ฏๅฐ Windows
ๅ ไธบ้็จไบ Windows ็ Wails v2 ๆฏ็บฏ Go๏ผๆไปฅๆจๅฏไปฅๅจๆฒกๆ docker ็ๆ
ๅตไธ้ๅฏน Windows ๆๅปบใ
-

+
-
+
+
+
### ็ป่ฏญ
-ๆญฃๅฆๆๅจ Windows ๅ่ก่ฏดๆไธญๆ่ฏด๏ผWails v2 ไปฃ่กจไบ่ฏฅ้กน็ฎ็ๆฐ่ตท็นใๆญค็ๆฌ็็ฎ็ๆฏ่ทๅพๆๅ
ณๆฐๆนๅผ็ๅ้ฆ๏ผๅนถๅจๅฎๆด็ๆฌๅๅธไนๅ่งฃๅณๆๆ้่ฏฏใ้ๅธธๆฌข่ฟๆจ็ๆ่ง๏ผ่ฏทๅฐไปปไฝๅ้ฆๅ้ๅฐ[v2 ๆต่ฏ็](https://github.com/wailsapp/wails/discussions/828)่ฎจ่ฎบๆฟใ
+ๆญฃๅฆๆๅจ Windows ๅ่ก่ฏดๆไธญๆ่ฏด๏ผWails v2 ไปฃ่กจไบ่ฏฅ้กน็ฎ็ๆฐ่ตท็นใ ๆญค็ๆฌ็็ฎ็ๆฏ่ทๅพๆๅ
ณๆฐๆนๅผ็ๅ้ฆ๏ผๅนถๅจๅฎๆด็ๆฌๅๅธไนๅ่งฃๅณๆๆ้่ฏฏใ ้ๅธธๆฌข่ฟๆจ็ๆ่ง๏ผ ่ฏทๅฐไปปไฝๅ้ฆๅ้ๅฐ[v2 ๆต่ฏ็](https://github.com/wailsapp/wails/discussions/828)่ฎจ่ฎบๆฟใ
-Linux**ๅพ้พ**ๆฏๆใๆไปฌ้ข่ฎกๆต่ฏ็ไผๆไธไบๅฐๆฏ็
ใ่ฏท้่ฟๆไบค่ฏฆ็ป็้่ฏฏๆฅๅๆฅๅธฎๅฉๆไปฌๅธฎๅฉๆจ๏ผ
+Linux**ๅพ้พ**ๆฏๆใ ๆไปฌ้ข่ฎกๆต่ฏ็ไผๆไธไบๅฐๆฏ็
ใ ่ฏท้่ฟๆไบค่ฏฆ็ป็้่ฏฏๆฅๅๆฅๅธฎๅฉๆไปฌๅธฎๅฉๆจ๏ผ
ๆๅ๏ผๆ่ฟ่ฆ็นๅซๆ่ฐขๆๆ[้กน็ฎ่ตๅฉๅ](/credits#sponsors)๏ผไปไปฌ็ๅนๅๆฏๆไปฅๅค็งๆนๅผๆจๅจไบ่ฏฅ้กน็ฎใ
@@ -116,4 +93,4 @@ Lea.
PS: ่ท็ฆป v2 ๆญฃๅผ็ๅๅธไธ่ฟไบ๏ผ
-PPS๏ผๅฆๆๆจๆๆจ็ๅ
ฌๅธๅ็ฐ Wails ๆ็จ๏ผๅฏไปฅ่่[่ตๅฉ่ฏฅ้กน็ฎ](https://github.com/sponsors/leaanthony)ใ่ฐข่ฐข๏ผ
+PPS๏ผๅฆๆๆจๆๆจ็ๅ
ฌๅธๅ็ฐ Wails ๆ็จ๏ผๅฏไปฅ่่[่ตๅฉ่ฏฅ้กน็ฎ](https://github.com/sponsors/leaanthony)ใ ่ฐข่ฐข๏ผ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/authors.yml b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/authors.yml
index bb1ff8e8a..25bd8097b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-blog/authors.yml
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-blog/authors.yml
@@ -3,7 +3,6 @@ leaanthony:
title: Wails ้กน็ฎ็ปดๆค่
url: https://github.com/leaanthony
image_url: https://github.com/leaanthony.png
-
misitebao:
name: ็ฑณๅธ็นๅ
title: ๆถๆๅธ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/appendix/_category_.json b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/appendix/_category_.json
index 83af4ca28..1374f0d55 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/appendix/_category_.json
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/appendix/_category_.json
@@ -1,4 +1,4 @@
{
- "label": "Appendix",
+ "label": "Runtime",
"position": 70
}
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/links.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/links.mdx
index f336dc2fc..90c365a3d 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/links.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/links.mdx
@@ -4,7 +4,7 @@ sidebar_position: 2
# ้พๆฅ
-ๆญค้กต้ข็จไบๅๅบ็คพๅบ็ธๅ
ณ็้พๆฅใ่ฏทๆไบค PR๏ผ็นๅป้กต้ขๅบ้จ็`็ผ่พๆญค้กต`๏ผๅขๅ ้พๆฅใ
+ๆญค้กต้ข็จไบๅๅบ็คพๅบ็ธๅ
ณ็้พๆฅใ ่ฏทๆไบค PR๏ผ็นๅป้กต้ขๅบ้จ็`็ผ่พๆญค้กต`๏ผๅขๅ ้พๆฅใ
## ไบไธ่ตท็ Wails
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx
index 31d7b6ad5..bdc0534b5 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/encrypteasy.mdx
@@ -5,6 +5,6 @@

-**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails.**
+**[EncryptEasy](https://www.encrypteasy.app) is a simple and easy to use PGP encryption tool, managing all your and your contacts keys. Encryption should be simple. Developed with Wails. Encryption should be simple. Developed with Wails.**
-Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy.
+Encrypting messages using PGP is the industry standard. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy. Everyone has a private and a public key. Your private key, well, needs to be kept private so only you can read messages. Your public key is distributed to anyone who wants to send you secret, encrypted messages. Managing keys, encrypting messages and decrypting messages should be a smooth experience. EncryptEasy is all about making it easy.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx
index 687be3870..a46a3b95a 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/filehound.mdx
@@ -5,19 +5,10 @@

-
[FileHound Export Utility](https://www.filehound.co.uk/) FileHound is a cloud document management platform made for secure file retention, business process automation and SmartCapture capabilities.
-The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats.
+The FileHound Export Utility allows FileHound Administrators the ability to run a secure document and data extraction tasks for alternative back-up and recovery purposes. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats. This application will download all documents and/or meta data saved in FileHound based on the filters you choose. The metadata will be exported in both JSON and XML formats.
-Backend built with:
-Go 1.15
-Wails 1.11.0
-go-sqlite3 1.14.6
-go-linq 3.2
+Backend built with: Go 1.15 Wails 1.11.0 go-sqlite3 1.14.6 go-linq 3.2
-Frontend with:
-Vue 2.6.11
-Vuex 3.4.0
-Typescript
-Tailwind 1.9.6
+Frontend with: Vue 2.6.11 Vuex 3.4.0 Typescript Tailwind 1.9.6
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx
index b75238028..705b0ee0c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/mollywallet.mdx
@@ -5,5 +5,5 @@

-[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions.
+[Molly Wallet](https://github.com/grvlle/constellation_wallet/) the official $DAG wallet of the Constellation Network. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions. It'll let users interact with the Hypergraph Network in various ways, not limited to producing $DAG transactions.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx
index 36cbf2fdf..7e9d8c01e 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/optimus.mdx
@@ -5,5 +5,5 @@

-[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats.
+[Optimus](https://github.com/splode/optimus) is a desktop image optimization application. [Optimus](https://github.com/splode/optimus) is a desktop image optimization application. It supports conversion and compression between WebP, JPEG, and PNG image formats.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx
index 59680bdb3..a212c5e3d 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/riftshare.mdx
@@ -5,7 +5,7 @@

-Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app)
+Easy, Secure, and Free file sharing for everyone. Learn more at [Riftshare.app](https://riftshare.app) Learn more at [Riftshare.app](https://riftshare.app)
## Features
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx
index 774e86e70..1bcf36de3 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/surge.mdx
@@ -5,5 +5,5 @@

-[Surge](https://surge.rule110.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source.
+[Surge](https://surge.rule110.io/) is a p2p filesharing app designed to utilize blockchain technologies to enable 100% anonymous file transfers. Surge is end-to-end encrypted, decentralized and open source. Surge is end-to-end encrypted, decentralized and open source.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx
index 3e842af40..46108cfa1 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wally.mdx
@@ -5,5 +5,5 @@

-[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world.
+[Wally](https://ergodox-ez.com/pages/wally) is the official firmware flasher for [Ergodox](https://ergodox-ez.com/) keyboards. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world. It looks great and is a fantastic example of what you can achieve with Wails: the ability to combine the power of Go and the rich graphical tools of the web development world.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx
index 8fdbe7cd8..38c482aac 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/wombat.mdx
@@ -5,6 +5,5 @@

-
[Wombat](https://github.com/rogchap/wombat) is a cross platform gRPC client.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx
index 7ccd32e26..2e46d08ee 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/showcase/ytd.mdx
@@ -5,6 +5,5 @@

-
[Ytd](https://github.com/marcio199226/ytd/tree/v2-wails) is an app for downloading tracks from youtube, creating offline playlists and share them with your friends, your friends will be able to playback your playlists or download them for offline listening, has an built-in player.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/templates.mdx
index 32a39ac2f..3b056dcab 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/templates.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/community/templates.mdx
@@ -4,11 +4,11 @@ sidebar_position: 1
# ๆจกๆฟ
-ๆญค้กต้ข็จไฝ็คพๅบๆฏๆ็ๆจกๆฟๅ่กจใ่ฏทๆไบคไธไธชๅ
ๅซๆจ็ๆจกๆฟ็ PR๏ผ็นๅป้กต้ขๅบ้จ็`็ผ่พๆญค้กต`๏ผใ่ฆๆๅปบๆจ่ชๅทฑ็ๆจกๆฟ๏ผ่ฏทๅ่[ๆจกๆฟ](../guides/templates)ๆๅใ
+ๆญค้กต้ข็จไฝ็คพๅบๆฏๆ็ๆจกๆฟๅ่กจใ ่ฏทๆไบคไธไธชๅ
ๅซๆจ็ๆจกๆฟ็ PR๏ผ็นๅป้กต้ขๅบ้จ็`็ผ่พๆญค้กต`๏ผใ ่ฆๆๅปบๆจ่ชๅทฑ็ๆจกๆฟ๏ผ่ฏทๅ่[ๆจกๆฟ](../guides/templates)ๆๅใ
่ฆไฝฟ็จ่ฟไบๆจกๆฟ๏ผ่ฏท่ฟ่ก `wails init -n "ๆจ็้กน็ฎๅ" -t [ไธ้ข็้พๆฅ[@็ๆฌ]]`
-ๅฆๆไธๅธฆ็ๆฌๅ็ผ๏ผ้ป่ฎคไฝฟ็จ็ๆฏไธปๅๆฏไปฃ็ ๆจกๆฟ๏ผๅฆๆๅธฆๆ็ๆฌๅ็ผ๏ผๅไฝฟ็จ่ฏฅ็ๆฌๅฏนๅบๆ ็ญพ็ไปฃ็ ๆจกๆฟใ
+ๅฆๆไธๅธฆ็ๆฌๅ็ผ๏ผ้ป่ฎคไฝฟ็จ็ๆฏไธปๅๆฏไปฃ็ ๆจกๆฟ๏ผๅฆๆๅธฆๆ็ๆฌๅ็ผ๏ผๅไฝฟ็จ่ฏฅ็ๆฌๅฏนๅบๆ ็ญพ็ไปฃ็ ๆจกๆฟใ If there is a version suffix, the code template corresponding to the tag of this version is used.
็คบไพ๏ผ`wails init -n "Your Project Name" -t https://github.com/misitebao/wails-template-vue@v2.0.0-beta.3`
@@ -35,10 +35,14 @@ sidebar_position: 1
- [wails-react-template](https://github.com/AlienRecall/wails-react-template) - ๅบไบ reactjs ็ๆจกๆฟ
- [wails-react-template](https://github.com/flin7/wails-react-template) - ๅบไบ React ๅนถๆฏๆๅฎๆถๅผๅๆจกๅผ็่ฝป้็บงๆจกๆฟ
- [wails-vite-react-ts](https://github.com/lontten/wails-vite-react-ts) - ๅบไบ Vite + React + TypeScript ็ๆจกๆฟ
-- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - ๅบไบ Next.js + TypeScript ็ๆจกๆฟ
## Svelte
- [wails-svelte-template](https://github.com/raitonoberu/wails-svelte-template) - ๅบไบ Svelte ็ๆจกๆฟ
- [wails-vite-svelte-template](https://github.com/BillBuilt/wails-vite-svelte-template) - ไฝฟ็จ Svelte ๅ Vite ็ๆจกๆฟ
- [wails-vite-svelte-tailwind-template](https://github.com/BillBuilt/wails-vite-svelte-tailwind-template) - ไฝฟ็จ Svelte ๅ Vite ๅ TailwindCSS v3 ็ๆจกๆฟ
+- [wails-template-nextjs](https://github.com/LGiki/wails-template-nextjs) - ๅบไบ Next.js + TypeScript ็ๆจกๆฟ
+
+## Elm
+
+- [wails-elm-template](https://github.com/benjamin-thomas/wails-elm-template) - Develop your GUI app with functional programming and a **snappy** hot-reload setup :tada: :rocket:
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx
index d61544709..59863b4b5 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/developing-new-features.mdx
@@ -4,32 +4,29 @@ sidebar_position: 20
# ๅผๅๆฐๅ่ฝ
-We are always keen to add features to Wails and expand on what the project can do.
-The process for adding new features are as follows:
+We are always keen to add features to Wails and expand on what the project can do. The process for adding new features are as follows: The process for adding new features are as follows:
-- Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current
-[Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours.
+- Pick an enhancement ticket with the "TODO" label. Pick an enhancement ticket with the "TODO" label. It's preferable to select one from the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) but the choice is yours.
- Before developing, check that the ticket includes the following information:
- The purpose of the enhancement
- What is out of scope for the enhancement
- What platforms the enhancement targets (most features should be cross-platform unless there's a very specific reason)
-- If the ticket does not include this information, feel free to request the information from the
-person who opened the ticket. Sometimes placeholder tickets are created and require more details
+- If the ticket does not include this information, feel free to request the information from the person who opened the ticket. Sometimes placeholder tickets are created and require more details Sometimes placeholder tickets are created and require more details
- Comment on the ticket stating you wish to develop the feature
- Clone the repository and create a branch with the format `feature/
_`
-- New features often require documentation so please ensure you have also added or updated the documentation as part of
-the changes
-- Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and
-test cases listed with checkmarks, so that others can know what still needs to be tested.
+- New features often require documentation so please ensure you have also added or updated the documentation as part of the changes
+- Once the feature is ready for testing, create a draft PR. Once the feature is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
enhancement requests are reviewed for good fit. Not all ideas will be selected so it's best to have discussion
on the ticket first.
+::: Not all ideas will be selected so it's best to have discussion
+on the ticket first.
:::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
-:::
+::: :::
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx
index 1f945c11e..6243a9ed3 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/documenting.mdx
@@ -4,16 +4,9 @@ sidebar_position: 40
# ๆๆกฃ
-This website is also the main documentation site for the project. Sometimes this gets
-out of date and needs some slight adjustments. Some of the documentation isn't written
-to the best standards either. Developing documentation is hard and so any contribution
-to this is greatly appreciated. Features without documentation are unfinished so to the
-project, it's *as important* as the code.
+This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. This website is also the main documentation site for the project. Sometimes this gets out of date and needs some slight adjustments. Some of the documentation isn't written to the best standards either. Developing documentation is hard and so any contribution to this is greatly appreciated. Features without documentation are unfinished so to the project, it's *as important* as the code.
-We generally do not create tickets for updating documentation so if there is text you
-think should be updated or rephrased then feel free to submit a PR for that. This site
-is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create
-the site so there is plenty of existing documentation and tutorials around to get started.
+We generally do not create tickets for updating documentation so if there is text you think should be updated or rephrased then feel free to submit a PR for that. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started. This site is in the main repository under the `website` directory. We use [Docusaurus](https://docusaurus.io/) to create the site so there is plenty of existing documentation and tutorials around to get started.
To set up a local documentation development environment, do the following:
@@ -22,18 +15,13 @@ To set up a local documentation development environment, do the following:
- `npm install`
- `npm run start`
-After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000).
-Any changes made to the site text will be immediately reflected in the browser.
+After it has all installed and is running, you should see the site at [`http://localhost:3000`](http://localhost:3000). Any changes made to the site text will be immediately reflected in the browser. Any changes made to the site text will be immediately reflected in the browser.
## Versioning
-We employ a versioning system where we have the "latest" documentation AKA "Next Version" which
-has all the changes that have occurred since the last release. We also keep the last release
-documentation as well as the version before that.
+We employ a versioning system where we have the "latest" documentation AKA "Next Version" which has all the changes that have occurred since the last release. We also keep the last release documentation as well as the version before that. We also keep the last release documentation as well as the version before that.
-There isn't usually a reason to update released documentation so we don't generally update
-the documents in the `versioned_docs` or `versioned_sidebars` directories.
+There isn't usually a reason to update released documentation so we don't generally update the documents in the `versioned_docs` or `versioned_sidebars` directories.
-The "next version" docs are mainly in `website/docs` with some "version independent" documents
-in `src/pages`. Any updates should be made in the `website/docs` directory.
+The "next version" docs are mainly in `website/docs` with some "version independent" documents in `src/pages`. Any updates should be made in the `website/docs` directory. Any updates should be made in the `website/docs` directory.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx
index a5e67fa78..4ea121d87 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/fixing-bugs.mdx
@@ -9,22 +9,19 @@ The process for fixing bugs are as follows:
- Check the current [Backlog](https://github.com/orgs/wailsapp/projects/1/views/1) and select a bug to fix
- Before developing, check that the ticket includes the following information:
- The scope of the issue including platforms affected
-- The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to
- prove that it is a Wails issue with a minimal reproducible example
+- The steps to reproduce. The steps to reproduce. Sometimes bugs are opened that are not Wails issues and the onus is on the reporter to prove that it is a Wails issue with a minimal reproducible example
- The output of `wails doctor`
-- If the ticket does not include this information, feel free to request the information from the
- person who opened the ticket.
+- If the ticket does not include this information, feel free to request the information from the person who opened the ticket.
- Comment on the ticket stating you wish to develop a fix
- Clone the repository and create a branch with the format `bugfix/_`
-- Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and
- test cases listed with checkmarks, so that others can know what still needs to be tested.
+- Once the fix is ready for testing, create a draft PR. Once the fix is ready for testing, create a draft PR. Please ensure the PR description has the test scenarios and test cases listed with checkmarks, so that others can know what still needs to be tested.
- Once all the testing is completed, please update the status of the PR from draft and leave a message.
:::note
There is nothing stopping you from opening a ticket and working on it yourself, but please be aware that all
bugfixes should be discussed as the approach may have unintended side effects.
-:::
+::: :::
:::warning
Any PRs opened without a corresponding ticket may be rejected.
-:::
+::: :::
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/helping-others.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/helping-others.mdx
index c3d5b94a9..83671d83e 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/helping-others.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/helping-others.mdx
@@ -4,13 +4,9 @@ sidebar_position: 50
# ๅธฎๅฉๅ
ถไปไบบ
-A great way to contribute to the project is to help others who are experiencing difficulty.
-This is normally reported as a ticket or a message on the Wails slack channel. Even just
-clarifying the issue can really help out. Sometimes, when an issue is discussed and gets
-resolved, we create a guide out of it to help others who face the same issues.
+A great way to contribute to the project is to help others who are experiencing difficulty. This is normally reported as a ticket or a message on the Wails slack channel. Even just clarifying the issue can really help out. Sometimes, when an issue is discussed and gets resolved, we create a guide out of it to help others who face the same issues.
-To join the Wails slack channel, accept the invite [here](https://gophers.slack.com/join/shared_invite/zt-197vymgt3-sJt4oyakb6nqlVKjXTyeVw#/shared-invite/email)
-and join us on the channel by following [this link](https://gophers.slack.com/?redir=%2Fmessages%2FCJ4P9F7MZ%2F).
+To join the Wails slack channel, accept the invite [here](https://gophers.slack.com/join/shared_invite/zt-197vymgt3-sJt4oyakb6nqlVKjXTyeVw#/shared-invite/email) and join us on the channel by following [this link](https://gophers.slack.com/?redir=%2Fmessages%2FCJ4P9F7MZ%2F).
:::note
Work In Progress
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/setting-up-a-dev-environment.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/setting-up-a-dev-environment.mdx
index 5aa3b69c1..dabc13451 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/setting-up-a-dev-environment.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/setting-up-a-dev-environment.mdx
@@ -15,18 +15,15 @@ NOTE: The directory that you cloned the project into will now be called "clonedi
The Wails CLI will now be at the very latest version.
-To update projects to use the latest version, update the project's `go.mod` and
-ensure the following line is at the bottom of the file:
+To update projects to use the latest version, update the project's `go.mod` and ensure the following line is at the bottom of the file:
`replace github.com/wailsapp/wails/v2 => `
Example:
-On Windows:
-`replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2`
+On Windows: `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2`
-On 'nix:
-`replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2`
+On 'nix: `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2`
To revert back to a stable version, run:
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx
index 911ecfefb..1da6cef1b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/testing.mdx
@@ -4,18 +4,13 @@ sidebar_position: 35
# ๆต่ฏ
-Testing is vitally important to ensure quality in the project. There are a couple of
-scenarios where testing can really help the project:
+Testing is vitally important to ensure quality in the project. Testing is vitally important to ensure quality in the project. There are a couple of scenarios where testing can really help the project:
- Testing if a bug is reproducible on your local system
- Testing PRs to ensure that they work correctly
-If you chose to test if someone's bug report is reproducible on your local system, then
-feel free to add a comment on the ticket confirming this with the output of `wails doctor`.
+If you chose to test if someone's bug report is reproducible on your local system, then feel free to add a comment on the ticket confirming this with the output of `wails doctor`.
-To test PRs, choose a PR to test and check if the PR description has the testing scenarios
-listed. If not, please ask the person who opened the PR to provide that list. Once you have
-determined a valid test scenario, please report your findings on the PR.
+To test PRs, choose a PR to test and check if the PR description has the testing scenarios listed. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR. If not, please ask the person who opened the PR to provide that list. Once you have determined a valid test scenario, please report your findings on the PR.
-If you ever need more clarity or help on testing, please ask a question in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520)
-discussion or on slack.
+If you ever need more clarity or help on testing, please ask a question in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion or on slack.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx
index 6c647b4d6..d871fe0c6 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/contributing/ways-of-contributing.mdx
@@ -4,9 +4,7 @@ sidebar_position: 1
# ่ดก็ฎๆนๅผ
-Wails is an open source, community driven project. We welcome anyone to join us in
-contributing to the project. This documentation is aimed at anyone wishing to get
-familiar with the project and the development processes.
+Wails is an open source, community driven project. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes. We welcome anyone to join us in contributing to the project. This documentation is aimed at anyone wishing to get familiar with the project and the development processes.
There are many ways to contribute to the project:
@@ -17,6 +15,4 @@ There are many ways to contribute to the project:
- Writing tutorials / guides
- Helping others on the issues + discussions boards
-Guides for these have been created in their own sections. Before getting started,
-please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520)
-discussion.
+Guides for these have been created in their own sections. Guides for these have been created in their own sections. Before getting started, please introduce yourself in the [Contributing to Wails](https://github.com/wailsapp/wails/discussions/1520) discussion.
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx
index 2e8be5efd..b6dae829b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/building.mdx
@@ -1,5 +1,4 @@
---
-title: ็ผ่ฏๆจ็้กน็ฎ
sidebar_position: 6
---
@@ -10,15 +9,11 @@ sidebar_position: 6
ๅฆๆๆจ่ฟ่กไบ่ฟๅถๆไปถ๏ผๆจๅบ่ฏฅไผ็ๅฐ้ป่ฎคๅบ็จ็จๅบ๏ผ
-

+
-
+
+
+
ๆๅ
ณ็ผ่ฏ้้กน็ๆดๅค่ฏฆ็ปไฟกๆฏ๏ผ่ฏทๅ้
[ๆๅปบๅฝไปค](../reference/cli#ๆๅปบ)ใ
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx
index 634fe71da..1f57d5aea 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/development.mdx
@@ -1,16 +1,16 @@
---
-title: ๅผๅๆจ็ๅบ็จ็จๅบ
sidebar_position: 5
---
# ๅผๅๆจ็ๅบ็จ็จๅบ
-ๆจๅฏไปฅ้่ฟ่ฟ่ก`wails dev`ไป้กน็ฎ็ฎๅฝๅจๅผๅๆจกๅผไธ่ฟ่กๆจ็ๅบ็จ็จๅบใ่ฟๅฐๆง่กไปฅไธๆไฝ๏ผ
+ๆจๅฏไปฅ้่ฟ่ฟ่ก`wails dev`ไป้กน็ฎ็ฎๅฝๅจๅผๅๆจกๅผไธ่ฟ่กๆจ็ๅบ็จ็จๅบใ ่ฟๅฐๆง่กไปฅไธๆไฝ๏ผ
-- ๆๅปบๆจ็ๅบ็จ็จๅบๅนถ่ฟ่กๅฎ
-- ็ๅฌ Go ๆไปถไธญ็ไฟฎๆนๅนถๅจๆดๆนๆถ้ๆฐๆๅปบ/้ๆฐ่ฟ่ก
-- ่ฎพ็ฝฎๅฐ้่ฟๆต่งๅจไธบๆจ็ๅบ็จ็จๅบๆไพๆๅก็[็ฝ็ปๆๅกๅจ](http://localhost:34115)ใ่ฟๅ
่ฎธๆจไฝฟ็จๆจๅๆฌข็ๆต่งๅจๆฉๅฑใๆจ็่ณๅฏไปฅไปๆงๅถๅฐ่ฐ็จ Go ไปฃ็ ใ
+ - ๆๅปบๆจ็ๅบ็จ็จๅบๅนถ่ฟ่กๅฎ
+ - ็ๅฌ Go ๆไปถไธญ็ไฟฎๆนๅนถๅจๆดๆนๆถ้ๆฐๆๅปบ/้ๆฐ่ฟ่ก
+ - Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change
+ - ่ฎพ็ฝฎๅฐ้่ฟๆต่งๅจไธบๆจ็ๅบ็จ็จๅบๆไพๆๅก็[็ฝ็ปๆๅกๅจ](http://localhost:34115)ใ ่ฟๅ
่ฎธๆจไฝฟ็จๆจๅๆฌข็ๆต่งๅจๆฉๅฑใ ๆจ็่ณๅฏไปฅไปๆงๅถๅฐ่ฐ็จ Go ไปฃ็ ใ
-้ฆๅ
๏ผๅจ้กน็ฎ็ฎๅฝไธญ่ฟ่ก`wails dev`ใๅฏไปฅๅจ[ๆญคๅค](../reference/cli#ๅผๅ)ๆพๅฐๆๅ
ณ่ฟๆน้ข็ๆดๅคไฟกๆฏใ
+้ฆๅ
๏ผๅจ้กน็ฎ็ฎๅฝไธญ่ฟ่ก`wails dev`ใ ๅฏไปฅๅจ[ๆญคๅค](../reference/cli#ๅผๅ)ๆพๅฐๆๅ
ณ่ฟๆน้ข็ๆดๅคไฟกๆฏใ
-ๅณๅฐๆไพ๏ผๆ็จ
+ๅณๅฐๆไพ๏ผๆ็จ
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx
index d56eedf31..13062f1e3 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/firstproject.mdx
@@ -1,5 +1,4 @@
---
-title: ๅๅปบ้กน็ฎ
sidebar_position: 2
---
@@ -9,18 +8,24 @@ sidebar_position: 2
็ฐๅจ CLI ๅทฒๅฎ่ฃ
๏ผๆจๅฏไปฅไฝฟ็จ่ฏฅ`wails init`ๅฝไปค็ๆไธไธชๆฐ้กน็ฎใ
-ไธบไบๅฟซ้ๅฏๅจๅ่ฟ่ก๏ผๆจๅฏไปฅ้่ฟ่ฟ่ก`wails init -n myproject`็ๆไธไธช้ป่ฎค้กน็ฎใ่ฟๅฐๅๅปบไธไธชๅไธบ`myproject`็็ฎๅฝ๏ผๅนถไฝฟ็จ้ป่ฎคๆจกๆฟๅกซๅ
ๅฎใ
+Pick your favourite framework:
-ๅ
ถไปๅฏ็จ็้กน็ฎๆจกๆฟๅฏไปฅไฝฟ็จ `wails init -l`ๅๅบใ่ฟ้ไนๆๆไพไธๅๅ่ฝๅๆกๆถ็[็คพๅบๆจกๆฟ](../community/templates)ใ
+import TabsFrameworks from "../../src/components/frameworktabs";
+
+
+
+
+Wails ้กน็ฎๅ
ทๆไปฅไธๅธๅฑ๏ผ
่ฆๆฅ็ๅ
ถไปๅฏ็จ้้กน๏ผๆจๅฏไปฅ่ฟ่ก `wails init -help`ใ ๆดๅค่ฏฆ็ปไฟกๆฏๅฏไปฅๅจ [ๅๅงๅๅฝไปค](../reference/cli#ๅๅงๅ)ไธญๆพๅฐใ
## ้กน็ฎๅธๅฑ
-Wails ้กน็ฎๅ
ทๆไปฅไธๅธๅฑ๏ผ
+Wails projects have the following layout:
```
.
+.
โโโ build/
โ โโโ appicon.png
โ โโโ darwin/
@@ -37,15 +42,15 @@ Wails ้กน็ฎๅ
ทๆไปฅไธๅธๅฑ๏ผ
- `/main.go` - ไธปๅบ็จ
- `/frontend/` - ๅ็ซฏ้กน็ฎๆไปถ
- `/build/` - ้กน็ฎๆๅปบ็ฎๅฝ
- - `/build/appicon.png` - ๅบ็จ็จๅบๅพๆ
- - `/build/darwin/` - Mac ็นๅฎ็้กน็ฎๆไปถ
- - `/build/windows/` - Windows ็นๅฎ็้กน็ฎๆไปถ
- `/wails.json` - ้กน็ฎ้
็ฝฎ
- `/go.mod` - Go mod ๆไปถ
- `/go.sum` - Go mod ๆ ก้ชๆไปถ
+- `/build/windows/` - Windows ็นๅฎ็้กน็ฎๆไปถ
+- `/go.mod` - Go module file
+- `/go.sum` - Go module checksum file
`frontend`็ฎๅฝๆฒกๆ็นๅฎไบ Wails ็ๅ
ๅฎน๏ผๅฏไปฅๆฏๆจ้ๆฉ็ไปปไฝๅ็ซฏ้กน็ฎใ
-`build`็ฎๅฝๅจๆๅปบ่ฟ็จไธญไฝฟ็จใ่ฟไบๆไปถๅฏไปฅไฟฎๆนไปฅ่ชๅฎไนๆจ็ๆๅปบใๅฆๆๆไปถไปๆๅปบ็ฎๅฝไธญๅ ้ค๏ผๅฐ้ๆฐ็ๆ้ป่ฎค็ๆฌใ
+`build`็ฎๅฝๅจๆๅปบ่ฟ็จไธญไฝฟ็จใ ่ฟไบๆไปถๅฏไปฅไฟฎๆนไปฅ่ชๅฎไนๆจ็ๆๅปบใ ๅฆๆๆไปถไปๆๅปบ็ฎๅฝไธญๅ ้ค๏ผๅฐ้ๆฐ็ๆ้ป่ฎค็ๆฌใ
-`go.mod`ไธญ็้ป่ฎคๆจกๅๅ็งฐๆฏโchangemeโใๆจๅบ่ฏฅๅฐๅ
ถๆดๆนไธบๆดๅ้็ๅ
ๅฎนใ
+`go.mod`ไธญ็้ป่ฎคๆจกๅๅ็งฐๆฏโchangemeโใ ๆจๅบ่ฏฅๅฐๅ
ถๆดๆนไธบๆดๅ้็ๅ
ๅฎนใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx
index 0fc6ca4d1..5274fe06a 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/gettingstarted/installation.mdx
@@ -22,14 +22,14 @@ Wails ๆ่ฎธๅคๅฎ่ฃ
ๅ้่ฆ็ๅธธ่งไพ่ต้กน๏ผ
ไป[Go ไธ่ฝฝ้กต้ข](https://golang.org/dl/)ไธ่ฝฝ Goใ
-็กฎไฟๆจ้ตๅฎๅฎๆน็[Go ๅฎ่ฃ
่ฏดๆ](https://golang.org/doc/install#install)ใๆจ่ฟ้่ฆ็กฎไฟๆจ็ `PATH` ็ฏๅขๅ้ๅ
ๅซๆจ็ `~/go/bin` ็ฎๅฝ่ทฏๅพใ ้ๅฏ็ป็ซฏๅนถๆง่กไปฅไธๅฝไปคๆฃๆฅ๏ผ
+็กฎไฟๆจ้ตๅฎๅฎๆน็[Go ๅฎ่ฃ
่ฏดๆ](https://golang.org/doc/install#install)ใ ๆจ่ฟ้่ฆ็กฎไฟๆจ็ `PATH` ็ฏๅขๅ้ๅ
ๅซๆจ็ `~/go/bin` ็ฎๅฝ่ทฏๅพใ ้ๅฏ็ป็ซฏๅนถๆง่กไปฅไธๅฝไปคๆฃๆฅ๏ผ
- ๆฃๆฅ Go ๆฏๅฆๅฎ่ฃ
ๆญฃ็กฎ๏ผ `go version`
- ๆฃๆฅ "~/go/bin" ๆฏๅฆๅจๆจ็ PATH ๅ้ไธญ๏ผ `echo $PATH | grep go/bin`
### NPM
-ไป[Node ไธ่ฝฝ้กต้ข](https://nodejs.org/en/download/)ไธ่ฝฝ NPMใๆๅฅฝไฝฟ็จๆๆฐ็ๆฌ๏ผๅ ไธบ่ฟๆฏๆไปฌ้ๅธธไผๆต่ฏ็็ๆฌใ
+ไป[Node ไธ่ฝฝ้กต้ข](https://nodejs.org/en/download/)ไธ่ฝฝ NPMใ ๆๅฅฝไฝฟ็จๆๆฐ็ๆฌ๏ผๅ ไธบ่ฟๆฏๆไปฌ้ๅธธไผๆต่ฏ็็ๆฌใ
่ฟ่ก `npm --version` ่ฟ่ก้ช่ฏใ
@@ -39,37 +39,7 @@ Wails ๆ่ฎธๅคๅฎ่ฃ
ๅ้่ฆ็ๅธธ่งไพ่ต้กน๏ผ
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
-
-
-
- Wails ่ฆๆฑๅฎ่ฃ
-
- WebView2
-
- ่ฟ่กๆถใไธไบ Windows ๅทฒ็ป้ป่ฎคๅฎ่ฃ
ไบ่ฟไธชใๆจๅฏไปฅไฝฟ็จ{" "}
- wails doctor
- ๅฝไปค่ฟ่กๆฃๆฅ๏ผ่งไธๆ๏ผใ
-
-
- Wails ่ฆๆฑๅฎ่ฃ
xcode ๅฝไปค่กๅทฅๅ
ทใ่ฟๅฏไปฅ้่ฟ่ฟ่กไปฅไธๅฝไปคๆฅๅฎๆ๏ผ
-
- xcode-select --install
-
-
- Linux ้่ฆๆ ๅ็gcc
ๆๅปบๅทฅๅ
ทไปฅๅ libgtk3
ๅ
- libwebkit
ใไธๅ
ถไธบไธๅ็ๅ่ก็ๅๅบๅคง้ๅฝไปค๏ผWails
- ๅฏไปฅๅฐ่ฏ็กฎๅฎ้ๅฏนๆจ็็นๅฎๅ่ก็็ๅฎ่ฃ
ๅฝไปคใๅฎ่ฃ
ๅ่ฟ่ก
- wails doctor
- ไปฅๆพ็คบๅฆไฝๅฎ่ฃ
ไพ่ต้กนใๅฆๆๆจ็ๅ่ก็/ๅ
็ฎก็ๅจไธๅๆฏๆ๏ผ่ฏทๅ้
ๆทปๅ Linuxๅ่ก็ๆๅใ
-
-
+
## ๅฏ้ไพ่ต
@@ -81,4 +51,8 @@ import TabItem from "@theme/TabItem";
## ็ณป็ปๆฃๆฅ
-่ฟ่ก `wails doctor` ๅฐๆฃๆฅๆจๆฏๅฆๅฎ่ฃ
ไบๆญฃ็กฎ็ไพ่ต้กนใๅฆๆๆฒกๆ๏ผๅฎไผๅฐฑ็ผบๅฐ็ๅ
ๅฎนๆไพๅปบ่ฎฎไปฅๅธฎๅฉ็บ ๆญฃ้ฎ้ขใ
+่ฟ่ก `wails doctor` ๅฐๆฃๆฅๆจๆฏๅฆๅฎ่ฃ
ไบๆญฃ็กฎ็ไพ่ต้กนใ ๅฆๆๆฒกๆ๏ผๅฎไผๅฐฑ็ผบๅฐ็ๅ
ๅฎนๆไพๅปบ่ฎฎไปฅๅธฎๅฉ็บ ๆญฃ้ฎ้ขใ
+
+## The `wails` command appears to be missing?
+
+If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt.
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx
index 085cb968b..d8192436d 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/application-development.mdx
@@ -1,3 +1,4 @@
+
# ๅบ็จๅผๅ
ไฝฟ็จ Wails ๅผๅๅบ็จ็จๅบๆฒกๆ็กฌๆง่งๅฎ๏ผไฝๆไธไบๅบๆฌๅๅใ
@@ -10,43 +11,42 @@
```go title="app.go"
type App struct {
- ctx context.Context
+ ctx context.Context
}
func NewApp() *App {
- return &App{}
+ return &App{}
}
func (a *App) startup(ctx context.Context) {
- a.ctx = ctx
+ a.ctx = ctx
}
func (a *App) shutdown(ctx context.Context) {
}
```
-- `startup`ๆนๆณไผๅจ Wails ๅ้
ๅฎ้่ฆ็่ตๆบๅ็ซๅณ่ฐ็จ๏ผ่ฟๆฏๅๅปบ่ตๆบใ่ฎพ็ฝฎไบไปถไพฆๅฌๅจไปฅๅๅบ็จ็จๅบๅจๅฏๅจๆถ้่ฆ็ไปปไฝๅ
ถไปๅ
ๅฎน็ๅฅฝๅฐๆนใๅฎๆไพไบไธไธช`context.Context`๏ผ
- ้ๅธธไฟๅญๅจ็ปๆๅญๆฎตไธญใ่ฐ็จ[่ฟ่กๆถ](../reference/runtime/intro)้่ฆๆญค`context.Context`ใๅฆๆๆญคๆนๆณ่ฟๅ้่ฏฏ๏ผๅๅบ็จ็จๅบๅฐ็ปๆญขใๅจๅผๅๆจกๅผไธ๏ผ้่ฏฏไผ่พๅบๅฐๆงๅถๅฐใ
-- `shutdown`ๆนๆณไผๅจๅบ็จ็จๅบๅ
ณ้ญ่ฟ็จๆถ่ฐ็จ๏ผ่ฟๆฏ้ๆพๅ
ๅญๅๆง่กไปปไฝๅ
ณ้ญไปปๅก็ๅฅฝๅฐๆนใ
+- `startup`ๆนๆณไผๅจ Wails ๅ้
ๅฎ้่ฆ็่ตๆบๅ็ซๅณ่ฐ็จ๏ผ่ฟๆฏๅๅปบ่ตๆบใ่ฎพ็ฝฎไบไปถไพฆๅฌๅจไปฅๅๅบ็จ็จๅบๅจๅฏๅจๆถ้่ฆ็ไปปไฝๅ
ถไปๅ
ๅฎน็ๅฅฝๅฐๆนใ ๅฎๆไพไบไธไธช`context.Context`๏ผ ้ๅธธไฟๅญๅจ็ปๆๅญๆฎตไธญใ ่ฐ็จ[่ฟ่กๆถ](../reference/runtime/intro)้่ฆๆญค`context.Context`ใ ๅฆๆๆญคๆนๆณ่ฟๅ้่ฏฏ๏ผๅๅบ็จ็จๅบๅฐ็ปๆญขใ ๅจๅผๅๆจกๅผไธ๏ผ้่ฏฏไผ่พๅบๅฐๆงๅถๅฐใ
-`main.go`ๆไปถ้ๅธธ็ฑๅฏน`wails.Run()`็ๅไธช่ฐ็จ็ปๆ๏ผๅฎๆฅๅๅบ็จ็จๅบ้
็ฝฎใๆจกๆฟไฝฟ็จ็ๆจกๅผๆฏ๏ผๅจ่ฐ็จ`wails.Run()`ไนๅ๏ผ
-ๆไปฌๅๅปบๅนถไฟๅญไธไธชๅจ`app.go`ไธญๅฎไน็็ปๆไฝ็ๅฎไพๅจๅ`app`็ๅ้ไธญใ่ฟไธช้
็ฝฎๆฏๆไปฌๆทปๅ ๅ่ฐ็ๅฐๆน๏ผ
+- The shutdown method will be called by Wails right at the end of the shutdown process. This is a good place to deallocate memory and perform any shutdown tasks.
+
+`main.go`ๆไปถ้ๅธธ็ฑๅฏน`wails.Run()`็ๅไธช่ฐ็จ็ปๆ๏ผๅฎๆฅๅๅบ็จ็จๅบ้
็ฝฎใ ๆจกๆฟไฝฟ็จ็ๆจกๅผๆฏ๏ผๅจ่ฐ็จ`wails.Run()`ไนๅ๏ผ ๆไปฌๅๅปบๅนถไฟๅญไธไธชๅจ`app.go`ไธญๅฎไน็็ปๆไฝ็ๅฎไพๅจๅ`app`็ๅ้ไธญใ ่ฟไธช้
็ฝฎๆฏๆไปฌๆทปๅ ๅ่ฐ็ๅฐๆน๏ผ
```go {3,9,10} title="main.go"
func main() {
- app := NewApp()
+ app := NewApp()
- err := wails.Run(&options.App{
- Title: "My App",
- Width: 800,
- Height: 600,
- OnStartup: app.startup,
- OnShutdown: app.shutdown,
- })
- if err != nil {
- log.Fatal(err)
- }
+ err := wails.Run(&options.App{
+ Title: "My App",
+ Width: 800,
+ Height: 600,
+ OnStartup: app.startup,
+ OnShutdown: app.shutdown,
+ })
+ if err != nil {
+ log.Fatal(err)
+ }
}
```
@@ -55,19 +55,19 @@ func main() {
## ็ปๅฎๆนๆณ
-ๆจๅฏ่ฝๅธๆไปๅ็ซฏ่ฐ็จ Go ๆนๆณใ่ฟ้ๅธธๆฏ้่ฟๅ`app.go`ไธญๅทฒ็ปๅฎไน็็ปๆไฝไธญๆทปๅ ๅ
ฌๅ
ฑๆนๆณๆฅๅฎ็ฐ็๏ผ
+ๆจๅฏ่ฝๅธๆไปๅ็ซฏ่ฐ็จ Go ๆนๆณใ ่ฟ้ๅธธๆฏ้่ฟๅ`app.go`ไธญๅทฒ็ปๅฎไน็็ปๆไฝไธญๆทปๅ ๅ
ฌๅ
ฑๆนๆณๆฅๅฎ็ฐ็๏ผ
```go {16-18} title="app.go"
type App struct {
- ctx context.Context
+ ctx context.Context
}
func NewApp() *App {
- return &App{}
+ return &App{}
}
func (a *App) startup(ctx context.Context) {
- a.ctx = ctx
+ a.ctx = ctx
}
func (a *App) shutdown(ctx context.Context) {
@@ -83,83 +83,115 @@ func (a *App) Greet(name string) string {
```go {11-13} title="main.go"
func main() {
- app := NewApp()
+ app := NewApp()
- err := wails.Run(&options.App{
- Title: "My App",
- Width: 800,
- Height: 600,
- OnStartup: app.startup,
- OnShutdown: app.shutdown,
+ err := wails.Run(&options.App{
+ Title: "My App",
+ Width: 800,
+ Height: 600,
+ OnStartup: app.startup,
+ OnShutdown: app.shutdown,
Bind: []interface{}{
app,
},
- })
- if err != nil {
- log.Fatal(err)
- }
+ })
+ if err != nil {
+ log.Fatal(err)
+ }
}
```
่ฟๅฐ็ปๅฎ`App`็ปๆไธญ็ๆๆๅ
ฌๅ
ฑๆนๆณ(ๅฎๆฐธ่ฟไธไผ็ปๅฎ startup ๅ shutdown ๆนๆณ)ใ
+### Dealing with context when binding multiple structs
+
ๅฏไปฅๅจ[ๆญคๅค](../howdoesitwork#ๆนๆณ็ปๅฎ)ๆพๅฐๆๅ
ณ็ปๅฎ็ๆดๅคไฟกๆฏใ
+```go
+func main() {
+
+ app := NewApp()
+ otherStruct := NewOtherStruct()
+
+ err := wails.Run(&options.App{
+ Title: "My App",
+ Width: 800,
+ Height: 600,
+ OnStartup: func(ctx context.Context){
+ app.SetContext(ctx)
+ otherStruct.SetContext(ctx)
+ },
+ OnShutdown: app.shutdown,
+ Bind: []interface{}{
+ app,
+ otherStruct
+ },
+ })
+ if err != nil {
+ log.Fatal(err)
+ }
+}
+```
+
+
+
+More information on Binding can be found [here](../howdoesitwork.mdx#method-binding).
+
## ๅบ็จ็จๅบ่ๅ
-Wails ๆฏๆๅๆจ็ๅบ็จ็จๅบๆทปๅ ่ๅใ ่ฟๆฏ้่ฟๅฐ [่ๅ](../reference/menus#่ๅ) ็ปๆไฝไผ ้็ปๅบ็จ็จๅบ้
็ฝฎๆฅๅฎๆ็ใ
-ๅธธ่งๅๆณๆฏไฝฟ็จไธไธช่ฟๅ่ๅ็ๆนๆณ๏ผๆดๅธธ่ง็ๆฏ็จไฝ็ๅฝๅจๆๅ่ฐ็ `App` ็ปๆไฝไธ็ๆนๆณใ
+Wails ๆฏๆๅๆจ็ๅบ็จ็จๅบๆทปๅ ่ๅใ ่ฟๆฏ้่ฟๅฐ [่ๅ](../reference/menus#่ๅ) ็ปๆไฝไผ ้็ปๅบ็จ็จๅบ้
็ฝฎๆฅๅฎๆ็ใ ๅธธ่งๅๆณๆฏไฝฟ็จไธไธช่ฟๅ่ๅ็ๆนๆณ๏ผๆดๅธธ่ง็ๆฏ็จไฝ็ๅฝๅจๆๅ่ฐ็ `App` ็ปๆไฝไธ็ๆนๆณใ
```go {11} title="main.go"
func main() {
- app := NewApp()
+ app := NewApp()
- err := wails.Run(&options.App{
- Title: "My App",
- Width: 800,
- Height: 600,
- OnStartup: app.startup,
- OnShutdown: app.shutdown,
- Menu: app.menu(),
+ err := wails.Run(&options.App{
+ Title: "My App",
+ Width: 800,
+ Height: 600,
+ OnStartup: app.startup,
+ OnShutdown: app.shutdown,
+ Menu: app.menu(),
Bind: []interface{}{
app,
},
- })
- if err != nil {
- log.Fatal(err)
- }
+ })
+ if err != nil {
+ log.Fatal(err)
+ }
}
```
## ่ตๆบ
-Wails v2 ๅค็่ตๆบ็ๆนๅผ็ไผๅคงไนๅคๅจไบๅฎๆฒกๆ๏ผๆจๅฏไธ้่ฆ็ป Wails ็ๆฏไธไธช `embed.FS`๏ผ ๅฆไฝๅๅฐ่ฟไธ็นๅฎๅ
จๅๅณไบๆจใๆจๅฏไปฅๅ vanilla ๆจกๆฟไธๆ ทไฝฟ็จ vanilla html/css/js ๆไปถใๆจๅฏ่ฝๆไธไบๅคๆ็ๆๅปบ็ณป็ป๏ผไฝ่ฟๅนถไธๅฝฑๅใ
+Wails v2 ๅค็่ตๆบ็ๆนๅผ็ไผๅคงไนๅคๅจไบๅฎๆฒกๆ๏ผ ๆจๅฏไธ้่ฆ็ป Wails ็ๆฏไธไธช `embed.FS`๏ผ ๅฆไฝๅๅฐ่ฟไธ็นๅฎๅ
จๅๅณไบๆจใ How you get to that is entirely up to you. ๆจๅฏไปฅๅ vanilla ๆจกๆฟไธๆ ทไฝฟ็จ vanilla html/css/js ๆไปถใ ๆจๅฏ่ฝๆไธไบๅคๆ็ๆๅปบ็ณป็ป๏ผไฝ่ฟๅนถไธๅฝฑๅใ
-ๅฝ่ฟ่ก`wails build`ๆถ๏ผๅฎไผๆฃๆฅ้กน็ฎๆ น็ฎๅฝ็`wails.json`ๆไปถใๆไปถไธญๆ 2 ไธชๅญๆฎตไผ่ขซ่ฏปๅ๏ผ
+ๅฝ่ฟ่ก`wails build`ๆถ๏ผๅฎไผๆฃๆฅ้กน็ฎๆ น็ฎๅฝ็`wails.json`ๆไปถใ ๆไปถไธญๆ 2 ไธชๅญๆฎตไผ่ขซ่ฏปๅ๏ผ
- "frontend:install"
- "frontend:build"
-็ฌฌไธไธช๏ผๅฆๆๆ็ปๅฎ๏ผๅฐๅจ`frontend`็ฎๅฝไธญๆง่กไปฅๅฎ่ฃ
node ๆจกๅใ็ฌฌไบไธช๏ผๅฆๆๆ็ปๅฎ๏ผๅฐๅจ`frontend`็ฎๅฝไธญๆง่กไปฅๆๅปบๅ็ซฏ้กน็ฎใ
+็ฌฌไธไธช๏ผๅฆๆๆ็ปๅฎ๏ผๅฐๅจ`frontend`็ฎๅฝไธญๆง่กไปฅๅฎ่ฃ
node ๆจกๅใ ็ฌฌไบไธช๏ผๅฆๆๆ็ปๅฎ๏ผๅฐๅจ`frontend`็ฎๅฝไธญๆง่กไปฅๆๅปบๅ็ซฏ้กน็ฎใ
-ๅฆๆๆฒกๆ็ปๅบ่ฟไธคไธชๅญๆฎต๏ผ้ฃไน Wails ไธไผๅฏนๅ็ซฏๅไปปไฝๆไฝใๅฎไป
ไป
่ขซ็จไฝ`embed.FS`ใ
+ๅฆๆๆฒกๆ็ปๅบ่ฟไธคไธชๅญๆฎต๏ผ้ฃไน Wails ไธไผๅฏนๅ็ซฏๅไปปไฝๆไฝใ ๅฎไป
ไป
่ขซ็จไฝ`embed.FS`ใ
+
+### AssetsHandler
+
+A Wails v2 app can optionally define a `http.Handler` in the `options.App`, which allows hooking into the AssetServer to create files on the fly or process POST/PUT requests. GET requests are always first handled by the `assets` FS. If the FS doesn't find the requested file the request will be forwarded to the `http.Handler` for serving. Any requests other than GET will be directly processed by the `AssetsHandler` if specified. It's also possible to only use the `AssetsHandler` by specifiy `nil` as the `Assets` option.
## ๅ
็ฝฎๅผๅๆๅกๅจ
-่ฟ่ก`wails dev`ๅฐๅฏๅจๅ
็ฝฎ็ๅผๅๆๅกๅจ๏ผๅฎๅฐๅจๆจ็้กน็ฎ็ฎๅฝไธญๅฏๅจไธไธชๆไปถ็ๅฌๅจใ
-้ป่ฎคๆ
ๅตไธ๏ผๅฆๆๆไปปไฝๆไปถๆดๆน๏ผwails ไผๆฃๆฅๅฎๆฏๅฆๆฏๅบ็จ็จๅบๆไปถ๏ผ้ป่ฎค๏ผ.go๏ผๅฏไฝฟ็จ`-e`ๆ ๅฟ้
็ฝฎ๏ผใๅฆๆๆฏ๏ผ้ฃไนๅฎๅฐ้ๆฐๆๅปบๆจ็ๅบ็จ็จๅบๅนถ้ๆฐๅฏๅจๅฎใๅฆๆๆดๆน็ๆไปถๅจ`assetdir`็ฎๅฝไธญ๏ผๅฎไผๅจๅพ็ญ็ๆถ้ดๅ้ๆฐๅ ่ฝฝใ
+่ฟ่ก`wails dev`ๅฐๅฏๅจๅ
็ฝฎ็ๅผๅๆๅกๅจ๏ผๅฎๅฐๅจๆจ็้กน็ฎ็ฎๅฝไธญๅฏๅจไธไธชๆไปถ็ๅฌๅจใ ้ป่ฎคๆ
ๅตไธ๏ผๅฆๆๆไปปไฝๆไปถๆดๆน๏ผwails ไผๆฃๆฅๅฎๆฏๅฆๆฏๅบ็จ็จๅบๆไปถ๏ผ้ป่ฎค๏ผ.go๏ผๅฏไฝฟ็จ`-e`ๆ ๅฟ้
็ฝฎ๏ผใ ๅฆๆๆฏ๏ผ้ฃไนๅฎๅฐ้ๆฐๆๅปบๆจ็ๅบ็จ็จๅบๅนถ้ๆฐๅฏๅจๅฎใ ๅฆๆๆดๆน็ๆไปถๅจ`assetdir`็ฎๅฝไธญ๏ผๅฎไผๅจๅพ็ญ็ๆถ้ดๅ้ๆฐๅ ่ฝฝใ
-ๅผๅๆๅกๅจไฝฟ็จไธ็ง็งฐไธบโ้ฒๆโ็ๆๆฏ๏ผ่ฟๆๅณ็ๅฎไธไผ็ซๅณ้ๆฐๅ ่ฝฝ๏ผๅ ไธบๅฏ่ฝไผๅจ็ญๆถ้ดๅ
ๆดๆนๅคไธชๆไปถใๅฝ่งฆๅๅ็ๆถ๏ผๅฎไผๅจๅๅบ้ๆฐๅ ่ฝฝไนๅ็ญๅพ
ไธๅฎ็ๆถ้ดใ
-ๅฆๆๅ็ๅฆไธไธช่งฆๅ๏ผๅฎไผๅๆฌก้็ฝฎไธบ็ญๅพ
ๆถ้ดใ้ป่ฎคๆ
ๅตไธ๏ผๆญคๅผไธบ 100msใๅฆๆๆญคๅผไธ้็จไบๆจ็้กน็ฎ๏ผๅๅฏไปฅไฝฟ็จ`-debounce`ๆ ๅฟ่ฟ่ก้
็ฝฎใๅฆๆไฝฟ็จ๏ผๆญคๅผๅฐไฟๅญๅฐๆจ็้กน็ฎ้
็ฝฎไธญๅนถๆไธบ้ป่ฎคๅผใ
+ๅผๅๆๅกๅจไฝฟ็จไธ็ง็งฐไธบโ้ฒๆโ็ๆๆฏ๏ผ่ฟๆๅณ็ๅฎไธไผ็ซๅณ้ๆฐๅ ่ฝฝ๏ผๅ ไธบๅฏ่ฝไผๅจ็ญๆถ้ดๅ
ๆดๆนๅคไธชๆไปถใ ๅฝ่งฆๅๅ็ๆถ๏ผๅฎไผๅจๅๅบ้ๆฐๅ ่ฝฝไนๅ็ญๅพ
ไธๅฎ็ๆถ้ดใ ๅฆๆๅ็ๅฆไธไธช่งฆๅ๏ผๅฎไผๅๆฌก้็ฝฎไธบ็ญๅพ
ๆถ้ดใ ้ป่ฎคๆ
ๅตไธ๏ผๆญคๅผไธบ 100msใ ๅฆๆๆญคๅผไธ้็จไบๆจ็้กน็ฎ๏ผๅๅฏไปฅไฝฟ็จ`-debounce`ๆ ๅฟ่ฟ่ก้
็ฝฎใ ๅฆๆไฝฟ็จ๏ผๆญคๅผๅฐไฟๅญๅฐๆจ็้กน็ฎ้
็ฝฎไธญๅนถๆไธบ้ป่ฎคๅผใ
## ๅค้จๅผๅๆๅกๅจ
-ไธไบๆกๆถๅธฆๆ่ชๅทฑ็ๅฎๆถ้ๆฐๅ ่ฝฝๆๅกๅจ๏ผไฝๆฏๅฎไปฌๅฐๆ ๆณๅฉ็จ Wails Go ็ปๅฎใๅจ่ฟ็งๆ
ๅตไธ๏ผๆๅฅฝ่ฟ่กไธไธช็ๅฌ่ๆฌ๏ผๅฐ้กน็ฎ้ๆฐๆๅปบๅฐๆๅปบ็ฎๅฝไธญ๏ผWails ๅฐ็่ง่ฏฅ็ฎๅฝใ
-ๆๅ
ณ็คบไพ๏ผ่ฏทๅ้
ไฝฟ็จ[rollup](https://rollupjs.org/guide/en/)็้ป่ฎค svelte ๆจกๆฟใๅฏนไบ[create-react-app](https://create-react-app.dev/)๏ผๅฏไปฅไฝฟ็จ[ๆญค่ๆฌ](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd)ๆฅๅฎ็ฐ็ฑปไผผ็็ปๆใ
+ไธไบๆกๆถๅธฆๆ่ชๅทฑ็ๅฎๆถ้ๆฐๅ ่ฝฝๆๅกๅจ๏ผไฝๆฏๅฎไปฌๅฐๆ ๆณๅฉ็จ Wails Go ็ปๅฎใ ๅจ่ฟ็งๆ
ๅตไธ๏ผๆๅฅฝ่ฟ่กไธไธช็ๅฌ่ๆฌ๏ผๅฐ้กน็ฎ้ๆฐๆๅปบๅฐๆๅปบ็ฎๅฝไธญ๏ผWails ๅฐ็่ง่ฏฅ็ฎๅฝใ ๆๅ
ณ็คบไพ๏ผ่ฏทๅ้
ไฝฟ็จ[rollup](https://rollupjs.org/guide/en/)็้ป่ฎค svelte ๆจกๆฟใ ๅฏนไบ[create-react-app](https://create-react-app.dev/)๏ผๅฏไปฅไฝฟ็จ[ๆญค่ๆฌ](https://gist.github.com/int128/e0cdec598c5b3db728ff35758abdbafd)ๆฅๅฎ็ฐ็ฑปไผผ็็ปๆใ
## Go ๆจกๅ
-้ป่ฎค็ Wails ๆจกๆฟไผ็ๆไธไธชๅ
ๅซๆจกๅๅ็งฐโchangemeโ็`go.mod`ๆไปถใๆจๅบ่ฏฅๅจ้กน็ฎ็ๆๅๅฐๅ
ถๆดๆนไธบๆดๅ้็ๅ
ๅฎนใ
+้ป่ฎค็ Wails ๆจกๆฟไผ็ๆไธไธชๅ
ๅซๆจกๅๅ็งฐโchangemeโ็`go.mod`ๆไปถใ ๆจๅบ่ฏฅๅจ้กน็ฎ็ๆๅๅฐๅ
ถๆดๆนไธบๆดๅ้็ๅ
ๅฎนใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx
index 02bd0217a..9927629ce 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/bleeding-edge.mdx
@@ -1,8 +1,9 @@
+
# ๅๆฒฟ้ฃ้ฉๆๆฏ
## ๆฆ่ฟฐ
-Wails ไธ็ดๅจๅผๅไธญ๏ผๆฐ็ๆฌไผๅฎๆโๆ ่ฎฐโใ่ฟ้ๅธธๅ็ๅจ`master`ๅๆฏไธๆๆ่พๆฐ็ไปฃ็ ้ฝ็ป่ฟๆต่ฏๅนถ็กฎ่ฎคๆๆๆถใๅฆๆๆจ้่ฆๅฐๆชๅๅธ็้่ฏฏไฟฎๅคๆๅ่ฝ๏ผๅฏไปฅ้่ฟไปฅไธๆญฅ้ชคไฝฟ็จๆๆฐ็โๅๆฒฟ้ฃ้ฉโ็ๆฌ๏ผ
+Wails ไธ็ดๅจๅผๅไธญ๏ผๆฐ็ๆฌไผๅฎๆโๆ ่ฎฐโใ ่ฟ้ๅธธๅ็ๅจ`master`ๅๆฏไธๆๆ่พๆฐ็ไปฃ็ ้ฝ็ป่ฟๆต่ฏๅนถ็กฎ่ฎคๆๆๆถใ ๅฆๆๆจ้่ฆๅฐๆชๅๅธ็้่ฏฏไฟฎๅคๆๅ่ฝ๏ผๅฏไปฅ้่ฟไปฅไธๆญฅ้ชคไฝฟ็จๆๆฐ็โๅๆฒฟ้ฃ้ฉโ็ๆฌ๏ผ
- `git clone https://github.com/wailsapp/wails`
- `cd wails/v2/cmd/wails`
@@ -10,17 +11,15 @@ Wails ไธ็ดๅจๅผๅไธญ๏ผๆฐ็ๆฌไผๅฎๆโๆ ่ฎฐโใ่ฟ้ๅธธๅ็ๅจ`m
ๆณจๆ๏ผๆจๅฐ้กน็ฎๅ
้ๅฐ็็ฎๅฝ็ฐๅจๅฐ่ขซ็งฐไธบโclonedirโใ
-Wails CLI ็ฐๅจๅฐๆฏๆๆฐ็ๆฌใ่ฆๆดๆฐ้กน็ฎไปฅไฝฟ็จๆๆฐ็ๆฌ๏ผ่ฏทๆดๆฐ้กน็ฎๅนถ็กฎไฟไปฅไธ่กไฝไบ`go.mod`ๆไปถๅบ้จ๏ผ
+Wails CLI ็ฐๅจๅฐๆฏๆๆฐ็ๆฌใ ่ฆๆดๆฐ้กน็ฎไปฅไฝฟ็จๆๆฐ็ๆฌ๏ผ่ฏทๆดๆฐ้กน็ฎๅนถ็กฎไฟไปฅไธ่กไฝไบ`go.mod`ๆไปถๅบ้จ๏ผ
`replace github.com/wailsapp/wails/v2 => `
็คบไพ๏ผ
-ๅจ Windows ไธ๏ผ
-`replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2`
+ๅจ Windows ไธ๏ผ `replace github.com/wailsapp/wails/v2 => C:\Users\leaan\Documents\wails-v2-beta\wails\v2`
-ๅจ'nix ไธ๏ผ
-`replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2`
+ๅจ'nix ไธ๏ผ `replace github.com/wailsapp/wails/v2 => /home/me/projects/wails/v2`
่ฆๆขๅคๅฐ็จณๅฎ็ๆฌ๏ผ่ฏท่ฟ่ก๏ผ
@@ -31,6 +30,19 @@ Wails CLI ็ฐๅจๅฐๆฏๆๆฐ็ๆฌใ่ฆๆดๆฐ้กน็ฎไปฅไฝฟ็จๆๆฐ็ๆฌ๏ผ่ฏท
ๅฆๆ่ฆๆต่ฏไธไธชๅๆฏ๏ผ่ฏทๆ็
งไธ้ข็่ฏดๆ่ฟ่กๆไฝ๏ผไฝ่ฏท็กฎไฟๅจๅฎ่ฃ
ไนๅๅๆข่ฆๆต่ฏ็ๅๆฏ๏ผ
- `git clone https://github.com/wailsapp/wails`
+- `cd wails`
- `git checkout -b branch-to-test --track origin/branch-to-test`
-- `cd wails/v2/cmd/wails`
+- `cd v2/cmd/wails`
+- `go install`
+
+## Testing a PR
+
+If you want to test a PR, follow the instructions above, but ensure you fetch the PR and switch the branch before installing. Please replace `[IDofThePR]` with the ID of the PR shown on github.com:
+
+- `git clone https://github.com/wailsapp/wails`
+- `cd wails`
+- `git fetch -u origin pull/[IDofThePR]/head:test/pr-[IDofThePR]`
+- `git checkout test/pr-[IDofThePR]`
+- `git reset --hard HEAD`
+- `cd v2/cmd/wails`
- `go install`
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx
index 198050841..41b62384b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/dynamic-assets.mdx
@@ -1,9 +1,6 @@
# ๅจๆ่ตๆบ
-If you want to load or generate assets for your frontend dynamically, you can achieve that using the
-[AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will
-be called for any non GET request on the assets server and for GET requests which can not be served from the
-bundled assets because the file is not found.
+If you want to load or generate assets for your frontend dynamically, you can achieve that using the [AssetsHandler](../reference/options#assetshandler) option. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found. The AssetsHandler is a generic `http.Handler` which will be called for any non GET request on the assets server and for GET requests which can not be served from the bundled assets because the file is not found.
By installing a custom AssetsHandler, you can serve your own assets using a custom asset server.
@@ -15,60 +12,60 @@ In our example project, we will create a simple assets handler which will load f
package main
import (
- "embed"
- "fmt"
- "github.com/wailsapp/wails/v2"
- "github.com/wailsapp/wails/v2/pkg/options"
- "net/http"
- "os"
- "strings"
+ "embed"
+ "fmt"
+ "github.com/wailsapp/wails/v2"
+ "github.com/wailsapp/wails/v2/pkg/options"
+ "net/http"
+ "os"
+ "strings"
)
//go:embed frontend/dist
var assets embed.FS
type FileLoader struct {
- http.Handler
+ http.Handler
}
func NewFileLoader() *FileLoader {
- return &FileLoader{}
+ return &FileLoader{}
}
func (h *FileLoader) ServeHTTP(res http.ResponseWriter, req *http.Request) {
- var err error
- requestedFilename := strings.TrimPrefix(req.URL.Path, "/")
- println("Requesting file:", requestedFilename)
- fileData, err := os.ReadFile(requestedFilename)
- if err != nil {
- res.WriteHeader(http.StatusBadRequest)
- res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename)))
- }
+ var err error
+ requestedFilename := strings.TrimPrefix(req.URL.Path, "/")
+ println("Requesting file:", requestedFilename)
+ fileData, err := os.ReadFile(requestedFilename)
+ if err != nil {
+ res.WriteHeader(http.StatusBadRequest)
+ res.Write([]byte(fmt.Sprintf("Could not load file %s", requestedFilename)))
+ }
- res.Write(fileData)
+ res.Write(fileData)
}
func main() {
- // Create an instance of the app structure
- app := NewApp()
+ // Create an instance of the app structure
+ app := NewApp()
- // Create application with options
- err := wails.Run(&options.App{
- Title: "helloworld",
- Width: 1024,
- Height: 768,
- Assets: assets,
- BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255},
- OnStartup: app.startup,
- AssetsHandler: NewFileLoader(),
- Bind: []interface{}{
- app,
- },
- })
+ // Create application with options
+ err := wails.Run(&options.App{
+ Title: "helloworld",
+ Width: 1024,
+ Height: 768,
+ Assets: assets,
+ BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 255},
+ OnStartup: app.startup,
+ AssetsHandler: NewFileLoader(),
+ Bind: []interface{}{
+ app,
+ },
+ })
- if err != nil {
- println("Error:", err)
- }
+ if err != nil {
+ println("Error:", err)
+ }
}
```
@@ -79,17 +76,14 @@ DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico'
DEB | [ExternalAssetHandler] Loading 'http://localhost:3001/favicon.ico' failed, using AssetHandler
Requesting file: favicon.ico
```
-As you can see, the assets handler is called when the default assets server is unable to serve
-the `favicon.ico` file.
+As you can see, the assets handler is called when the default assets server is unable to serve the `favicon.ico` file.
-If you right click the main application and select "inspect" to bring up the devtools, you can test
-this feature out by typing the following into the console:
+If you right click the main application and select "inspect" to bring up the devtools, you can test this feature out by typing the following into the console:
```
let response = await fetch('does-not-exist.txt');
```
-This will generate an error in the devtools. We can see that the error is what we expect, returned by
-our custom assets handler:
+This will generate an error in the devtools. This will generate an error in the devtools. We can see that the error is what we expect, returned by our custom assets handler:
@@ -101,8 +95,7 @@ However, if we request `go.mod`, we will see the following output:
-This technique can be used to load images directly into the page. If we updated our default vanilla template and
-replaced the logo image:
+This technique can be used to load images directly into the page. This technique can be used to load images directly into the page. If we updated our default vanilla template and replaced the logo image:
```html
```
@@ -119,5 +112,7 @@ Then we would see the following:
:::warning
Exposing your filesystem in this way is a security risk. It is recommended that you properly manage access
to your filesystem.
+::: It is recommended that you properly manage access
+to your filesystem.
:::
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frameless.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frameless.mdx
index 5ba928107..c82d44d61 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frameless.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frameless.mdx
@@ -1,11 +1,11 @@
+
# ๆ ่พนๆกๅบ็จ
-Wails ๆฏๆๆ ่พนๆกๅบ็จ็จๅบใ่ฟๅฏไปฅ้่ฟไฝฟ็จ[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)ไธญ็[ๆ ่พนๆก](../reference/options#ๆ ่พนๆก)ๅญๆฎตๆฅๅฎ็ฐใ
+Wails ๆฏๆๆ ่พนๆกๅบ็จ็จๅบใ ่ฟๅฏไปฅ้่ฟไฝฟ็จ[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)ไธญ็[ๆ ่พนๆก](../reference/options#ๆ ่พนๆก)ๅญๆฎตๆฅๅฎ็ฐใ
-Wails ไธบๆๅจ็ชๅฃๆไพไบไธไธช็ฎๅ็่งฃๅณๆนๆก๏ผไปปไฝๅ
ทๆโdata-wails-dragโๅฑๆง็ HTML ๅ
็ด ้ฝๅฐๅ
ๅฝโๆๅจๆๆโใ
-ๆญคๅฑๆง้็จไบๆๆๅตๅฅๅ
็ด ใๅฆๆๆจ้่ฆๆๅฎไธๅบ่ฏฅๆๅจ็ๅตๅฅๅ
็ด ๏ผ่ฏทๅจ่ฏฅๅ
็ด ไธไฝฟ็จๅฑๆงโdata-wails-no-dragโใ
+Wails ไธบๆๅจ็ชๅฃๆไพไบไธไธช็ฎๅ็่งฃๅณๆนๆก๏ผไปปไฝๅ
ทๆโdata-wails-dragโๅฑๆง็ HTML ๅ
็ด ้ฝๅฐๅ
ๅฝโๆๅจๆๆโใ ๆญคๅฑๆง้็จไบๆๆๅตๅฅๅ
็ด ใ ๅฆๆๆจ้่ฆๆๅฎไธๅบ่ฏฅๆๅจ็ๅตๅฅๅ
็ด ๏ผ่ฏทๅจ่ฏฅๅ
็ด ไธไฝฟ็จๅฑๆงโdata-wails-no-dragโใ
-้ป่ฎค็ vanilla ๆจกๆฟไฝฟ็จๅฎ๏ผๅณไฝฟๅฎไธๆฏๆ ่พนๆก็ใๆดไธช body ๅ
็ด ่ขซๆ ่ฎฐไธบๅฏๆๅจใ``ๅ
็ด ่ขซๆ ่ฎฐไธบไธๅฏๆๅจใ
+้ป่ฎค็ vanilla ๆจกๆฟไฝฟ็จๅฎ๏ผๅณไฝฟๅฎไธๆฏๆ ่พนๆก็ใ ๆดไธช body ๅ
็ด ่ขซๆ ่ฎฐไธบๅฏๆๅจใ `
`ๅ
็ด ่ขซๆ ่ฎฐไธบไธๅฏๆๅจใ
```html
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frontend.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frontend.mdx
index 1cb7ba724..c6f7ae8c0 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frontend.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/frontend.mdx
@@ -1,3 +1,4 @@
+
# ๅ็ซฏ
## ่ๆฌๆณจๅ
ฅ
@@ -33,16 +34,16 @@
ไธบไบ็ปๅผๅไบบๅๆไพๆดๅคง็็ตๆดปๆง๏ผๆไธไธช`meta`ๆ ็ญพๅฏ็จไบ่ชๅฎไนๆญค่กไธบ๏ผ
```html
-
+
```
้้กนๅฆไธ๏ผ
-| ๅผ | ๆ่ฟฐ |
-| ------------------- | -------------------------------- |
+| ๅผ | ๆ่ฟฐ |
+| ------------------- | -------------------------- |
| noautoinjectruntime | ็ฆ็จ่ชๅจๆณจๅ
ฅ `/wails/runtime.js` |
| noautoinjectipc | ็ฆ็จ่ชๅจๆณจๅ
ฅ `/wails/ipc.js` |
-| noautoinject | ็ฆ็จๆๆ่ๆฌ่ชๅจๆณจๅ
ฅ |
+| noautoinject | ็ฆ็จๆๆ่ๆฌ่ชๅจๆณจๅ
ฅ |
ๅฏไปฅไฝฟ็จๅคไธช้้กน๏ผๅๆๆฏๅฎไปฌไปฅ้ๅทๅ้ใ
@@ -69,4 +70,4 @@
-```
+```
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx
index d9e0d71d2..0da6952e9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/ides.mdx
@@ -1,18 +1,19 @@
+
# ้ๆๅผๅ็ฏๅข
-Wails ๆจๅจๆไพๅบ่ฒ็ๅผๅไฝ้ชใไธบๆญค๏ผๆไปฌ็ฐๅจๆฏๆ็ๆ IDE ็นๅฎ้
็ฝฎไปฅๆไพๆด้กบ็
็้กน็ฎ่ฎพ็ฝฎใ
+Wails ๆจๅจๆไพๅบ่ฒ็ๅผๅไฝ้ชใ ไธบๆญค๏ผๆไปฌ็ฐๅจๆฏๆ็ๆ IDE ็นๅฎ้
็ฝฎไปฅๆไพๆด้กบ็
็้กน็ฎ่ฎพ็ฝฎใ
็ฎๅ๏ผๆไปฌๆฏๆ[Visual Studio Code](https://code.visualstudio.com/)๏ผไฝๆไปฌๅธๆๅฐฝๅฟซๆฏๆๅ
ถไป IDE๏ผไพๅฆ Golandใ
## Visual Studio Code
-
+
-ไฝฟ็จ`-ide vscode`ๆ ๅฟ็ๆ้กน็ฎๆถ๏ผIDE ๆไปถๅฐไธๅ
ถไป้กน็ฎๆไปถไธ่ตทๅๅปบใ่ฟไบๆไปถๆพ็ฝฎๅจ`.vscode`็ฎๅฝไธญ๏ผๅนถไธบ่ฐ่ฏๅบ็จ็จๅบๆไพๆญฃ็กฎ็้
็ฝฎใ
+ไฝฟ็จ`-ide vscode`ๆ ๅฟ็ๆ้กน็ฎๆถ๏ผIDE ๆไปถๅฐไธๅ
ถไป้กน็ฎๆไปถไธ่ตทๅๅปบใ ่ฟไบๆไปถๆพ็ฝฎๅจ`.vscode`็ฎๅฝไธญ๏ผๅนถไธบ่ฐ่ฏๅบ็จ็จๅบๆไพๆญฃ็กฎ็้
็ฝฎใ
-็ๆ็ 2 ไธชๆไปถๆฏ`tasks.json`ๅ`launch.json`. ไปฅไธๆฏไธบ้ป่ฎค vanilla ้กน็ฎ็ๆ็ๆไปถ๏ผ
+็ๆ็ 2 ไธชๆไปถๆฏ`tasks.json`ๅ`launch.json`. ไปฅไธๆฏไธบ้ป่ฎค vanilla ้กน็ฎ็ๆ็ๆไปถ๏ผ Below are the files generated for the default vanilla project:
```json title="tasks.json"
{
@@ -52,7 +53,7 @@ Wails ๆจๅจๆไพๅบ่ฒ็ๅผๅไฝ้ชใไธบๆญค๏ผๆไปฌ็ฐๅจๆฏๆ็ๆ IDE
### ้
็ฝฎๅฎ่ฃ
ๅๆๅปบๆญฅ้ชค
-`tasks.json`ๆไปถๅฏนไบ้ป่ฎค้กน็ฎๅพ็ฎๅ๏ผๅ ไธบไธ้่ฆ`npm install`ๆ`npm run build`็ๆญฅ้ชคใๅฏนไบๅ
ทๆๅ็ซฏๆๅปบๆญฅ้ชค็้กน็ฎ๏ผไพๅฆ svelte ๆจกๆฟ๏ผๆไปฌ้่ฆ็ผ่พ`tasks.json`ไปฅๆทปๅ ๅฎ่ฃ
ๅๆๅปบๆญฅ้ชค๏ผ
+`tasks.json`ๆไปถๅฏนไบ้ป่ฎค้กน็ฎๅพ็ฎๅ๏ผๅ ไธบไธ้่ฆ`npm install`ๆ`npm run build`็ๆญฅ้ชคใ ๅฏนไบๅ
ทๆๅ็ซฏๆๅปบๆญฅ้ชค็้กน็ฎ๏ผไพๅฆ svelte ๆจกๆฟ๏ผๆไปฌ้่ฆ็ผ่พ`tasks.json`ไปฅๆทปๅ ๅฎ่ฃ
ๅๆๅปบๆญฅ้ชค๏ผ
```json title="tasks.json"
{
@@ -104,4 +105,4 @@ Wails ๆจๅจๆไพๅบ่ฒ็ๅผๅไฝ้ชใไธบๆญค๏ผๆไปฌ็ฐๅจๆฏๆ็ๆ IDE
ๅจๆชๆฅ๏ผๆไปฌๅธๆ็ๆไธไธช่ชๅจๅ
ๅซๅฎ่ฃ
ๅๆๅปบๆญฅ้ชค็`tasks.json`ใ
-:::
+:::
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx
index ca0b09ee9..8c8d484ca 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/linux-distro-support.mdx
@@ -1,72 +1,74 @@
+
# Linux ๅ่ก็ๆฏๆ
## ๆฆ่ฟฐ
-Wails ๆไพ Linux ๆฏๆ๏ผไฝไธบๆๆๅฏ็จๅ่ก็ๆไพๅฎ่ฃ
่ฏดๆๆฏไธ้กนไธๅฏ่ฝๅฎๆ็ไปปๅกใ็ธๅ๏ผWails ไผๅฐ่ฏ็กฎๅฎๆจๅผๅๅบ็จ็จๅบๆ้็ๅ
ๆฏๅฆๅฏไปฅ้่ฟ็ณป็ป็ๅ
็ฎก็ๅจ่ทๅพใ็ฎๅ๏ผๆไปฌๆฏๆไปฅไธๅ
็ฎก็ๅจ๏ผ
+Wails ๆไพ Linux ๆฏๆ๏ผไฝไธบๆๆๅฏ็จๅ่ก็ๆไพๅฎ่ฃ
่ฏดๆๆฏไธ้กนไธๅฏ่ฝๅฎๆ็ไปปๅกใ ็ธๅ๏ผWails ไผๅฐ่ฏ็กฎๅฎๆจๅผๅๅบ็จ็จๅบๆ้็ๅ
ๆฏๅฆๅฏไปฅ้่ฟ็ณป็ป็ๅ
็ฎก็ๅจ่ทๅพใ ็ฎๅ๏ผๆไปฌๆฏๆไปฅไธๅ
็ฎก็ๅจ๏ผ
- apt
- dnf
- emerge
- eopkg
+- nixpkgs
- pacman
- zypper
## ๆทปๅ ๅ
ๅ
-ๅจๆไบๆ
ๅตไธ๏ผๆจ็ๅ่ก็ไฝฟ็จๅๆฏๆ็ๅ
็ฎก็ๅจไนไธ๏ผไฝๅ
ๅ็งฐไธๅใไพๅฆ๏ผๆจๅฏ่ฝไฝฟ็จ Ubuntu ่ก็ไบงๅ๏ผไฝ gtk ็ๅ
ๅ็งฐๅฏ่ฝไธๅใWails ๅฐ่ฏ้่ฟ้ๅๅ
ๅ็งฐๅ่กจๆฅๆพๅฐๆญฃ็กฎ็ๅ
ใๅ
ๅ่กจๅญๅจๅจ`v2/internal/system/packagemanager` ็ฎๅฝไธญ็ๅ
็ฎก็ๅจ็นๅฎๆไปถไธญใๅจๆไปฌ็็คบไพไธญ๏ผๅฐๆฏ`v2/internal/system/packagemanager/apt.go`ใ
+ๅจๆไบๆ
ๅตไธ๏ผๆจ็ๅ่ก็ไฝฟ็จๅๆฏๆ็ๅ
็ฎก็ๅจไนไธ๏ผไฝๅ
ๅ็งฐไธๅใ ไพๅฆ๏ผๆจๅฏ่ฝไฝฟ็จ Ubuntu ่ก็ไบงๅ๏ผไฝ gtk ็ๅ
ๅ็งฐๅฏ่ฝไธๅใ Wails ๅฐ่ฏ้่ฟ้ๅๅ
ๅ็งฐๅ่กจๆฅๆพๅฐๆญฃ็กฎ็ๅ
ใ ๅ
ๅ่กจๅญๅจๅจ`v2/internal/system/packagemanager` ็ฎๅฝไธญ็ๅ
็ฎก็ๅจ็นๅฎๆไปถไธญใ ๅจๆไปฌ็็คบไพไธญ๏ผๅฐๆฏ`v2/internal/system/packagemanager/apt.go`ใ
ๅจๆญคๆไปถไธญ๏ผๅ
ๅ่กจ็ฑไปฅไธ`Packages()`ๆนๆณๅฎไน๏ผ
```go
func (a *Apt) Packages() packagemap {
- return packagemap{
- "libgtk-3": []*Package{
- {Name: "libgtk-3-dev", SystemPackage: true, Library: true},
- },
- "libwebkit": []*Package{
- {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true},
- },
- "gcc": []*Package{
- {Name: "build-essential", SystemPackage: true},
- },
- "pkg-config": []*Package{
- {Name: "pkg-config", SystemPackage: true},
- },
- "npm": []*Package{
- {Name: "npm", SystemPackage: true},
- },
- "docker": []*Package{
- {Name: "docker.io", SystemPackage: true, Optional: true},
- },
- }
+ return packagemap{
+ "libgtk-3": []*Package{
+ {Name: "libgtk-3-dev", SystemPackage: true, Library: true},
+ },
+ "libwebkit": []*Package{
+ {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true},
+ },
+ "gcc": []*Package{
+ {Name: "build-essential", SystemPackage: true},
+ },
+ "pkg-config": []*Package{
+ {Name: "pkg-config", SystemPackage: true},
+ },
+ "npm": []*Package{
+ {Name: "npm", SystemPackage: true},
+ },
+ "docker": []*Package{
+ {Name: "docker.io", SystemPackage: true, Optional: true},
+ },
+ }
}
```
-ๅ่ฎพๅจๆไปฌ็ linux ๅ่ก็ไธญ๏ผlibgtk-3 ไปฅ lib-gtk3-dev ็ๅ็งฐๆๅ
ใๆไปฌๅฏไปฅ้่ฟๆทปๅ ไปฅไธ่กๆฅๆทปๅ ๅฏนๆญค็ๆฏๆ๏ผ
+ๅ่ฎพๅจๆไปฌ็ linux ๅ่ก็ไธญ๏ผlibgtk-3 ไปฅ lib-gtk3-dev ็ๅ็งฐๆๅ
ใ ๆไปฌๅฏไปฅ้่ฟๆทปๅ ไปฅไธ่กๆฅๆทปๅ ๅฏนๆญค็ๆฏๆ๏ผ
```go {5}
func (a *Apt) Packages() packagemap {
- return packagemap{
- "libgtk-3": []*Package{
- {Name: "libgtk-3-dev", SystemPackage: true, Library: true},
- {Name: "lib-gtk3-dev", SystemPackage: true, Library: true},
- },
- "libwebkit": []*Package{
- {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true},
- },
- "gcc": []*Package{
- {Name: "build-essential", SystemPackage: true},
- },
- "pkg-config": []*Package{
- {Name: "pkg-config", SystemPackage: true},
- },
- "npm": []*Package{
- {Name: "npm", SystemPackage: true},
- },
- "docker": []*Package{
- {Name: "docker.io", SystemPackage: true, Optional: true},
- },
- }
+ return packagemap{
+ "libgtk-3": []*Package{
+ {Name: "libgtk-3-dev", SystemPackage: true, Library: true},
+ {Name: "lib-gtk3-dev", SystemPackage: true, Library: true},
+ },
+ "libwebkit": []*Package{
+ {Name: "libwebkit2gtk-4.0-dev", SystemPackage: true, Library: true},
+ },
+ "gcc": []*Package{
+ {Name: "build-essential", SystemPackage: true},
+ },
+ "pkg-config": []*Package{
+ {Name: "pkg-config", SystemPackage: true},
+ },
+ "npm": []*Package{
+ {Name: "npm", SystemPackage: true},
+ },
+ "docker": []*Package{
+ {Name: "docker.io", SystemPackage: true, Optional: true},
+ },
+ }
}
```
@@ -79,14 +81,13 @@ func (a *Apt) Packages() packagemap {
```go
type PackageManager interface {
- Name() string
- Packages() packagemap
- PackageInstalled(*Package) (bool, error)
- PackageAvailable(*Package) (bool, error)
- InstallCommand(*Package) string
+ Name() string
+ Packages() packagemap
+ PackageInstalled(*Package) (bool, error)
+ PackageAvailable(*Package) (bool, error)
+ InstallCommand(*Package) string
}
```
-
- `Name()` ๅบ่ฏฅ่ฟๅๅ
็ฎก็ๅจ็ๅ็งฐ
- `Packages()` ๅบ่ฏฅ่ฟๅไธไธช`packagemap`๏ผๅฎไธบไพ่ต้กนๆไพๅ้ๆไปถๅ
- `PackageInstalled()` ๅฆๆๅฎ่ฃ
ไบๆๅฎ็ๅ
๏ผๅบ่ฏฅ่ฟๅ`true`
@@ -97,4 +98,4 @@ type PackageManager interface {
:::info ่ฎฐไฝ
ๅฆๆๆจๆทปๅ ไบๅฏนๆฐๅ
็ฎก็ๅจ็ๆฏๆ๏ผ่ฏทไธ่ฆๅฟ่ฎฐๆดๆฐๆญค้กต้ข๏ผ
-:::
+:::
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx
index 6369ab89e..17e72ed21 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/manual-builds.mdx
@@ -1,6 +1,7 @@
+
# ๆๅจๆๅปบ
-Wails CLI ไธบ้กน็ฎๅไบๅพๅค็น้็ๅทฅไฝ๏ผไฝๆๆถ้่ฆๆๅจๆๅปบ้กน็ฎใๆฌๆๆกฃๅฐ่ฎจ่ฎบ CLI ๆง่ก็ไธๅๆไฝไปฅๅๅฆไฝไปฅไธๅๆนๅผๅฎ็ฐ่ฟไธ็นใ
+Wails CLI ไธบ้กน็ฎๅไบๅพๅค็น้็ๅทฅไฝ๏ผไฝๆๆถ้่ฆๆๅจๆๅปบ้กน็ฎใ ๆฌๆๆกฃๅฐ่ฎจ่ฎบ CLI ๆง่ก็ไธๅๆไฝไปฅๅๅฆไฝไปฅไธๅๆนๅผๅฎ็ฐ่ฟไธ็นใ
## ๆๅปบ่ฟ็จ
@@ -19,9 +20,9 @@ Wails CLI ไธบ้กน็ฎๅไบๅพๅค็น้็ๅทฅไฝ๏ผไฝๆๆถ้่ฆๆๅจๆๅปบ้กน
- ๅฆๆ็ปๅบไบ`-s`ๆ ๅฟ๏ผๅ่ทณ่ฟๆญคๆญฅ้ชค
- ๆฃๆฅ`wails.json`ไธญๆฏๅฆๆๅฎ่ฃ
ๅฝไปค`frontend:install`
- ๅฆๆๆฒกๆ๏ผๅ่ทณ่ฟๆญคๆญฅ้ชค
-- ๅฆๆๆ๏ผๅๆฃๆฅๅ็ซฏ็ฎๅฝไธญๆฏๅฆๅญๅจ`package.json`ใๅฆๆไธๅญๅจ๏ผๅ่ทณ่ฟ่ฟไธๆญฅ
+- ๅฆๆๆ๏ผๅๆฃๆฅๅ็ซฏ็ฎๅฝไธญๆฏๅฆๅญๅจ`package.json`ใ ๅฆๆไธๅญๅจ๏ผๅ่ทณ่ฟ่ฟไธๆญฅ
- ไป`package.json`ๆไปถๅ
ๅฎน็ๆ MD5
-- ๅฎๆฃๆฅ`package.json.md5`ๆฏๅฆๅญๅจ๏ผๅฆๆๅญๅจ๏ผๅๅฐๅ
ถๅ
ๅฎน๏ผMD5 sum๏ผไธ็ๆ็ๅ
ๅฎน่ฟ่กๆฏ่พ๏ผไปฅๆฅ็ๅ
ๅฎนๆฏๅฆๅทฒๆดๆนใๅฆๆ็ธๅ๏ผๅ่ทณ่ฟๆญคๆญฅ้ชค
+- ๅฎๆฃๆฅ`package.json.md5`ๆฏๅฆๅญๅจ๏ผๅฆๆๅญๅจ๏ผๅๅฐๅ
ถๅ
ๅฎน๏ผMD5 sum๏ผไธ็ๆ็ๅ
ๅฎน่ฟ่กๆฏ่พ๏ผไปฅๆฅ็ๅ
ๅฎนๆฏๅฆๅทฒๆดๆนใ ๅฆๆ็ธๅ๏ผๅ่ทณ่ฟๆญคๆญฅ้ชค
- ๅฆๆ`package.json.md5`ไธๅญๅจ๏ผๅไฝฟ็จ็ๆ็ MD5 sum ๅๅปบๅฎ
- ๅฆๆ็ฐๅจ้่ฆๆๅปบ๏ผๆ่
`node_modules`ไธๅญๅจ๏ผๆ่
็ปๅบไบ`-f`ๆ ๅฟ๏ผๅๅจๅ็ซฏ็ฎๅฝไธญๆง่กๅฎ่ฃ
ๅฝไปค
@@ -53,7 +54,7 @@ Wails CLI ไธบ้กน็ฎๅไบๅพๅค็น้็ๅทฅไฝ๏ผไฝๆๆถ้่ฆๆๅจๆๅปบ้กน
##### Windows
-- ๅฆๆ`build/windows/icon.ico`ไธๅญๅจ๏ผๅฎๅฐไป`build/appicon.png`ๅๅปบ 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/
.manifest`ๆไปถไธๅญๅจ๏ผๅฎไผไป้ป่ฎค็ๆฌๅๅปบๅฎใ
- ๅฐๅบ็จ็จๅบ็ผ่ฏไธบ็ไบง็ๆฌ๏ผๅฆไธๆ่ฟฐ๏ผใ
- ไฝฟ็จ[winres](https://github.com/tc-hib/winres)ๅฐ icon ๅ manifest ๆๅ
ๅฐไธไธช`.syso`ๆไปถใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx
index b59d8f4f0..51ec31212 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/migrating.mdx
@@ -1,8 +1,9 @@
+
# ไป v1 ่ฟ็งป
## ๆฆ่ฟฐ
-Wails v2 ไธ v1 ็ธๆฏๆ้ๅคงๅๅใๆฌๆๆกฃๆจๅจ้็นไป็ป่ฟ็งป็ฐๆ้กน็ฎ็ๆดๆนๅๆญฅ้ชคใ
+Wails v2 ไธ v1 ็ธๆฏๆ้ๅคงๅๅใ ๆฌๆๆกฃๆจๅจ้็นไป็ป่ฟ็งป็ฐๆ้กน็ฎ็ๆดๆนๅๆญฅ้ชคใ
### ๅๅปบๅบ็จ็จๅบ
@@ -26,20 +27,20 @@ Wails v2 ไธ v1 ็ธๆฏๆ้ๅคงๅๅใๆฌๆๆกฃๆจๅจ้็นไป็ป่ฟ็งป็ฐๆ
ๅจ v2 ไธญ๏ผๅชๆไธไธชๆนๆณ`wails.Run()`ๆฅๅ[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)ใ
```go title="v2"
- err := wails.Run(&options.App{
- Title: "MyApp",
- Width: 800,
- Height: 600,
- Assets: assets,
- Bind: []interface{}{
- basic,
- },
- })
+ err := wails.Run(&options.App{
+ Title: "MyApp",
+ Width: 800,
+ Height: 600,
+ Assets: assets,
+ Bind: []interface{}{
+ basic,
+ },
+ })
```
### ็ปๅฎ
-ๅจ v1 ไธญ๏ผๅฏไปฅ็ปๅฎไปปๆๅฝๆฐๅ็ปๆใๅจ v2 ไธญ๏ผ่ฟๅทฒ่ขซ็ฎๅไธบไป
็ปๅฎ็ปๆใไปฅๅไผ ้็ป v1`Bind()`ไธญ็ๆนๆณ็็ปๆๅฎไพ็ฐๅจๅจ[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)`Bind`ๅญๆฎตไธญๆๅฎ๏ผ
+ๅจ v1 ไธญ๏ผๅฏไปฅ็ปๅฎไปปๆๅฝๆฐๅ็ปๆใ ๅจ v2 ไธญ๏ผ่ฟๅทฒ่ขซ็ฎๅไธบไป
็ปๅฎ็ปๆใ ไปฅๅไผ ้็ป v1`Bind()`ไธญ็ๆนๆณ็็ปๆๅฎไพ็ฐๅจๅจ[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)`Bind`ๅญๆฎตไธญๆๅฎ๏ผ
```go title="v1"
app := wails.CreateApp(/* options */)
@@ -47,23 +48,23 @@ Wails v2 ไธ v1 ็ธๆฏๆ้ๅคงๅๅใๆฌๆๆกฃๆจๅจ้็นไป็ป่ฟ็งป็ฐๆ
```
```go title="v2"
- err := wails.Run(&options.App{
- /* other options */
- Bind: []interface{}{
- basic,
- },
- })
+ err := wails.Run(&options.App{
+ /* other options */
+ Bind: []interface{}{
+ basic,
+ },
+ })
```
ๅจ v1 ไธญ๏ผ็ปๅฎๆนๆณๅจ`window.backend`ไธญใ ่ฟๅทฒๆดๆนไธบ`window.go`ใ
### ๅบ็จ็จๅบ็ๅฝๅจๆ
-ๅจ v1 ไธญ๏ผ็ปๅฎ็ปๆไธญๆ 2 ไธช็นๆฎๆนๆณ๏ผ`WailsInit()`ๅ`WailsShutdown()`. ่ฟไบๅทฒ่ขซๆฟๆขไธบ 3 ไธช็ๅฝๅจๆๅ่ฐ๏ผไฝไธบ[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)็ไธ้จๅ๏ผ
+In v1, there were 2 special methods in a bound struct: `WailsInit()` and `WailsShutdown()`. These have been replaced with 3 lifecycle hooks as part of the [application options](../reference/options.mdx#application-options):
-- [ๅบ็จๅฏๅจๅ่ฐ](../reference/options#ๅบ็จๅฏๅจๅ่ฐ)
-- [ๅบ็จ้ๅบๅ่ฐ](../reference/options#ๅบ็จ้ๅบๅ่ฐ)
-- [ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](../reference/options#ๅ็ซฏ-dom-ๅ ่ฝฝๅฎๆๅ่ฐ)
+- [ๅบ็จๅฏๅจๅ่ฐ](../reference/options.mdx#onstartup)
+- [ๅบ็จ้ๅบๅ่ฐ](../reference/options.mdx#onshutdown)
+- [ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](../reference/options.mdx#ondomready)
ๆณจๆ๏ผ[ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](../reference/options#ๅ็ซฏ-dom-ๅ ่ฝฝๅฎๆๅ่ฐ)ๆฟๆขไบ v1 ไธญ็ `wails:ready` ็ณป็ปไบไปถใ
@@ -71,12 +72,19 @@ Wails v2 ไธ v1 ็ธๆฏๆ้ๅคงๅๅใๆฌๆๆกฃๆจๅจ้็นไป็ป่ฟ็งป็ฐๆ
```go title="v2"
basic := NewBasicApp()
- err := wails.Run(&options.App{
- /* Other Options */
- OnStartup: basic.startup,
- OnShutdown: basic.shutdown,
- OnDomReady: basic.domready,
- })
+ err := wails.Run(&options.App{
+ /* Other Options */
+ OnStartup: basic.startup,
+ OnShutdown: basic.shutdown,
+ OnDomReady: basic.domready,
+ })
+...
+type Basic struct {
+ ctx context.Context
+}
+func (b *Basic) startup(ctx context.Context) {
+ b.ctx = ctx
+}
...
type Basic struct {
ctx context.Context
@@ -89,23 +97,24 @@ func (b *Basic) startup(ctx context.Context) {
### ่ฟ่กๆถ
-v2 ไธญ็่ฟ่กๆถๆฏ v1 ไธฐๅฏๅพๅค๏ผๆฏๆ่ๅใ็ชๅฃๆไฝๅๆดๅฅฝ็ๅฏน่ฏๆกใๆนๆณ็็ญพๅ็ฅๆๅๅ - ่ฏทๅ้
[่ฟ่กๆถ](../reference/runtime/intro)ใ
+v2 ไธญ็่ฟ่กๆถๆฏ v1 ไธฐๅฏๅพๅค๏ผๆฏๆ่ๅใ็ชๅฃๆไฝๅๆดๅฅฝ็ๅฏน่ฏๆกใ ๆนๆณ็็ญพๅ็ฅๆๅๅ - ่ฏทๅ้
[่ฟ่กๆถ](../reference/runtime/intro)ใ
-ๅจ v1 ไธญ๏ผ[่ฟ่กๆถ](../reference/runtime/intro)ๅฏ้่ฟไผ ้็ป`WailsInit()`. ๅจ v2 ไธญ๏ผ่ฟ่กๆถๅทฒ็งปๅบๅฐๅฎ่ชๅทฑ็ๅ
ใ่ฟ่กๆถไธญ็ๆฏไธชๆนๆณ้ฝ้็จ`context.Context`ไผ ้็ปไบ[ๅบ็จๅฏๅจๅ่ฐ](../reference/options#ๅบ็จๅฏๅจๅ่ฐ)ๆนๆณใ
+ๅจ v1 ไธญ๏ผ[่ฟ่กๆถ](../reference/runtime/intro)ๅฏ้่ฟไผ ้็ป`WailsInit()`. ๅจ v2 ไธญ๏ผ่ฟ่กๆถๅทฒ็งปๅบๅฐๅฎ่ชๅทฑ็ๅ
ใ In v2, the runtime has been moved out to its own package. ่ฟ่กๆถไธญ็ๆฏไธชๆนๆณ้ฝ้็จ`context.Context`ไผ ้็ปไบ[ๅบ็จๅฏๅจๅ่ฐ](../reference/options#ๅบ็จๅฏๅจๅ่ฐ)ๆนๆณใ
-```go title="่ฟ่กๆถ็คบไพ"
+```go title="Runtime Example"
package main
import "github.com/wailsapp/wails/v2/pkg/runtime"
type Basic struct {
- ctx context.Context
+ ctx context.Context
}
// startup is called at application startup
func (a *App) startup(ctx context.Context) {
- a.ctx = ctx
- runtime.LogInfo(ctx, "Application Startup called!")
+ a.ctx = ctx
+ runtime.LogInfo(ctx, "Application Startup called!")
+}
}
```
@@ -119,18 +128,19 @@ func (a *App) startup(ctx context.Context) {
- `JS` - ๅบ็จ็จๅบ็ Javascript
- `CSS` - ๅบ็จ็จๅบ็ CSS
-่ฟๆๅณ็็ๆๅไธช JS ๅ CSS ๆไปถ็่ดฃไปปๅจไบๅผๅไบบๅใ่ฟๆฌ่ดจไธ้่ฆไฝฟ็จ็น็็ๆๅ
็จๅบ๏ผไพๅฆ webpackใ
+่ฟๆๅณ็็ๆๅไธช JS ๅ CSS ๆไปถ็่ดฃไปปๅจไบๅผๅไบบๅใ ่ฟๆฌ่ดจไธ้่ฆไฝฟ็จ็น็็ๆๅ
็จๅบ๏ผไพๅฆ webpackใ
-ๅจ v2 ไธญ๏ผWails ไธๅฏนๆจ็ๅ็ซฏ่ตๆบๅไปปไฝ้ข่ฎพ๏ผๅฐฑๅ็ฝ็ปๆๅกๅจไธๆ ทใๆจ็ๆๆๅบ็จ็จๅบ่ตๆบ้ฝไฝไธบ`embed.FS`.
+ๅจ v2 ไธญ๏ผWails ไธๅฏนๆจ็ๅ็ซฏ่ตๆบๅไปปไฝ้ข่ฎพ๏ผๅฐฑๅ็ฝ็ปๆๅกๅจไธๆ ทใ ๆจ็ๆๆๅบ็จ็จๅบ่ตๆบ้ฝไฝไธบ`embed.FS`.
-**่ฟๆๅณ็ไธ้่ฆๆๅ
ๆจ็่ตๆบใๅฐๅพๅ็ผ็ ไธบ Base64 ๆๅฐ่ฏไฝฟ็จๅฅ่ฉ็ๆๅ
ๅทฅๅ
ท้
็ฝฎๆฅไฝฟ็จ่ชๅฎไนๅญไฝใ**
+่ฟๆๅณ็ไธ้่ฆๆๅ
ๆจ็่ตๆบใๅฐๅพๅ็ผ็ ไธบ Base64 ๆๅฐ่ฏไฝฟ็จๅฅ่ฉ็ๆๅ
ๅทฅๅ
ท้
็ฝฎๆฅไฝฟ็จ่ชๅฎไนๅญไฝใ
ๅจๅฏๅจๆถ๏ผWails ๅฐๆซๆ็ปๅฎ็`embed.FS`็`index.html`ๅนถๅฐๅ
ถไฝ็ฝฎ็จไฝๆๆๅ
ถไปๅบ็จ็จๅบ่ตๆบ็ๆ น่ทฏๅพ - ๅฐฑๅ็ฝ็ปๆๅกๅจไธๆ ทใ
-็คบไพ๏ผๅบ็จ็จๅบๅ
ทๆไปฅไธ้กน็ฎๅธๅฑใๆๆๆ็ป่ตๆบ้ฝๆพๅจ `frontend/dist`็ฎๅฝไธญ๏ผ
+็คบไพ๏ผๅบ็จ็จๅบๅ
ทๆไปฅไธ้กน็ฎๅธๅฑใ ๆๆๆ็ป่ตๆบ้ฝๆพๅจ `frontend/dist`็ฎๅฝไธญ๏ผ
```shell
.
+.
โโโ build/
โโโ frontend/
โ โโโ dist/
@@ -144,26 +154,25 @@ func (a *App) startup(ctx context.Context) {
ๅบ็จ็จๅบๅฏไปฅ้่ฟ็ฎๅๅฐๅๅปบไธไธช`embed.FS`ๆฅไฝฟ็จ่ฟไบ่ตๆบ๏ผ
-```go title="่ตๆบ็คบไพ"
+```go title="Assets Example"
//go:embed frontend/dist
var assets embed.FS
func main() {
- err := wails.Run(&options.App{
- /* Other Options */
- Assets: assets,
- })
+ err := wails.Run(&options.App{
+ /* Other Options */
+ Assets: assets,
+ })
}
```
-ๅฝ็ถ๏ผๅฆๆๆจๆฟๆ๏ผไนๅฏไปฅไฝฟ็จๆๅ
ๅทฅๅ
ทใๅฏไธ็่ฆๆฑๆฏๅจ Wails ไธญไฝฟ็จ`embed.FS`,ๅฐๆ็ป็็จๅบ่ตๆบ็ฎๅฝไผ ้็ป[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)็`Assets`้ฎใ
+ๅฝ็ถ๏ผๅฆๆๆจๆฟๆ๏ผไนๅฏไปฅไฝฟ็จๆๅ
ๅทฅๅ
ทใ ๅฏไธ็่ฆๆฑๆฏๅจ Wails ไธญไฝฟ็จ`embed.FS`,ๅฐๆ็ป็็จๅบ่ตๆบ็ฎๅฝไผ ้็ป[ๅบ็จ็จๅบๅๆฐ้้กน](../reference/options#ๅบ็จ็จๅบๅๆฐ้้กน)็`Assets`้ฎใ
### ้กน็ฎ้
็ฝฎ
-ๅจ v1 ไธญ๏ผ้กน็ฎ้
็ฝฎๅญๅจๅจ้กน็ฎๆ น็ `project.json` ๆไปถไธญใ
-ๅจ v2 ไธญ๏ผ้กน็ฎ้
็ฝฎๅญๅจๅจ้กน็ฎๆ น้จ็ `wails.json` ๆไปถไธญใ
+ๅจ v1 ไธญ๏ผ้กน็ฎ้
็ฝฎๅญๅจๅจ้กน็ฎๆ น็ `project.json` ๆไปถไธญใ ๅจ v2 ไธญ๏ผ้กน็ฎ้
็ฝฎๅญๅจๅจ้กน็ฎๆ น้จ็ `wails.json` ๆไปถไธญใ
-ๆไปถ็ๆ ผๅผ็ฅๆไธๅใไธ้ขๆฏๅบๅซ๏ผ
+ๆไปถ็ๆ ผๅผ็ฅๆไธๅใ ไธ้ขๆฏๅบๅซ๏ผ
@@ -183,6 +192,8 @@ func main() {
| tags | | ็งป้ค |
| | wailsjsdir | ็ๆ wailsjs ๆจกๅ็็ฎๅฝ |
| | assetdir | `dev` ๆจกๅผไธๅ็ซฏ่ตๆบๆไปถ็ฎๅฝ |
-| | reloaddirs | ไปฅ้ๅทๅ้็้ๅ ็ฎๅฝๅ่กจ๏ผ็จไบ็่งๆดๆนๅนถๅจๅผๅๆจกๅผไธ่งฆๅ้ๆฐๅ ่ฝฝใ่ฟๅช้่ฆไธไบๆด้่ฆ็่ตๆบ้
็ฝฎใ |
+| | reloaddirs | ไปฅ้ๅทๅ้็้ๅ ็ฎๅฝๅ่กจ๏ผ็จไบ็่งๆดๆนๅนถๅจๅผๅๆจกๅผไธ่งฆๅ้ๆฐๅ ่ฝฝใ This is normally inferred and could be left empty. |
+| | reloaddirs | Comma separated list of additional directories to watch for changes and to trigger reloads in `dev` mode. ่ฟๅช้่ฆไธไบๆด้่ฆ็่ตๆบ้
็ฝฎใ |
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx
index f02ecdc4d..4293ed093 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/mouse-buttons.mdx
@@ -1,8 +1,6 @@
# ้ผ ๆ ๆ้ฎ
-The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved.
-It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly.
-The following code shows how to detect mouse clicks:
+The Wails runtime intercepts mouse clicks to determine whether a frameless window needs resizing or a window needs to be moved. It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks: It has been asked how to detect when a mouse click has occurred, because `window.onclick` doesn't report the mouse buttons correctly. The following code shows how to detect mouse clicks:
```javascript
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/overscroll.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/overscroll.mdx
index f3feb7059..bbefadcad 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/overscroll.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/overscroll.mdx
@@ -1,9 +1,10 @@
+
# ๆปๅจ่ถ
ๅบ
-[Overscroll](https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior) ๆฏๅฝๆจๆปๅจ่ถ
ๅบ้กต้ขๅ
ๅฎน่พน็ๆถๆๆถไผ่ทๅพ็โๅผน่ทณๆๆโใ่ฟๅจ็งปๅจๅบ็จ็จๅบไธญๅพๅธธ่งใ่ฟๅฏไปฅไฝฟ็จ CSS ็ฆ็จ๏ผ
+[Overscroll](https://developer.mozilla.org/zh-CN/docs/Web/CSS/overscroll-behavior) ๆฏๅฝๆจๆปๅจ่ถ
ๅบ้กต้ขๅ
ๅฎน่พน็ๆถๆๆถไผ่ทๅพ็โๅผน่ทณๆๆโใ ่ฟๅจ็งปๅจๅบ็จ็จๅบไธญๅพๅธธ่งใ ่ฟๅฏไปฅไฝฟ็จ CSS ็ฆ็จ๏ผ
```css
body {
overscroll-behavior: none;
}
-```
+```
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx
index 161aac121..9cf99c438 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/routing.mdx
@@ -1,6 +1,7 @@
+
# ่ทฏ็ฑ
-่ทฏ็ฑๆฏไธ็งๅจๅบ็จ็จๅบไธญๅๆข่งๅพ็ๆต่กๆนๅผใๆญค้กต้ขๆไพไบๆๅ
ณๅฆไฝๆง่กๆญคๆไฝ็ไธไบๆๅฏผใ
+่ทฏ็ฑๆฏไธ็งๅจๅบ็จ็จๅบไธญๅๆข่งๅพ็ๆต่กๆนๅผใ ๆญค้กต้ขๆไพไบๆๅ
ณๅฆไฝๆง่กๆญคๆไฝ็ไธไบๆๅฏผใ
## Vue
@@ -15,6 +16,8 @@ const router = createRouter({
//...
],
});
+ ],
+})
```
## Angular
@@ -23,4 +26,4 @@ const router = createRouter({
```ts
RouterModule.forRoot(routes, { useHash: true });
-```
+```
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx
index a3abb6aca..8e44ee8c9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/signing.mdx
@@ -1,27 +1,13 @@
# ไปฃ็ ็ญพๅ
-This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows.
-The guide will target CI environments, more specifically GitHub Actions.
+This is a guide on how you can sign your binaries generated with Wails on MacOS and Windows. The guide will target CI environments, more specifically GitHub Actions. The guide will target CI environments, more specifically GitHub Actions.
## Windows
-First off you need a code signing certificate. If you do not already have one, Microsoft's
-info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate).
-Please note that an EV certificate is not required unless you need to write kernel-level
-software such as device drivers. For signing your Wails app, a standard code signing
-certificate will do just fine.
+First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). First off you need a code signing certificate. If you do not already have one, Microsoft's info page lists some providers [here](https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate). Please note that an EV certificate is not required unless you need to write kernel-level software such as device drivers. For signing your Wails app, a standard code signing certificate will do just fine. For signing your Wails app, a standard code signing certificate will do just fine.
-It may be a good idea to check with your certificate provider
-how to sign your binaries on your local machine before targeting automated build systems, just so you know if there
-are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows.
-If you know how to sign locally, it will be easier to
-troubleshoot any potential issues in a CI environment.
-For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool)
-while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing
-Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe.
-Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action)
-Action if you prefer.
+It may be a good idea to check with your certificate provider how to sign your binaries on your local machine before targeting automated build systems, just so you know if there are any special requirements. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer. For instance, [here](https://www.ssl.com/how-to/using-your-code-signing-certificate/) is SSL.com's code signing guide for Windows. If you know how to sign locally, it will be easier to troubleshoot any potential issues in a CI environment. For instance, SSL.com code signing certificates require the `/tr` flag for [SignTool.exe](https://docs.microsoft.com/en-us/windows/win32/seccrypto/signtool) while other providers may only need the `/t` flag for providing the timestamping server. Popular GitHub Actions for signing Windows binaries like [this one](https://github.com/Dana-Prajea/code-sign-action) does not support the `/tr` flag on SignTool.exe. Therefore this guide will focus on signing our app manually with PowerShell commands, but you can use actions like the [code-sign-action](https://github.com/Dana-Prajea/code-sign-action) Action if you prefer.
-First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template:
+First off, let's make sure we are able to build our Wails app in our GitHub CI. Here is a small workflow template: Here is a small workflow template:
```yaml
name: "example"
on:
@@ -46,6 +32,29 @@ jobs:
with:
node-version: 14
# You may need to manually build you frontend manually here, unless you have configured frontend build and install commands in wails.json.
+ name: "example"
+on:
+ workflow_dispatch:
+ # This Action only starts when you go to Actions and manually run the workflow.
+
+jobs:
+ package:
+ strategy:
+ matrix:
+ platform: [ windows-latest, macos-latest ]
+ go-version: [1.18]
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: ${{ matrix.go-version }}
+ - name: setup node
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14
+ # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json.
- name: Get Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build Wails app
@@ -65,15 +74,12 @@ jobs:
path: build/bin/*
```
-Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate
-into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12':
+Next we need to give the GitHub workflow access to our signing certificate. This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12': This is done by encoding your .pfx or .p12 certificate into a base64 string. To do this in PowerShell, you can use the following command assuming your certificate is called 'my-cert.p12':
```PowerShell
certutil -encode .\my-cert.p12 my-cert-base64.txt
```
-You should now have your .txt file with the base64 encoded certificate. It should start with *-----BEGIN CERTIFICATE-----* and
-end with *-----END CERTIFICATE-----*. Now you need to make two action secrets on GitHub. Navigate to *Settings -> Secrets -> Actions* and create the
-two following secrets:
+You should now have your .txt file with the base64 encoded certificate. It should start with *-----BEGIN CERTIFICATE-----* and end with *-----END CERTIFICATE-----*. Now you need to make two action secrets on GitHub. Navigate to *Settings -> Secrets -> Actions* and create the two following secrets:
* **WIN_SIGNING_CERT** with the contents of your base64 encoded certificate text.
* **WIN_SIGNING_CERT_PASSWORD** with the contents of your certificate password.
@@ -95,8 +101,7 @@ After the `"Build Wails app"` step, we can add the following step to our workflo
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd /t /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}'
```
-This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file,
-and finally signs the binary. The following variables needs to be replaced in the last line:
+This script creates a new directory for your certificate file, creates the certificate file from our base64 secret, converts it to a .pfx file, and finally signs the binary. The following variables needs to be replaced in the last line: The following variables needs to be replaced in the last line:
* **signing algorithm**: usually sha256.
* **timestamping server**: URL to the timestamping server to use with your certificate.
* **path to binary**: path to the binary you want to sign.
@@ -108,6 +113,29 @@ on:
workflow_dispatch:
# This Action only starts when you go to Actions and manually run the workflow.
+jobs:
+ package:
+ strategy:
+ matrix:
+ platform: [ windows-latest, macos-latest ]
+ go-version: [1.18]
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: ${{ matrix.go-version }}
+ - name: setup node
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14
+ # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json.
+ name: "example"
+on:
+ workflow_dispatch:
+ # This Action only starts when you go to Actions and manually run the workflow.
+
jobs:
package:
strategy:
@@ -156,16 +184,13 @@ jobs:
```
### Method 2: automatically signing with Action
-It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one,
-but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate).
+It is possible to use a Windows code signing Action like [this](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate) one, but note it requires a SHA1 hash for the certificate and a certificate name. View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate). View an example of how to configure it on the Action's [marketplace](https://github.com/marketplace/actions/code-sign-a-file-with-pfx-certificate).
---
## MacOS
-First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one.
-Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions)
-shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command:
+First off you need your code signing certificate from Apple. If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command: If you do not have one, a simple Google search will help you acquire one. Once you have your certificate, you need to export it and encode it to base64. [This tutorial](https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions) shows you how to do that in an easy manner. Once you have exported your .p12 certificate file, you can encode it to base64 as seen in the tutorial with the following command:
```bash
base64 Certificates.p12 | pbcopy
```
@@ -175,7 +200,7 @@ Now you're ready to create some GitHub project secrets, just as with Windows:
* **APPLE_DEVELOPER_CERTIFICATE_PASSWORD** with the contents of your certificate password.
* **APPLE_PASSWORD** with the contents of an App-Specific password to your Apple-ID account which you can generate [here](https://appleid.apple.com/account/manage).
-Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template:
+Let's make sure we are able to build our Wails app in our GitHub Action workflow. Here is a small template: Here is a small template:
```yaml
name: "example"
@@ -183,6 +208,29 @@ on:
workflow_dispatch:
# This Action only starts when you go to Actions and manually run the workflow.
+jobs:
+ package:
+ strategy:
+ matrix:
+ platform: [ windows-latest, macos-latest ]
+ go-version: [1.18]
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Install Go
+ uses: actions/setup-go@v2
+ with:
+ go-version: ${{ matrix.go-version }}
+ - name: setup node
+ uses: actions/setup-node@v2
+ with:
+ node-version: 14
+ # You may need to manually build you frontend here, unless you have configured frontend build and install commands in wails.json.
+ name: "example"
+on:
+ workflow_dispatch:
+ # This Action only starts when you go to Actions and manually run the workflow.
+
jobs:
package:
strategy:
@@ -220,8 +268,7 @@ jobs:
path: build/bin/*
```
-For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and
-will be used in this guide.
+For code signing on macOS, [gon](https://github.com/mitchellh/gon) is a very handy tool for code signing and communicating with Apple servers, also written in Go, and will be used in this guide.
After the `Build Wails app` step, add the following to the workflow:
```yaml
@@ -229,7 +276,7 @@ After the `Build Wails app` step, add the following to the workflow:
if: matrix.platform == 'macos-latest'
run: |
brew install mitchellh/gon/gon
-```
+```
Now we need to configure some gon config files in our `build/darwin` directory:
@@ -247,8 +294,7 @@ Now we need to configure some gon config files in our `build/darwin` directory:
}
}
```
- Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password
- which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command:
+ Where `source` is your Wails binary, `bundle_id` is your bundle ID, `apple_id` contains your Apple ID username and App-Specific password which you created earlier, and `sign.application_identity` is your identity which you can find by running the following command:
```bash
security find-identity -v -p codesigning
```
@@ -271,25 +317,24 @@ Now we need to configure some gon config files in our `build/darwin` directory:
```
- In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements).
+ In this file you configure the entitlements you need for you app, e.g. camera permissions if your app uses the camera. Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements). Read more about entitlements [here](https://developer.apple.com/documentation/bundleresources/entitlements).
-Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`.
-Here's an example `Info.plist` file:
+Make sure you have updated your `Info.plist` file with the same bundle ID as you entered in `gon-sign.json`. Here's an example `Info.plist` file: Here's an example `Info.plist` file:
```plist
- CFBundlePackageTypeAPPL
- CFBundleNameMyApp
- CFBundleExecutableapp
- CFBundleIdentifierapp.myapp
- CFBundleVersion0.1.0
- CFBundleGetInfoStringMy app is cool and nice and chill and
- CFBundleShortVersionString0.1.0
- CFBundleIconFileiconfile
- LSMinimumSystemVersion10.13.0
- NSHighResolutionCapabletrue
- LSApplicationCategoryTypepublic.app-category.utilities
- NSHumanReadableCopyrightยฉ Me
+ CFBundlePackageTypeAPPL
+ CFBundleNameMyApp
+ CFBundleExecutableapp
+ CFBundleIdentifierapp.myapp
+ CFBundleVersion0.1.0
+ CFBundleGetInfoStringMy app is cool and nice and chill and
+ CFBundleShortVersionString0.1.0
+ CFBundleIconFileiconfile
+ LSMinimumSystemVersion10.13.0
+ NSHighResolutionCapabletrue
+ LSApplicationCategoryTypepublic.app-category.utilities
+ NSHumanReadableCopyrightยฉ Me
```
@@ -303,6 +348,12 @@ Now we're ready to add the signing step in our workflow after building the Wails
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
# The password used to import the PKCS12 file.
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
+- name: Sign our macOS binary
+ if: matrix.platform == 'macos-latest'
+ run: |
+ echo "Signing Package"
+ gon -log-level=info ./build/darwin/gon-sign.json
+ p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
- name: Sign our macOS binary
if: matrix.platform == 'macos-latest'
run: |
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx
index dfd60f876..d8b147b9f 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/templates.mdx
@@ -1,20 +1,22 @@
+
# ๆจกๆฟ
-Wails ไป้ขๅ
ๅๅปบ็ๆจกๆฟ็ๆ้กน็ฎใๅจ v1 ไธญ๏ผ่ฟๆฏไธ็ป้พไปฅ็ปดๆค็้กน็ฎ๏ผ่ฟไบ้กน็ฎๅฏ่ฝไผ่ฟๆถใๅจ v2 ไธญ๏ผไธบไบๅขๅผบ็คพๅบ็่ฝๅ๏ผไธบๆจกๆฟๆทปๅ ไบไธไบๆฐๅ่ฝ๏ผ
+Wails ไป้ขๅ
ๅๅปบ็ๆจกๆฟ็ๆ้กน็ฎใ ๅจ v1 ไธญ๏ผ่ฟๆฏไธ็ป้พไปฅ็ปดๆค็้กน็ฎ๏ผ่ฟไบ้กน็ฎๅฏ่ฝไผ่ฟๆถใ ๅจ v2 ไธญ๏ผไธบไบๅขๅผบ็คพๅบ็่ฝๅ๏ผไธบๆจกๆฟๆทปๅ ไบไธไบๆฐๅ่ฝ๏ผ
- ่ฝๅคไป[่ฟ็จๆจกๆฟ](../reference/cli#่ฟ็จๆจกๆฟ)็ๆ้กน็ฎ
- ๅธฎๅฉๅๅปบ่ชๅทฑ็ๆจกๆฟ็ๅทฅๅ
ท
## ๅๅปบๆจกๆฟ
-่ฆๅๅปบๆจกๆฟ๏ผๆจๅฏไปฅไฝฟ็จ`wails generate template`ๅฝไปคใ่ฆ็ๆ้ป่ฎคๆจกๆฟ๏ผ่ฏท่ฟ่ก๏ผ
+่ฆๅๅปบๆจกๆฟ๏ผๆจๅฏไปฅไฝฟ็จ`wails generate template`ๅฝไปคใ ่ฆ็ๆ้ป่ฎคๆจกๆฟ๏ผ่ฏท่ฟ่ก๏ผ
-`wails generate template -name mytemplate `
+`wails generate template -name mytemplate`
่ฟๅฐไฝฟ็จ้ป่ฎคๆไปถๅๅปบโmytemplateโ็ฎๅฝ๏ผ
```shell title=mytemplate/
.
+.
|-- NEXTSTEPS.md
|-- README.md
|-- app.tmpl.go
@@ -39,22 +41,22 @@ Wails ไป้ขๅ
ๅๅปบ็ๆจกๆฟ็ๆ้กน็ฎใๅจ v1 ไธญ๏ผ่ฟๆฏไธ็ป้พไปฅ็ปด
้ป่ฎคๆจกๆฟๅ
ๅซไปฅไธๆไปถๅ็ฎๅฝ๏ผ
-| ๆไปถๅ / ็ฎๅฝ | ๆ่ฟฐ |
-| --------------- | ---------------------- |
-| NEXTSTEPS.md | ๆๅ
ณๅฆไฝๅฎๆๆจกๆฟ็่ฏดๆ |
-| README.md | ้ๆจกๆฟๅๅธ็ README |
-| app.tmpl.go | `app.go` ๆจกๆฟๆไปถ |
-| frontend/ | ๅ
ๅซๅ็ซฏ่ตๆบ็็ฎๅฝ |
-| go.mod.tmpl | `go.mod` ๆจกๆฟๆไปถ |
-| main.tmpl.go | `main.go` ๆจกๆฟๆไปถ |
+| ๆไปถๅ / ็ฎๅฝ | ๆ่ฟฐ |
+| --------------- | ----------------- |
+| NEXTSTEPS.md | ๆๅ
ณๅฆไฝๅฎๆๆจกๆฟ็่ฏดๆ |
+| README.md | ้ๆจกๆฟๅๅธ็ README |
+| app.tmpl.go | `app.go` ๆจกๆฟๆไปถ |
+| frontend/ | ๅ
ๅซๅ็ซฏ่ตๆบ็็ฎๅฝ |
+| go.mod.tmpl | `go.mod` ๆจกๆฟๆไปถ |
+| main.tmpl.go | `main.go` ๆจกๆฟๆไปถ |
| template.json | ๆจกๆฟๅ
ๆฐๆฎ |
-| wails.tmpl.json | `wails.json` ๆจกๆฟๆไปถ |
+| wails.tmpl.json | `wails.json` ๆจกๆฟๆไปถ |
ๆญคๆถ๏ผๅปบ่ฎฎๆ็
ง`NEXTSTEPS.md`ไธญ็ๆญฅ้ชคๆไฝใ
## ไป็ฐๆ้กน็ฎๅๅปบๆจกๆฟ
-้่ฟๅจ็ๆๆจกๆฟๆถๅฐ่ทฏๅพไผ ้็ป้กน็ฎ๏ผๅฏไปฅไป็ฐๆ็ๅ็ซฏ้กน็ฎๅๅปบๆจกๆฟใๆไปฌ็ฐๅจๅฐไป็ปๅฆไฝๅๅปบ Vue 3 ๆจกๆฟ๏ผ
+้่ฟๅจ็ๆๆจกๆฟๆถๅฐ่ทฏๅพไผ ้็ป้กน็ฎ๏ผๅฏไปฅไป็ฐๆ็ๅ็ซฏ้กน็ฎๅๅปบๆจกๆฟใ ๆไปฌ็ฐๅจๅฐไป็ปๅฆไฝๅๅปบ Vue 3 ๆจกๆฟ๏ผ
- ๅฎ่ฃ
vue cli๏ผ `npm install -g @vue/cli`
- ๅๅปบ้ป่ฎค้กน็ฎ๏ผ`vue create vue3-base`
@@ -83,7 +85,7 @@ Renaming package-lock.json -> package-lock.tmpl.json...
## ๅๅธๆจกๆฟ
-ๅๅธๆจกๆฟๅชๆฏๅฐๆไปถๆจ้ๅฐ GitHubใ้ผๅฑไปฅไธๆไฝณๅฎ่ทต๏ผ
+ๅๅธๆจกๆฟๅชๆฏๅฐๆไปถๆจ้ๅฐ GitHubใ ้ผๅฑไปฅไธๆไฝณๅฎ่ทต๏ผ
- ไปๅ็ซฏ็ฎๅฝไธญๅ ้คไปปไฝไธ้่ฆ็ๆไปถๅ็ฎๅฝ๏ผไพๅฆ๏ผ.git๏ผ
- ็กฎไฟ`template.json`ๅฎๆด๏ผๅฐคๅ
ถๆฏ`helpurl`
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx
index bb486aa55..0921dc1b9 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/troubleshooting.mdx
@@ -4,51 +4,51 @@
## ๆ็ๅบ็จ็จๅบๆพ็คบ็ฝ่ฒ/็ฉบ็ฝๅฑๅน
-ๆฃๆฅๆจ็ๅบ็จ็จๅบๆฏๅฆๅจๆญฃ็กฎ็ฎๅฝไธญๅ
ๅซ่ตๆบใๅจๆจ็`main.go`ๆไปถไธญ๏ผๆจๅฐๆฅๆ็ฑปไผผไบไปฅไธไปฃ็ ็ๅ
ๅฎน๏ผ
+If your system is reporting that the `wails` command is missing, make sure you have followed the Go installation guide correctly. Normally, it means that the `go/bin` directory in your User's home directory is not in the `PATH` environment variable. You will also normally need to close and reopen any open command prompts so that changes to the environment made by the installer are reflected at the command prompt.
+
+## Mac ๅบ็จ็จๅบๆ ๆ
+
+ๆฃๆฅๆจ็ๅบ็จ็จๅบๆฏๅฆๅจๆญฃ็กฎ็ฎๅฝไธญๅ
ๅซ่ตๆบใ ๅจๆจ็`main.go`ๆไปถไธญ๏ผๆจๅฐๆฅๆ็ฑปไผผไบไปฅไธไปฃ็ ็ๅ
ๅฎน๏ผ
```go
//go:embed frontend/dist
var assets embed.FS
```
-
-ๆฃๆฅ`frontend/dist`ไธญๆฏๅฆๅ
ๅซๆจ็ๅบ็จ็จๅบ่ตๆบใ
-
-## Mac ๅบ็จ็จๅบๆ ๆ
-
ๅฆๆๆจๆๅปบ็ๅบ็จ็จๅบๅจ finder ไธญๅฆไธๆ็คบ๏ผ
-
-
-
+### Mac
-ๆจ็ๅบ็จ็จๅบ็ `info.plist` ๅฏ่ฝๆ ๆใๆดๆฐ `build/.app/Contents/info.plist` ๆไปถๅนถๆฃๆฅๆฐๆฎๆฏๅฆๆๆ๏ผไพๅฆไบ่ฟๅถๆไปถๅ็งฐๆฏๅฆๆญฃ็กฎใ่ฆไฟ็ๆดๆน๏ผ่ฏทๅฐๆไปถๅคๅถๅ `build/darwin` ็ฎๅฝใ
+If this happens on Mac, try adding the following to your `Info.plist`:
+
+```xml
+NSAppTransportSecurity
+
+ NSAllowsLocalNetworking
+
+
+```
+
+Reference: https://github.com/wailsapp/wails/issues/1504#issuecomment-1174317433
## ๅ็ซฏ่ฐ็จๅ็ซฏๆนๆณๆ ๆณไฝฟ็จๅฏๅๅๆฐ
ๅฆๆๆจๆไฝฟ็จๅฏๅๅๆฐๅฎไน็ๅ็ซฏๆนๆณ๏ผไพๅฆ๏ผ
+
+
+
+
+ๆจ็ๅบ็จ็จๅบ็ `info.plist` ๅฏ่ฝๆ ๆใ ๆดๆฐ `build/.app/Contents/info.plist` ๆไปถๅนถๆฃๆฅๆฐๆฎๆฏๅฆๆๆ๏ผไพๅฆไบ่ฟๅถๆไปถๅ็งฐๆฏๅฆๆญฃ็กฎใ ่ฆไฟ็ๆดๆน๏ผ่ฏทๅฐๆไปถๅคๅถๅ `build/darwin` ็ฎๅฝใ
+
+## ๅฐ่ฏๅฎ่ฃ
Wails ๆถ้ๅฐไปฃ็้่ฏฏ
+
+ๅฝๅไบ๏ผhttps://github.com/wailsapp/wails/issues/1186
```go
func (a *App) TestFunc(msg string, args ...interface{}) error {
// Code
}
```
-
-ๅ่ฟๆ ทไปๅ็ซฏ่ฐ็จๆญคๆนๆณๅฐๅคฑ่ดฅ๏ผ
-
-```js
-var msg = "Hello: ";
-var args = ["Go", "JS"];
-window.go.main.App.TestFunc(msg, ...args)
- .then((result) => {
- //do things here
- })
- .catch((error) => {
- //handle error
- });
-```
-
-่งฃๅณๅๆณ๏ผ
-
+ๅฆๆๆจ้ๅฐ่ฟๆ ท็้่ฏฏ๏ผ
```js
var msg = "Hello ";
var args = ["Go", "JS"];
@@ -61,22 +61,46 @@ window.go.main.App.TestFunc(msg, args)
//handle error
});
```
+่งฃๅณๅๆณ๏ผ
+```js
+var msg = "Hello: ";
+var args = ["Go", "JS"];
+window.go.main.App.TestFunc(msg, ...args)
+ .then((result) => {
+ //do things here
+ })
+ .catch((error) => {
+ //handle error
+ });
+```
+ๆฅๆบ๏ผhttps://github.com/wailsapp/wails/issues/1233
-ๅฝๅไบ๏ผhttps://github.com/wailsapp/wails/issues/1186
-
-## ๅฐ่ฏๅฎ่ฃ
Wails ๆถ้ๅฐไปฃ็้่ฏฏ
-
-ๅฆๆๆจ้ๅฐ่ฟๆ ท็้่ฏฏ๏ผ
+## I''m having getting proxy errors when trying to install Wails
+If you are getting errors like this:
```
"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 Proxy ่ขซ้ปๆญข๏ผไธญๅฝ็จๆทๅ้ฆไบ่ฟไธ็น๏ผใ ่งฃๅณๆนๆกๆฏๆๅจ่ฎพ็ฝฎไปฃ็๏ผไพๅฆ๏ผ
```
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
```
+Source: https://github.com/wailsapp/wails/issues/1233
-ๆฅๆบ๏ผhttps://github.com/wailsapp/wails/issues/1233
+## The generated Typescript doesn''t have the correct types
+
+Sometimes the generated Typescript doesn''t have the correct types. To mitigate this, it is possible to specify what types should be generated using the `ts_type` struct tag. For more details, please read [this](https://github.com/tkrajina/typescriptify-golang-structs#custom-types).
+
+## ๆฃๆฅ`frontend/dist`ไธญๆฏๅฆๅ
ๅซๆจ็ๅบ็จ็จๅบ่ตๆบใ
+
+If you navigate away from `index.html` to a new html file, the context will be lost. This can be fixed by adding the following imports to the `` section of any new page you navigate to:
+
+```html
+
+
+
+
+```
+
+Source: https://github.com/wailsapp/wails/discussions/1512
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
index de91231a3..5382a0c19 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows-installer.mdx
@@ -1,8 +1,7 @@
# NSIS ๅฎ่ฃ
็จๅบ
-
-
-
+
+ 
Wails ๆฏๆไฝฟ็จ[NSIS ๅฎ่ฃ
็จๅบ](https://nsis.sourceforge.io/)็ๆ Windows ๅฎ่ฃ
็จๅบใ
@@ -14,11 +13,9 @@ Wails ๆฏๆไฝฟ็จ[NSIS ๅฎ่ฃ
็จๅบ](https://nsis.sourceforge.io/)็ๆ Window
ๅฎ่ฃ
็จๅบๅฏๅจ[NSIS ไธ่ฝฝ้กต้ข](https://nsis.sourceforge.io/Download)ไธๆพๅฐใ
ๅฆๆๆจไฝฟ็จ chocolatey ๅ
็ฎก็ๅจ๏ผ่ฏท่ฟ่กไปฅไธ่ๆฌ๏ผ
-
```
choco install nsis
```
-
ๅฆๆๆๅจๅฎ่ฃ
NSIS๏ผๅ้่ฆๅฐ NSIS ๅฎ่ฃ
็ฎๅฝไธญๅ
ๅซ`makensis.exe`็*Bin*็ฎๅฝๆทปๅ ๅฐ PATH ไธญใ [่ฟๆฏ](https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/) ไธไธชๅ
ณไบๅฆไฝๅจ Windows ไธๆทปๅ ๅฐ PATH ็ๅฅฝๆ็จใ
### Linux
@@ -31,10 +28,11 @@ NSIS ๅฏ้ homebrew ๅฎ่ฃ
๏ผ`brew install nsis`ใ
## ็ๆๅฎ่ฃ
็จๅบ
-ๅๅปบๆฐ้กน็ฎๆถ๏ผWails ไป`installer/info.json`ไธญ่ฏปๅ้
็ฝฎๆฐๆฎๅนถไฝฟ็จ้กน็ฎ็`wails.json`็ Info ้จๅ๏ผๅจ`build/windows/installer`ไธญ็ๆ NSIS ้
็ฝฎๆไปถ๏ผ
+ๅๅปบๆฐ้กน็ฎๆถ๏ผWails ไป`installer/info.json`ไธญ่ฏปๅ้
็ฝฎๆฐๆฎๅนถไฝฟ็จ้กน็ฎ็`wails.json`็ Info ้จๅ๏ผๅจ`build/windows/installer`ไธญ็ๆ NSIS ้
็ฝฎๆไปถ๏ผ The config data is read from `installer/info.json` and that is configured to use the project's `wails.json` Info section:
```json
// ...
+ // ...
"Info": {
"companyName": "My Company Name",
"productName": "Wails Vite",
@@ -45,7 +43,6 @@ NSIS ๅฏ้ homebrew ๅฎ่ฃ
๏ผ`brew install nsis`ใ
```
่ฆไธบๆจ็ๅบ็จ็จๅบ็ๆๅฎ่ฃ
็จๅบ๏ผ่ฏทไฝฟ็จ`wails build`็`-nsis`ๆ ๅฟ๏ผ
-
```
wails build -nsis
```
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx
index 48d65ec32..7a98d1a4c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/windows.mdx
@@ -1,31 +1,47 @@
+
# Windows ็ณป็ป
ๆญค้กต้ขๅ
ๅซไบๅจ Windows ไธๅผๅ Wails ๅบ็จ็จๅบ็ธๅ
ณ็ๅ
ถไปๆๅใ
## ๅค็ WebView2 ่ฟ่กๆถไพ่ต
-ไธบ Windows ๆๅปบ Wails ๅบ็จ็จๅบๆถๅฏน Microsoft [WebView2 ่ฟ่กๆถ](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)ๆ่ฆๆฑใ
-้ป่ฎคๆ
ๅตไธ๏ผWindows 11 ไผๅฎ่ฃ
ๅฎ๏ผไฝๆไบๆบๅจไธไผใWails ๆไพไบไธ็ง็ฎๅ็ๆนๆณๆฅๅค็่ฟ็งไพ่ตๅ
ณ็ณปใ
+ไธบ Windows ๆๅปบ Wails ๅบ็จ็จๅบๆถๅฏน Microsoft [WebView2 ่ฟ่กๆถ](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)ๆ่ฆๆฑใ ้ป่ฎคๆ
ๅตไธ๏ผWindows 11 ไผๅฎ่ฃ
ๅฎ๏ผไฝๆไบๆบๅจไธไผใ Wails ๆไพไบไธ็ง็ฎๅ็ๆนๆณๆฅๅค็่ฟ็งไพ่ตๅ
ณ็ณปใ
-้่ฟๅจๆๅปบๆถไฝฟ็จ`-webview2`ๆ ๅฟ,ๆจๅฏไปฅๅณๅฎๅจๆชๆฃๆตๅฐๅ้็่ฟ่กๆถ็ๆถๅ๏ผๅ
ๆฌๅฎ่ฃ
็่ฟ่กๆถๆฏๅฆๅคชๆง๏ผๅบ็จ็จๅบๅฐๆง่ก็ๆไฝใๅไธช้้กนๆฏ๏ผ
+้่ฟๅจๆๅปบๆถไฝฟ็จ`-webview2`ๆ ๅฟ,ๆจๅฏไปฅๅณๅฎๅจๆชๆฃๆตๅฐๅ้็่ฟ่กๆถ็ๆถๅ๏ผๅ
ๆฌๅฎ่ฃ
็่ฟ่กๆถๆฏๅฆๅคชๆง๏ผๅบ็จ็จๅบๅฐๆง่ก็ๆไฝใ ๅไธช้้กนๆฏ๏ผ
1. Download๏ผไธ่ฝฝ๏ผ
2. Embed๏ผๅ
ๅต๏ผ
3. Browser๏ผๆต่งๅจ๏ผ
4. Error๏ผ้่ฏฏ๏ผ
-### ไธ่ฝฝ
+### Download๏ผไธ่ฝฝ๏ผ
-ๆญค้้กนๅฐๆ็คบ็จๆทๅจๆชๆพๅฐๅ้็่ฟ่กๆถๆถ๏ผๆไพไป Microsoft ็ WebView2 ๅฎๆน็ซ็นไธ่ฝฝๅนถ่ฟ่กๅผๅฏผ็จๅบใๅฆๆ็จๆท็ปง็ปญ๏ผๅฎๆนๅผๅฏผ็จๅบๅฐ่ขซไธ่ฝฝๅนถ่ฟ่กใ
+ๆญค้้กนๅฐๆ็คบ็จๆทๅจๆชๆพๅฐๅ้็่ฟ่กๆถๆถ๏ผๆไพไป Microsoft ็ WebView2 ๅฎๆน็ซ็นไธ่ฝฝๅนถ่ฟ่กๅผๅฏผ็จๅบใ ๅฆๆ็จๆท็ปง็ปญ๏ผๅฎๆนๅผๅฏผ็จๅบๅฐ่ขซไธ่ฝฝๅนถ่ฟ่กใ
-### ๅ
ๅต
+### Embed๏ผๅ
ๅต๏ผ
-ๆญค้้กนๅฐๅฎๆนๅผๅฏผ็จๅบๅตๅ
ฅๅฐๅบ็จ็จๅบไธญใๅฆๆๆฒกๆๆพๅฐๅ้็่ฟ่กๆถ๏ผๅบ็จ็จๅบๅฐๆไพๅนถ่ฟ่กๅผๅฏผ็จๅบใ่ฟๅฐไฝฟไบ่ฟๅถๅคงๅฐๅขๅ ็บฆ 150kใ
+ๆญค้้กนๅฐๅฎๆนๅผๅฏผ็จๅบๅตๅ
ฅๅฐๅบ็จ็จๅบไธญใ ๅฆๆๆฒกๆๆพๅฐๅ้็่ฟ่กๆถ๏ผๅบ็จ็จๅบๅฐๆไพๅนถ่ฟ่กๅผๅฏผ็จๅบใ ่ฟๅฐไฝฟไบ่ฟๅถๅคงๅฐๅขๅ ็บฆ 150kใ
-### ๆต่งๅจ
+### Browser๏ผๆต่งๅจ๏ผ
-ๆญค้้กนๅฐๆ็คบ็จๆทๆฒกๆๆพๅฐๅ้็่ฟ่กๆถๆถ๏ผๆไพๆๅผๆต่งๅจๅฐ WebView2 ๅฎๆน้กต้ข๏ผๅฏไปฅไธ่ฝฝๅๅฎ่ฃ
ๅผๅฏผ็จๅบใ็ถๅๅบ็จ็จๅบๅฐไผ้ๅบ๏ผๅฎ่ฃ
็ๆไฝ็็ป็จๆทใ
+ๆญค้้กนๅฐๆ็คบ็จๆทๆฒกๆๆพๅฐๅ้็่ฟ่กๆถๆถ๏ผๆไพๆๅผๆต่งๅจๅฐ WebView2 ๅฎๆน้กต้ข๏ผๅฏไปฅไธ่ฝฝๅๅฎ่ฃ
ๅผๅฏผ็จๅบใ ็ถๅๅบ็จ็จๅบๅฐไผ้ๅบ๏ผๅฎ่ฃ
็ๆไฝ็็ป็จๆทใ
-### ้่ฏฏ
+### Error๏ผ้่ฏฏ๏ผ
ๅฆๆๆชๆพๅฐๅ้็่ฟ่กๆถ้ด๏ผๅไผๅ็จๆทๆพ็คบ้่ฏฏๅนถไธไธ้ๅ่ฟไธๆญฅๆชๆฝใ
+
+## Fixed version runtime
+
+Another way of dealing with webview2 dependency is shipping it yourself. You can download [fixed version runtime](https://developer.microsoft.com/ru-ru/microsoft-edge/webview2/#download-section) and bundle or download it with your application.
+
+Also, you should specify path to fixed version of webview2 runtime in the `windows.Options` structure when launching wails.
+
+```go
+ wails.Run(&options.App{
+ Windows: &windows.Options{
+ WebviewBrowserPath: "",
+ },
+ })
+```
+
+Note: When `WebviewBrowserPath` is specified, `error` strategy will be forced in case of minimal required version mismatch or invalid path to a runtime.
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx
index 4bfea20bc..255ee60ef 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/howdoesitwork.mdx
@@ -1,13 +1,10 @@
---
-title: ๅฎๆฏๅฆไฝๅทฅไฝ็๏ผ
sidebar_position: 20
---
# ๅฎๆฏๅฆไฝๅทฅไฝ็๏ผ
-Wails ๅบ็จ็จๅบๆฏไธไธชๅธฆๆไธไธช webkit ๅ็ซฏ็ๆ ๅ็ Go ๅบ็จ็จๅบใ ๅบ็จ็จๅบ็ Go ้จๅ็ฑๅบ็จ็จๅบไปฃ็ ๅไธไธช่ฟ่กๆถๅบ็ปๆ๏ผ
-่ฏฅๅบๆไพไบ่ฎธๅคๆ็จ็ๆไฝ๏ผไพๅฆๆงๅถๅบ็จ็จๅบ็ชๅฃใ ๅ็ซฏๆฏไธไธช webkit ็ชๅฃ๏ผๅฐๆพ็คบๅ็ซฏ่ตๆบใ ๅ็ซฏ่ฟๅฏไปฅไฝฟ็จ่ฟ่กๆถๅบ็ Javascript ็ๆฌใ
-ๆๅ๏ผๅฏไปฅๅฐ Go ๆนๆณ็ปๅฎๅฐๅ็ซฏ๏ผ่ฟไบๅฐๆพ็คบไธบๅฏไปฅ่ฐ็จ็ Javascript ๆนๆณ๏ผๅฐฑๅๅฎไปฌๆฏๅ็ Javascript ๆนๆณไธๆ ทใ
+Wails ๅบ็จ็จๅบๆฏไธไธชๅธฆๆไธไธช webkit ๅ็ซฏ็ๆ ๅ็ Go ๅบ็จ็จๅบใ ๅบ็จ็จๅบ็ Go ้จๅ็ฑๅบ็จ็จๅบไปฃ็ ๅไธไธช่ฟ่กๆถๅบ็ปๆ๏ผ ่ฏฅๅบๆไพไบ่ฎธๅคๆ็จ็ๆไฝ๏ผไพๅฆๆงๅถๅบ็จ็จๅบ็ชๅฃใ ๅ็ซฏๆฏไธไธช webkit ็ชๅฃ๏ผๅฐๆพ็คบๅ็ซฏ่ตๆบใ ๅ็ซฏ่ฟๅฏไปฅไฝฟ็จ่ฟ่กๆถๅบ็ Javascript ็ๆฌใ ๆๅ๏ผๅฏไปฅๅฐ Go ๆนๆณ็ปๅฎๅฐๅ็ซฏ๏ผ่ฟไบๅฐๆพ็คบไธบๅฏไปฅ่ฐ็จ็ Javascript ๆนๆณ๏ผๅฐฑๅๅฎไปฌๆฏๅ็ Javascript ๆนๆณไธๆ ทใ

@@ -17,17 +14,17 @@ Wails ๅบ็จ็จๅบๆฏไธไธชๅธฆๆไธไธช webkit ๅ็ซฏ็ๆ ๅ็ Go ๅบ็จ็จ
### ๆฆ่ฟฐ
-ไธปๅบ็จ็จๅบ็ฑๅฏน`wails.Run()`็่ฐ็จ็ปๆ. ๅฎๆฅๅๆ่ฟฐๅบ็จ็จๅบ็ชๅฃๅคงๅฐใ็ชๅฃๆ ้ขใ่ฆไฝฟ็จ็่ตๆบ็ญๅบ็จ็จๅบ้
็ฝฎใๅบๆฌๅบ็จ็จๅบๅฏ่ฝๅฆไธๆ็คบ๏ผ
+ไธปๅบ็จ็จๅบ็ฑๅฏน`wails.Run()`็่ฐ็จ็ปๆ. ๅฎๆฅๅๆ่ฟฐๅบ็จ็จๅบ็ชๅฃๅคงๅฐใ็ชๅฃๆ ้ขใ่ฆไฝฟ็จ็่ตๆบ็ญๅบ็จ็จๅบ้
็ฝฎใ It accepts the application configuration which describes the size of the application window, the window title, what assets to use, etc. ๅบๆฌๅบ็จ็จๅบๅฏ่ฝๅฆไธๆ็คบ๏ผ
```go title="main.go"
package main
import (
- "embed"
- "log"
+ "embed"
+ "log"
- "github.com/wailsapp/wails/v2"
- "github.com/wailsapp/wails/v2/pkg/options"
+ "github.com/wailsapp/wails/v2"
+ "github.com/wailsapp/wails/v2/pkg/options"
)
//go:embed frontend/dist
@@ -35,22 +32,22 @@ var assets embed.FS
func main() {
- app := &App{}
+ app := &App{}
- err := wails.Run(&options.App{
- Title: "Basic Demo",
- Width: 1024,
- Height: 768,
- Assets: &assets,
- OnStartup: app.startup,
- OnShutdown: app.shutdown,
- Bind: []interface{}{
- app,
- },
- })
- if err != nil {
- log.Fatal(err)
- }
+ err := wails.Run(&options.App{
+ Title: "Basic Demo",
+ Width: 1024,
+ Height: 768,
+ Assets: &assets,
+ OnStartup: app.startup,
+ OnShutdown: app.shutdown,
+ Bind: []interface{}{
+ app,
+ },
+ })
+ if err != nil {
+ log.Fatal(err)
+ }
}
@@ -84,50 +81,46 @@ func (b *App) Greet(name string) string {
#### ่ตๆบ
-`Assets` ้้กนๆฏๅฟ
้กป็๏ผๅ ไธบๆจไธ่ฝๆฅๆๆฒกๆๅ็ซฏ่ตๆบ็ Wails ๅบ็จ็จๅบใ่ฟไบ่ตๆบๅฏไปฅๆฏๆจๅธๆๅจ Web ๅบ็จ็จๅบไธญๆพๅฐ็ไปปไฝๆไปถ - htmlใjsใcssใsvgใpng ็ญใ
-**ไธ้่ฆ็ๆ่ตๆบๅ
** - ็บฏๆไปถๅณๅฏใๅฝๅบ็จ็จๅบๅฏๅจๆถ๏ผๅฎๅฐๅฐ่ฏไปๆจ็่ตๆบไธญๅ ่ฝฝ`index.html`๏ผๅนถไธ้ฃๆถ่ตทๅ็ซฏๅบๆฌไธๅฐไฝไธบๆต่งๅจๅทฅไฝใๅผๅพๆณจๆ็ๆฏ`embed.FS`ๅฏนๆไปถๆๅจ็ไฝ็ฝฎๆฒกๆ่ฆๆฑใๅตๅ
ฅ่ทฏๅพๅพๅฏ่ฝไฝฟ็จไบ็ธๅฏนไบๆจ็ไธปๅบ็จ็จๅบไปฃ็ ็ๅตๅฅ็ฎๅฝ๏ผไพๅฆ `frontend/dist`๏ผ
+`Assets` ้้กนๆฏๅฟ
้กป็๏ผๅ ไธบๆจไธ่ฝๆฅๆๆฒกๆๅ็ซฏ่ตๆบ็ Wails ๅบ็จ็จๅบใ ่ฟไบ่ตๆบๅฏไปฅๆฏๆจๅธๆๅจ Web ๅบ็จ็จๅบไธญๆพๅฐ็ไปปไฝๆไปถ - htmlใjsใcssใsvgใpng ็ญใ **ไธ้่ฆ็ๆ่ตๆบๅ
** - ็บฏๆไปถๅณๅฏใ ๅฝๅบ็จ็จๅบๅฏๅจๆถ๏ผๅฎๅฐๅฐ่ฏไปๆจ็่ตๆบไธญๅ ่ฝฝ`index.html`๏ผๅนถไธ้ฃๆถ่ตทๅ็ซฏๅบๆฌไธๅฐไฝไธบๆต่งๅจๅทฅไฝใ ๅผๅพๆณจๆ็ๆฏ`embed.FS`ๅฏนๆไปถๆๅจ็ไฝ็ฝฎๆฒกๆ่ฆๆฑใ ๅตๅ
ฅ่ทฏๅพๅพๅฏ่ฝไฝฟ็จไบ็ธๅฏนไบๆจ็ไธปๅบ็จ็จๅบไปฃ็ ็ๅตๅฅ็ฎๅฝ๏ผไพๅฆ `frontend/dist`๏ผ
```go title="main.go"
//go:embed frontend/dist
var assets embed.FS
```
-ๅฏๅจๆถ๏ผWails ๅฐ้ๅๅตๅ
ฅ็ๆไปถ๏ผๅฏปๆพๅ
ๅซ็`index.html`ใๆๆๅ
ถไป่ตๆบๅฐ็ธๅฏนไบ่ฏฅ็ฎๅฝๅ ่ฝฝใ
+ๅฏๅจๆถ๏ผWails ๅฐ้ๅๅตๅ
ฅ็ๆไปถ๏ผๅฏปๆพๅ
ๅซ็`index.html`ใ ๆๆๅ
ถไป่ตๆบๅฐ็ธๅฏนไบ่ฏฅ็ฎๅฝๅ ่ฝฝใ
็ฑไบๅฏ็จไบ็ไบง็ไบ่ฟๅถๆไปถไฝฟ็จๅ
ๅซๅจ`embed.FS`ไธญ็ๆไปถ๏ผๅ ๆญคๅบ็จ็จๅบไธ้่ฆ้ๅธฆไปปไฝๅค้จๆไปถใ
-ๅฝไฝฟ็จ`wails dev`ๅฝไปคๅจโๅผๅโๆจกๅผไธ๏ผ่ตๆบไป็ฃ็ๅ ่ฝฝ๏ผไปปไฝๆดๆน้ฝไผๅฏผ่ดโๅฎๆถ้ๆฐๅ ่ฝฝโใ่ตๆบ็ไฝ็ฝฎ้่ฆไฝฟ็จ`-assetdir`ไผ ้็ป`wails dev`ๅฝไปค๏ผๅนถไธๅพๅฏ่ฝไธๅตๅ
ฅ่ทฏๅพ็ธๅใ
-ๅธๆๅฐๆฅๆไปฌๅฏไปฅไป`embed.FS`ๆฌ่บซ่ฎก็ฎๅบๆฅใ
+ๅฝไฝฟ็จ`wails dev`ๅฝไปคๅจโๅผๅโๆจกๅผไธ๏ผ่ตๆบไป็ฃ็ๅ ่ฝฝ๏ผไปปไฝๆดๆน้ฝไผๅฏผ่ดโๅฎๆถ้ๆฐๅ ่ฝฝโใ ่ตๆบ็ไฝ็ฝฎ้่ฆไฝฟ็จ`-assetdir`ไผ ้็ป`wails dev`ๅฝไปค๏ผๅนถไธๅพๅฏ่ฝไธๅตๅ
ฅ่ทฏๅพ็ธๅใ ๅธๆๅฐๆฅๆไปฌๅฏไปฅไป`embed.FS`ๆฌ่บซ่ฎก็ฎๅบๆฅใ
ๆดๅค็ป่ๅฏไปฅๅจ[ๅบ็จ็จๅบๅผๅๆๅ](./guides/application-development)ไธญๆพๅฐใ
#### ๅบ็จ็จๅบ็ๅฝๅจๆๅ่ฐ
-ๅจๅณๅฐๅ ่ฝฝๅ็ซฏ`index.html`ไนๅ๏ผๅฏน [ๅบ็จๅฏๅจๅ่ฐ](./reference/options#ๅบ็จๅฏๅจๅ่ฐ) ไธญๆไพ็ๅฝๆฐ่ฟ่ก่ฐ็จใไธไธชๆ ๅ็ Go ไธไธๆ่ขซไผ ้็ป่ฟไธชๆนๆณใ
-่ฐ็จ่ฟ่กๆถ้่ฆๆญคไธไธๆ๏ผๅ ๆญคๆ ๅๆนๅผๆฏไฟๅญๆญคๆถๅฏนๅฎ็ๅผ็จใๅจๅบ็จ็จๅบๅ
ณ้ญไนๅ๏ผๅๆฌกไฝฟ็จไธไธๆไปฅๅๆ ท็ๆนๅผ่ฐ็จ [ๅบ็จ้ๅบๅ่ฐ](./reference/options#ๅบ็จ้ๅบๅ่ฐ)ใๅฝๅ็ซฏๅฎๆๅ ่ฝฝ`index.html`ไธญๆๆ่ตๆบๆถ๏ผ่ฟๆไธไธช [ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](./reference/options#ๅ็ซฏ-dom-ๅ ่ฝฝๅฎๆๅ่ฐ) ๏ผ็ธๅฝไบ Javascript ไธญ็`body onload`ไบไปถใ่ฟๅฏไปฅ้่ฟ่ฎพ็ฝฎ [ๅ
ณ้ญๅบ็จ็จๅบไนๅๅ่ฐ](./reference/options#ๅ
ณ้ญๅบ็จ็จๅบไนๅๅ่ฐ) ้้กนๆฅๆงๅถ็ชๅฃๅ
ณ้ญ๏ผๆๅบ็จ็จๅบ้ๅบ๏ผไบไปถใ
+ๅจๅณๅฐๅ ่ฝฝๅ็ซฏ`index.html`ไนๅ๏ผๅฏน [ๅบ็จๅฏๅจๅ่ฐ](./reference/options#ๅบ็จๅฏๅจๅ่ฐ) ไธญๆไพ็ๅฝๆฐ่ฟ่ก่ฐ็จใ ไธไธชๆ ๅ็ Go ไธไธๆ่ขซไผ ้็ป่ฟไธชๆนๆณใ ่ฐ็จ่ฟ่กๆถ้่ฆๆญคไธไธๆ๏ผๅ ๆญคๆ ๅๆนๅผๆฏไฟๅญๆญคๆถๅฏนๅฎ็ๅผ็จใ ๅจๅบ็จ็จๅบๅ
ณ้ญไนๅ๏ผๅๆฌกไฝฟ็จไธไธๆไปฅๅๆ ท็ๆนๅผ่ฐ็จ [ๅบ็จ้ๅบๅ่ฐ](./reference/options#ๅบ็จ้ๅบๅ่ฐ)ใ ๅฝๅ็ซฏๅฎๆๅ ่ฝฝ`index.html`ไธญๆๆ่ตๆบๆถ๏ผ่ฟๆไธไธช [ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](./reference/options#ๅ็ซฏ-dom-ๅ ่ฝฝๅฎๆๅ่ฐ) ๏ผ็ธๅฝไบ Javascript ไธญ็`body onload`ไบไปถใ ่ฟๅฏไปฅ้่ฟ่ฎพ็ฝฎ [ๅ
ณ้ญๅบ็จ็จๅบไนๅๅ่ฐ](./reference/options#ๅ
ณ้ญๅบ็จ็จๅบไนๅๅ่ฐ) ้้กนๆฅๆงๅถ็ชๅฃๅ
ณ้ญ๏ผๆๅบ็จ็จๅบ้ๅบ๏ผไบไปถใ
#### ๆนๆณ็ปๅฎ
-`Bind`้้กนๆฏ Wails ๅบ็จ็จๅบไธญๆ้่ฆ็ๅๆฐ้้กนไนไธใๅฎๆๅฎๅๅ็ซฏๆด้ฒๅชไบ็ปๆๆนๆณใๅฝๅบ็จ็จๅบๅฏๅจๆถ๏ผๅฎไผๆฃๆฅ `Bind` ไธญๅๅบ็็ปๆๅฎไพ๏ผ
-็กฎๅฎๅชไบๆนๆณๆฏๅ
ฌๅผ็๏ผไปฅๅคงๅๅญๆฏๅผๅคด๏ผ๏ผๅนถๅฐ็ๆๅ็ซฏๅฏไปฅ่ฐ็จ็้ฃไบๆนๆณ็ Javascript ็ๆฌใ
+`Bind`้้กนๆฏ Wails ๅบ็จ็จๅบไธญๆ้่ฆ็ๅๆฐ้้กนไนไธใ ๅฎๆๅฎๅๅ็ซฏๆด้ฒๅชไบ็ปๆๆนๆณใ Think of structs like "controllers" in a traditional web application. ๅฝๅบ็จ็จๅบๅฏๅจๆถ๏ผๅฎไผๆฃๆฅ `Bind` ไธญๅๅบ็็ปๆๅฎไพ๏ผ ็กฎๅฎๅชไบๆนๆณๆฏๅ
ฌๅผ็๏ผไปฅๅคงๅๅญๆฏๅผๅคด๏ผ๏ผๅนถๅฐ็ๆๅ็ซฏๅฏไปฅ่ฐ็จ็้ฃไบๆนๆณ็ Javascript ็ๆฌใ
:::info ๆณจๆ
-Wails ่ฆๆฑๆจไผ ๅ
ฅ็ปๆ็ _ๅฎไพ_ ๆ่ฝๆญฃ็กฎ็ปๅฎๅฎ
+ Wails ่ฆๆฑๆจไผ ๅ
ฅ็ปๆ็ _ๅฎไพ_ ๆ่ฝๆญฃ็กฎ็ปๅฎๅฎ
:::
ๅจๆญค็คบไพไธญ๏ผๆไปฌๅๅปบไธไธชๆฐ`App`ๅฎไพ๏ผ็ถๅๅฐๆญคๅฎไพๆทปๅ ๅฐ`wails.Run`ไธญ็`Bind`้้กน๏ผ
-```go {16,26} title="main.go"
+```go {16,24} title="main.go"
package main
import (
- "embed"
- "log"
+ "embed"
+ "log"
- "github.com/wailsapp/wails/v2"
- "github.com/wailsapp/wails/v2/pkg/options"
+ "github.com/wailsapp/wails/v2"
+ "github.com/wailsapp/wails/v2/pkg/options"
)
//go:embed frontend/dist
@@ -135,22 +128,20 @@ var assets embed.FS
func main() {
- app := &App{}
+ app := &App{}
- err := wails.Run(&options.App{
- Title: "Basic Demo",
- Width: 1024,
- Height: 768,
- Assets: &assets,
- OnStartup: app.startup,
- OnShutdown: app.shutdown,
- Bind: []interface{}{
- app,
- },
- })
- if err != nil {
- log.Fatal(err)
- }
+ err := wails.Run(&options.App{
+ Title: "Basic Demo",
+ Width: 1024,
+ Height: 768,
+ Assets: &assets,
+ Bind: []interface{}{
+ app,
+ },
+ })
+ if err != nil {
+ log.Fatal(err)
+ }
}
@@ -158,76 +149,73 @@ type App struct {
ctx context.Context
}
-func (b *App) startup(ctx context.Context) {
- b.ctx = ctx
-}
-
-func (b *App) shutdown(ctx context.Context) {}
-
-func (b *App) Greet(name string) string {
+func (a *App) Greet(name string) string {
return fmt.Sprintf("Hello %s!", name)
}
```
-ๆจๅฏไปฅ็ปๅฎไปปๆๆฐ้็็ปๆไฝใๅช้็กฎไฟๅๅปบๅฎ็ไธไธชๅฎไพๅนถๅฐๅ
ถไผ ้็ป `Bind`๏ผ
+ๆจๅฏไปฅ็ปๅฎไปปๆๆฐ้็็ปๆไฝใ ๅช้็กฎไฟๅๅปบๅฎ็ไธไธชๅฎไพๅนถๅฐๅ
ถไผ ้็ป `Bind`๏ผ
-```go {10-12}
-...
- err := wails.Run(&options.App{
- Title: "Basic Demo",
- Width: 1024,
- Height: 768,
- Assets: &assets,
- OnStartup: app.startup,
- OnShutdown: app.shutdown,
- Bind: []interface{}{
- app,
- &mystruct1{},
- &mystruct2{},
- },
- })
+```go {8-10}
+ //...
+ ...
+ err := wails.Run(&options.App{
+ Title: "Basic Demo",
+ Width: 1024,
+ Height: 768,
+ Assets: &assets,
+ OnStartup: app.startup,
+ OnShutdown: app.shutdown,
+ Bind: []interface{}{
+ app,
+ &mystruct1{},
+ &mystruct2{},
+ },
+ })
...
+
```
-่ฟไบๆนๆณไฝไบๅ็ซฏ `window.go.
..`ใๅจไธ้ข็ไพๅญไธญ๏ผๆไปฌ็ปๅฎ `app`๏ผๅฎๆไธไธชๅ
ฌๅผๆนๆณ `Greet`ใ่ฟๅฏไปฅ้่ฟๅจ `Javascript` ไธญ็จ `window.go.main.App.Greet`่ฐ็จใ่ฟไบๆนๆณ่ฟๅไธไธช Promiseใๆๅ็่ฐ็จๅฐๅฏผ่ด Go ่ฐ็จ็็ฌฌไธไธช่ฟๅๅผ่ขซไผ ้็ป `resolve` ๅค็็จๅบใไธไธชไธๆๅ็่ฐ็จๆฏๅฐไธไธช Go ๆนๆณ็็ฌฌไบไธช้่ฏฏ็ฑปๅ่ฟๅๅผ้่ฟ`reject`ไผ ้ๅ่ฐ็จ่
ใๅจไธ้ข็ไพๅญไธญ๏ผGreet ๅช่ฟๅไธไธชๅญ็ฌฆไธฒ๏ผๆไปฅ `Javascript` ่ฐ็จๆฐธ่ฟไธไผ`reject` - ้ค้ๅฐๆ ๆๆฐๆฎไผ ้็ปๅฎใ
+When you run `wails dev` (or `wails generate module`), a frontend module will be generated containing the following:
+ - ่ฐ็จ็ปๅฎ็ Go ๆนๆณ
+ - ่ฐ็จ่ฟ่กๆถๆนๆณ
+ - Typescript definitions for all Go structs used as inputs or outputs by the bound methods
-ๆๆๆฐๆฎ็ฑปๅ้ฝๅจ Go ๅ Javascript ไน้ดๆญฃ็กฎ่ฝฌๆขใๅ
ๆฌ็ปๆไฝใๅฆๆๆจไป Go ่ฐ็จ่ฟๅไธไธช็ปๆไฝ๏ผๅฎๅฐไฝไธบ `Javascript` Map ่ฟๅๅฐๆจ็ๅ็ซฏใ
-ๆณจๆ๏ผๅฆๆๆจๆณไฝฟ็จ็ปๆไฝ๏ผๆจๅฟ
้กปไธบๆจ็็ปๆไฝๅญๆฎตๅฎไน`json` ๆ ็ญพ๏ผ
-
-:::info ๆณจๆ
-็ฎๅไธๆฏๆๅตๅฅๅฟๅ็ปๆไฝใ
-:::
-
-ไนๅฏไปฅๅฐ็ปๆไฝๅ้ๅ Goใไปปไฝไฝไธบๆๆ็ปๆ็ๅๆฐไผ ้็ Javascript Map ้ฝๅฐ่ฝฌๆขไธบ่ฏฅ็ปๆ็ฑปๅใ
-ไธบไบไฝฟ่ฟไธช่ฟ็จๆดๅฎนๆ๏ผๅจ `ๅผๅ`ๆจกๅผไธ๏ผไผ็ๆไธไธช TypeScript ๆจกๅ๏ผๅฎไน็ปๅฎๆนๆณไธญไฝฟ็จ็ๆๆ็ปๆ็ฑปๅใไฝฟ็จๆญคๆจกๅ๏ผๅฏไปฅๆๅปบๅ็ Javascript ๅฏน่ฑกๅนถๅฐๅ
ถๅ้ๅฐ Go ไปฃ็ ใ
-
-ๅ
ณไบ็ปๅฎ็ๆดๅคไฟกๆฏๅฏไปฅๅจ[ๅบ็จ็จๅบๅผๅๆๅ](./guides/application-development)็[็ปๅฎๆนๆณ](./guides/application-development#็ปๅฎๆนๆณ)ไธ่ไธญๆพๅฐใ
+This makes it incredibly simple to call Go code from the frontend, using the same strongly typed datastructures.
## ๅ็ซฏ
### ๆฆ่ฟฐ
-ๅ็ซฏๆฏ็ฑ webkit ๆธฒๆ็ๆไปถ้ๅใ่ฟๅฐฑๅๆต่งๅจๅ็ฝ็ปๆๅกๅจๅไบไธบไธใๆจๅฏไปฅไฝฟ็จ็ๆกๆถๆๅบ[^1]ๅ ไนๆฒกๆ้ๅถใๅ็ซฏๅ Go ไปฃ็ ไน้ด็ไธป่ฆไบคไบ็นๆฏ๏ผ
+ๅ็ซฏๆฏ็ฑ webkit ๆธฒๆ็ๆไปถ้ๅใ ่ฟๅฐฑๅๆต่งๅจๅ็ฝ็ปๆๅกๅจๅไบไธบไธใ ๆจๅฏไปฅไฝฟ็จ็ๆกๆถๆๅบ[^1]ๅ ไนๆฒกๆ้ๅถใ ๅ็ซฏๅ Go ไปฃ็ ไน้ด็ไธป่ฆไบคไบ็นๆฏ๏ผ
-- ่ฐ็จ็ปๅฎ็ Go ๆนๆณ
-- ่ฐ็จ่ฟ่กๆถๆนๆณ
+- Calling bound Go methods
+- Calling runtime methods
-[^1]: ๆไธๅฐ้จๅๅบไฝฟ็จไบ WebView ไธญไธๆฏๆ็ๅ่ฝใๅฏนไบ่ฟ็งๆ
ๅต๏ผ้ๅธธๆๆฟไปฃๆนๆกๅ่งฃๅณๆนๆณใ
+### Calling bound Go methods
-### ่ฐ็จ็ปๅฎ็ Go ๆนๆณ
+ๅจ`ๅผๅ`ๆจกๅผไธ่ฟ่กๅบ็จ็จๅบๆถ๏ผไผ็ๆไธไธช javascript ๆจกๅ๏ผ่ฏฅๆจกๅ็จ JSDoc ๆณจ้ๅ
่ฃ
่ฟไบๆนๆณใ ่ฟ็กฎๅฎๆๅฉไบๅผๅ๏ผๅฐคๅ
ถๆฏๅ ไธบๅคงๅคๆฐ IDE ๅฐๅค็ JSDoc ไปฅๆไพไปฃ็ ๅฎๆๅ็ฑปๅๆ็คบใ ่ฏฅๆจกๅๅไธบ`go` ๅนถๅจ`wailsjsdir`ๆ ๅฟๆๅฎ็็ฎๅฝไธญ็ๆใ The generated files mirror the package names in your application. ๅจไธ้ข็ไพๅญไธญ๏ผๆไปฌ็ปๅฎ `app`๏ผๅฎๆไธไธชๅ
ฌๅผๆนๆณ `Greet`ใ This will lead to the generation of the following files:
-ๆๆ็ปๅฎ็ Go ๆนๆณ้ฝๅฏไปฅๅจ`window.go...`่ฐ็จ. ๅฆไธไธ่ๆ่ฟฐ๏ผ่ฟไบๆนๆณ่ฟๅไธไธช Promise๏ผ
-ๅ
ถไธญๆๅ่ฐ็จๅฐๅผ่ฟๅ็ป resolve ๅค็็จๅบ๏ผ้่ฏฏๅฐๅผ่ฟๅ็ป reject ๅค็็จๅบใ
-
-```go title="mycode.js"
- window.go.main.App.Greet("Bill").then((result) => {
+```bash
+window.go.main.App.Greet("Bill").then((result) => {
console.log("The greeting is: " + result);
})
```
+Here we can see that there is a `main` package that contains the Javascript bindings for the bound `App` struct, as well as the Typescript declaration file for those methods. To call `Greet` from our frontend, we simply import the method and call it like a regular Javascript function:
-ๅจ`ๅผๅ`ๆจกๅผไธ่ฟ่กๅบ็จ็จๅบๆถ๏ผไผ็ๆไธไธช javascript ๆจกๅ๏ผ่ฏฅๆจกๅ็จ JSDoc ๆณจ้ๅ
่ฃ
่ฟไบๆนๆณใ่ฟ็กฎๅฎๆๅฉไบๅผๅ๏ผๅฐคๅ
ถๆฏๅ ไธบๅคงๅคๆฐ IDE ๅฐๅค็ JSDoc ไปฅๆไพไปฃ็ ๅฎๆๅ็ฑปๅๆ็คบใ่ฏฅๆจกๅๅไธบ`go` ๅนถๅจ`wailsjsdir`ๆ ๅฟๆๅฎ็็ฎๅฝไธญ็ๆใๅจ่ฟไธชๆจกๅไธญๆไธไธช`bindings.js`็ๆไปถ๏ผๅ
ถไธญๅ
ๅซ่ฟไบๅ
่ฃ
ๅจใๅฏนไบไธ้ข็็คบไพ๏ผ่ฏฅๆไปถๅ
ๅซไปฅไธไปฃ็ ๏ผ
+```javascript
+ // ...
+ import {Greet} from '../wailsjs/go/main/App'
-```js title="bindings.js"
+ function doGreeting(name) {
+ Greet(name).then((result) => {
+ // Do something with result
+ })
+ }
+```
+The Typescript declaration file gives you the correct types for the bound methods:
+
+```ts
const go = {
main: {
App: {
@@ -245,53 +233,40 @@ const go = {
export default go;
```
-#### ๆฏๆ็ปๆไฝ
+่ฟไบๆนๆณ่ฟๅไธไธช Promiseใ ๆๅ็่ฐ็จๅฐๅฏผ่ด Go ่ฐ็จ็็ฌฌไธไธช่ฟๅๅผ่ขซไผ ้็ป `resolve` ๅค็็จๅบใ ไธไธชไธๆๅ็่ฐ็จๆฏๅฐไธไธช Go ๆนๆณ็็ฌฌไบไธช้่ฏฏ็ฑปๅ่ฟๅๅผ้่ฟ`reject`ไผ ้ๅ่ฐ็จ่
ใ This is passed back via the `reject` handler. ๅจไธ้ข็ไพๅญไธญ๏ผGreet ๅช่ฟๅไธไธชๅญ็ฌฆไธฒ๏ผๆไปฅ `Javascript` ่ฐ็จๆฐธ่ฟไธไผ`reject` - ้ค้ๅฐๆ ๆๆฐๆฎไผ ้็ปๅฎใ
-่ฟ้ขๅคๆฏๆๅจๅ
ถ็ญพๅไธญไฝฟ็จ็ปๆ็ Go ๆนๆณใๆๆ็ฑ็ปๅฎๆนๆณๆๅฎ็ Go ็ปๆไฝ๏ผไฝไธบๅๆฐๆ่ฟๅ็ฑปๅ๏ผ้ฝๅฐ่ชๅจ็ๆ Typescript ็ๆฌไฝไธบ Go ไปฃ็ ๅ
่ฃ
ๅจๆจกๅ็ไธ้จๅใ
-ไฝฟ็จ่ฟไบ๏ผๅฏไปฅๅจ Go ๅ Javascript ไน้ดๅ
ฑไบซ็ธๅ็ๆฐๆฎๆจกๅใ่ฟไบๆจกๅไธ JSDoc ๆณจ้ไธ่ด๏ผๆฏๆ IDE ไปฃ็ ่ชๅจๅฎๆใ
+ๆๆๆฐๆฎ็ฑปๅ้ฝๅจ Go ๅ Javascript ไน้ดๆญฃ็กฎ่ฝฌๆขใ ๅ
ๆฌ็ปๆไฝใ ๅฆๆๆจไป Go ่ฐ็จ่ฟๅไธไธช็ปๆไฝ๏ผๅฎๅฐไฝไธบ `Javascript` Map ่ฟๅๅฐๆจ็ๅ็ซฏใ ๆณจๆ๏ผๅฆๆๆจๆณไฝฟ็จ็ปๆไฝ๏ผๆจๅฟ
้กปไธบๆจ็็ปๆไฝๅญๆฎตๅฎไน`json` ๆ ็ญพ๏ผ
-็คบไพ๏ผๆไปฌๆดๆฐๆไปฌ็`Gree`ๆนๆณไปฅๆฅๅไธไธช`Person`่ไธๆฏๅญ็ฌฆไธฒ๏ผ
+:::info ๆณจๆ
+็ฎๅไธๆฏๆๅตๅฅๅฟๅ็ปๆไฝใ
+:::
-```go title="main.go"
-type Person struct {
- Name string `json:"name"`
- Age uint8 `json:"age"`
- Address *Address `json:"address"`
-}
+ไนๅฏไปฅๅฐ็ปๆไฝๅ้ๅ Goใ ไปปไฝไฝไธบๆๆ็ปๆ็ๅๆฐไผ ้็ Javascript Map ้ฝๅฐ่ฝฌๆขไธบ่ฏฅ็ปๆ็ฑปๅใ ไธบไบไฝฟ่ฟไธช่ฟ็จๆดๅฎนๆ๏ผๅจ `ๅผๅ`ๆจกๅผไธ๏ผไผ็ๆไธไธช TypeScript ๆจกๅ๏ผๅฎไน็ปๅฎๆนๆณไธญไฝฟ็จ็ๆๆ็ปๆ็ฑปๅใ ไฝฟ็จๆญคๆจกๅ๏ผๅฏไปฅๆๅปบๅ็ Javascript ๅฏน่ฑกๅนถๅฐๅ
ถๅ้ๅฐ Go ไปฃ็ ใ
-type Address struct {
- Street string `json:"street"`
- Postcode string `json:"postcode"`
-}
-
-func (a *App) Greet(p Person) string {
- return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age)
-}
-```
-
-ๆไปฌ็`bindings.js`ๆไปถ็ฐๅทฒๆดๆฐไปฅๅๆ ๆดๆน๏ผ
-
-```js title="bindings.js"
-const go = {
- main: {
- App: {
- /**
- * Greet
- * @param {Person} arg1 - Go Type: main.Person
- * @returns {Promise} - Go Type: string
- */
- Greet: (arg1) => {
- return window.go.main.App.Greet(arg1);
- },
- },
- },
-};
-export default go;
-```
+่ฟ้ขๅคๆฏๆๅจๅ
ถ็ญพๅไธญไฝฟ็จ็ปๆ็ Go ๆนๆณใ ๆๆ็ฑ็ปๅฎๆนๆณๆๅฎ็ Go ็ปๆไฝ๏ผไฝไธบๅๆฐๆ่ฟๅ็ฑปๅ๏ผ้ฝๅฐ่ชๅจ็ๆ Typescript ็ๆฌไฝไธบ Go ไปฃ็ ๅ
่ฃ
ๅจๆจกๅ็ไธ้จๅใ ไฝฟ็จ่ฟไบ๏ผๅฏไปฅๅจ Go ๅ Javascript ไน้ดๅ
ฑไบซ็ธๅ็ๆฐๆฎๆจกๅใ
ๆญคๅค`bindings.js`๏ผ่ฟๆไธไธชๅไธบ`models.ts`็ๆไปถ. ่ฟๅ
ๅซๆไปฌ Go ็ปๆไฝ็ TypeScript ๅฝขๅผ๏ผ
-```ts title="models.ts"
+```go title="main.go"
+type Person struct {
+ Name string `json:"name"`
+ Age uint8 `json:"age"`
+ Address *Address `json:"address"`
+}
+
+type Address struct {
+ Street string `json:"street"`
+ Postcode string `json:"postcode"`
+}
+
+func (a *App) Greet(p Person) string {
+ return fmt.Sprintf("Hello %s (Age: %d)!", p.Name, p.Age)
+}
+```
+
+ๅช่ฆๆจๅฐ TypeScript ไฝไธบๅ็ซฏๆๅปบ้
็ฝฎ็ไธ้จๅ๏ผๆจๅฐฑๅฏไปฅ้่ฟไปฅไธๆนๅผไฝฟ็จ่ฟไบๆจกๅ๏ผ
+
+```js title="App.js"
export class Address {
street: string;
postcode: string;
@@ -342,9 +317,9 @@ export class Person {
}
```
-ๅช่ฆๆจๅฐ TypeScript ไฝไธบๅ็ซฏๆๅปบ้
็ฝฎ็ไธ้จๅ๏ผๆจๅฐฑๅฏไปฅ้่ฟไปฅไธๆนๅผไฝฟ็จ่ฟไบๆจกๅ๏ผ
+JSDoc ๅ TypeScript ็ๆๆจกๅ็็ปๅๆๆไบไธไธชๅผบๅคง็ๅผๅ็ฏๅขใ
-```js title="mycode.js"
+```ts title="App.d.ts"
import go from "./wailsjs/go/bindings";
import { Person } from "./wailsjs/go/models";
@@ -360,9 +335,87 @@ function greet(name) {
}
```
-JSDoc ๅ TypeScript ็ๆๆจกๅ็็ปๅๆๆไบไธไธชๅผบๅคง็ๅผๅ็ฏๅขใ
+As we can see, the "main" namespace is imported from a new "models.ts" file. This file contains all the struct definitions used by our bound methods. In this example, this is a `Person` struct. If we look at `models.ts`, we can see how the models are defined:
-### ่ฐ็จ่ฟ่กๆถๆนๆณ
+```ts title="models.ts"
+export namespace main {
+
+ export class Address {
+ street: string;
+ postcode: string;
+
+ static createFrom(source: any = {}) {
+ return new Address(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this.street = source["street"];
+ this.postcode = source["postcode"];
+ }
+ }
+ export class Person {
+ name: string;
+ age: number;
+ address?: Address;
+
+ static createFrom(source: any = {}) {
+ return new Person(source);
+ }
+
+ constructor(source: any = {}) {
+ if ('string' === typeof source) source = JSON.parse(source);
+ this.name = source["name"];
+ this.age = source["age"];
+ this.address = this.convertValues(source["address"], Address);
+ }
+
+ convertValues(a: any, classs: any, asMap: boolean = false): any {
+ if (!a) {
+ return a;
+ }
+ if (a.slice) {
+ return (a as any[]).map(elem => this.convertValues(elem, classs));
+ } else if ("object" === typeof a) {
+ if (asMap) {
+ for (const key of Object.keys(a)) {
+ a[key] = new classs(a[key]);
+ }
+ return a;
+ }
+ return new classs(a);
+ }
+ return a;
+ }
+ }
+}
+```
+
+ๅฏไปฅๅจ[่ฟ่กๆถๅ่](./reference/runtime/intro)ไธญๆพๅฐๆๅ
ณ JS ่ฟ่กๆถ็ๆดๅค่ฏฆ็ปไฟกๆฏใ
+
+```js title="mycode.js"
+ const go = {
+ main: {
+ App: {
+ /**
+ * Greet
+ * @param {Person} arg1 - Go Type: main.Person
+ * @returns {Promise} - Go Type: string
+ */
+ Greet: (arg1) => {
+ return window.go.main.App.Greet(arg1);
+ },
+ },
+ },
+};
+export default go;
+```
+
+The combination of generated bindings and TypeScript models makes for a powerful development environment.
+
+ๅ
ณไบ็ปๅฎ็ๆดๅคไฟกๆฏๅฏไปฅๅจ[ๅบ็จ็จๅบๅผๅๆๅ](./guides/application-development)็[็ปๅฎๆนๆณ](./guides/application-development#็ปๅฎๆนๆณ)ไธ่ไธญๆพๅฐใ
+
+### Calling runtime methods
Javascript ่ฟ่กๆถไฝไบ`window.runtime`ๅนถๅ
ๅซ่ฎธๅคๆนๆณๆฅๆง่กๅ็งไปปๅก๏ผไพๅฆๅๅบไบไปถๆๆง่กๆฅๅฟ่ฎฐๅฝๆไฝ๏ผ
@@ -370,4 +423,6 @@ Javascript ่ฟ่กๆถไฝไบ`window.runtime`ๅนถๅ
ๅซ่ฎธๅคๆนๆณๆฅๆง่กๅ็ง
window.runtime.EventsEmit("my-event", 1);
```
-ๅฏไปฅๅจ[่ฟ่กๆถๅ่](./reference/runtime/intro)ไธญๆพๅฐๆๅ
ณ JS ่ฟ่กๆถ็ๆดๅค่ฏฆ็ปไฟกๆฏใ
+More details about the JS runtime can be found in the [Runtime Reference](reference/runtime/intro).
+
+[^1]: ๆไธๅฐ้จๅๅบไฝฟ็จไบ WebView ไธญไธๆฏๆ็ๅ่ฝใ ๅฏนไบ่ฟ็งๆ
ๅต๏ผ้ๅธธๆๆฟไปฃๆนๆกๅ่งฃๅณๆนๆณใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx
index 8e5c73299..f21eed41b 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/introduction.mdx
@@ -1,6 +1,4 @@
---
-title: ็ฎไป
-
sidebar_position: 1
---
@@ -12,46 +10,50 @@ Wails ๆฏไธไธชๅฏ่ฎฉๆจไฝฟ็จ Go ๅ Web ๆๆฏ็ผๅๆก้ขๅบ็จ็้กน็ฎใ
ๅฐๅฎ็ไฝไธบ Go ็ๅฟซๅนถไธ่ฝป้็ Electron ๆฟไปฃๅใ ๆจๅฏไปฅไฝฟ็จ Go ็็ตๆดปๆงๅๅผบๅคงๅ่ฝ๏ผ็ปๅไธฐๅฏ็็ฐไปฃๅ็ซฏ๏ผ่ฝปๆพ็ๆๅปบๅบ็จ็จๅบใ
-Wails ไธ็นไนไธๅผฑ๏ผ่ฟๆฏ [xbar](https://xbarapp.com) - ไธไธชไฝฟ็จ Wails ็ผๅ็ MacOS ๆก้ขๅบ็จใๅฎไฝฟ็จ Mac ็็ณป็ปๅ็่ๅ๏ผๆฏๆๆต
่ฒๅๆทฑ่ฒๆก้ขไธป้ข๏ผไธป็ชๅฃไฝฟ็จๅ้ๆ๏ผไฝฟๅ
ถๅ
ทๆๅ็ๅบ็จ็โๅฐ้โ ๆๆใ
+Wails ไธ็นไนไธๅผฑ๏ผ ่ฟๆฏ [xbar](https://xbarapp.com) - ไธไธชไฝฟ็จ Wails ็ผๅ็ MacOS ๆก้ขๅบ็จใ ๅฎไฝฟ็จ Mac ็็ณป็ปๅ็่ๅ๏ผๆฏๆๆต
่ฒๅๆทฑ่ฒๆก้ขไธป้ข๏ผไธป็ชๅฃไฝฟ็จๅ้ๆ๏ผไฝฟๅ
ถๅ
ทๆๅ็ๅบ็จ็โๅฐ้โ ๆๆใ
-
-
-
-
-
+
+
+
+
+
## ๅ็ๅ
็ด
-Wails ไฝฟ็จไธ้จๆๅปบ็ๅบๆฅๅค็ๅ็ๅ
็ด ๏ผไพๅฆ็ชๅฃใ่ๅใๅฏน่ฏๆก็ญ๏ผๅ ๆญคๆจๅฏไปฅๆๅปบ็พ่งใๅ่ฝไธฐๅฏ็ๆก้ขๅบ็จ็จๅบใ
-
-**ๅฎไธๅตๅ
ฅๆต่งๅจ**๏ผๅ ๆญคๆง่ฝ้ซใ็ธๅ๏ผๅฎไฝฟ็จๅนณๅฐ็ๅ็ๆธฒๆๅผๆใๅจ Windows ไธ๏ผๆฏๅบไบ Chromium ๆๅปบ็ๆฐ Microsoft Webview2 ๅบใ
+Wails comes with a number of pre-configured templates that allow you to get your application up and running quickly. There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript and Typescript versions for each template.
## Go ๅ Javascript ไบๆไฝ
-Wails ่ชๅจไฝฟๆจ็ Go ๆนๆณๅฏ็จไบ Javascript๏ผๅ ๆญคๆจๅฏไปฅไปๅ็ซฏๆๅ็งฐ่ฐ็จๅฎไปฌ๏ผๅฎ็่ณไผ็ๆ Go ๆนๆณไฝฟ็จ็็ปๆไฝ็ Typescript ็ๆฌ๏ผๅ ๆญคๆจๅฏไปฅๅจ Go ๅ Javascript ไน้ดไผ ้็ธๅ็ๆฐๆฎ็ปๆใ
+Wails ไฝฟ็จไธ้จๆๅปบ็ๅบๆฅๅค็ๅ็ๅ
็ด ๏ผไพๅฆ็ชๅฃใ่ๅใๅฏน่ฏๆก็ญ๏ผๅ ๆญคๆจๅฏไปฅๆๅปบ็พ่งใๅ่ฝไธฐๅฏ็ๆก้ขๅบ็จ็จๅบใ
+
+**ๅฎไธๅตๅ
ฅๆต่งๅจ**๏ผๅ ๆญคๆง่ฝ้ซใ ็ธๅ๏ผๅฎไฝฟ็จๅนณๅฐ็ๅ็ๆธฒๆๅผๆใ ๅจ Windows ไธ๏ผๆฏๅบไบ Chromium ๆๅปบ็ๆฐ Microsoft Webview2 ๅบใ
## ่ฟ่กๆถๅบ
-Wails ไธบ Go ๅ Javascript ๆไพไบไธไธช่ฟ่กๆถๅบ๏ผๅฏไปฅๅค็็ฐไปฃๅบ็จ็จๅบ้่ฆ็ๅพๅคไธ่ฅฟ๏ผๆฏๅฆไบไปถใๆฅๅฟใๅฏน่ฏๆก็ญใ
+Wails ่ชๅจไฝฟๆจ็ Go ๆนๆณๅฏ็จไบ Javascript๏ผๅ ๆญคๆจๅฏไปฅไปๅ็ซฏๆๅ็งฐ่ฐ็จๅฎไปฌ๏ผ ๅฎ็่ณไผ็ๆ Go ๆนๆณไฝฟ็จ็็ปๆไฝ็ Typescript ็ๆฌ๏ผๅ ๆญคๆจๅฏไปฅๅจ Go ๅ Javascript ไน้ดไผ ้็ธๅ็ๆฐๆฎ็ปๆใ
## ๅฎๆถๅผๅไฝ้ช
-### ่ชๅจ้ๆฐๆๅปบ
-
-ๅฝๆจๅจโๅผๅโๆจกๅผไธ่ฟ่กๆจ็ๅบ็จ็จๅบๆถ๏ผWails ไผๅฐๆจ็ๅบ็จ็จๅบๆๅปบไธบๅ็ๆก้ขๅบ็จ็จๅบ๏ผไฝไผไป็ฃ็่ฏปๅๆจ็่ตๆบใๅฎๅฐๆฃๆตๆจ็ Go ไปฃ็ ็ไปปไฝๆดๆนๅนถ่ชๅจ้ๆฐๆๅปบๅ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบใ
-
-### ่ชๅจ้ๆฐๅ ่ฝฝ
-
ๅฝๆฃๆตๅฐๆจ็ๅบ็จ็จๅบ่ตๆบๅ็ๆดๆนๆถ๏ผๆจๆญฃๅจ่ฟ่ก็ๅบ็จ็จๅบๅฐโ้ๆฐๅ ่ฝฝโ๏ผๅ ไน็ซๅณๅ้ฆๆจ็ๆดๆนใ
-### ๅจๆต่งๅจไธญๅผๅๆจ็ๅบ็จ็จๅบ
-
-ๅฆๆๆจๆดๅๆฌขๅจๆต่งๅจไธญ่ฐ่ฏๅๅผๅ๏ผ้ฃไน Wails ๅฏไปฅๆปก่ถณๆจ็้ๆฑใๆญฃๅจ่ฟ่ก็ๅบ็จ็จๅบ่ฟๆไธไธช็ฝ็ปๆๅกๅจ๏ผๅฎๅฐๅจ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจไธญ่ฟ่กๆจ็ๅบ็จ็จๅบใๅฝๆจ็่ตๆบๅจ็ฃ็ไธๅ็ๅๅๆถ๏ผๅฎไผๅทๆฐใ
-
## ๅฏ็จไบ็ไบง็ๅ็ไบ่ฟๅถๆไปถ
-ๅฝๆจๅๅคๅฅฝๅฎๆๅบ็จ็จๅบ็ๆ็ปๆๅปบๆถ๏ผCLI ไผๅฐๅ
ถ็ผ่ฏไธบๅไธชๅฏๆง่กๆไปถ๏ผๅนถๅฐๆๆ่ตๆบๆๅ
ๅฐๅ
ถไธญใๅจ Windows ๅ MacOS ไธ๏ผๅฏไปฅๅๅปบ็จไบๅๅ็ๅ็ๅ
ใไฝฟ็จๆๅ
ๅทฅๅ
ทๅ็ๆ็่ตๆบ๏ผๅพๆ ใinfo.plistใๆธ
ๅๆไปถ็ญ๏ผๆฏๆจ้กน็ฎ็ไธ้จๅ๏ผๅฏไปฅ่ชๅฎไน๏ผ่ฎฉๆจๅฎๅ
จๆงๅถๅบ็จ็จๅบ็ๆๅปบๆนๅผใ
+### ่ชๅจ้ๆฐๆๅปบ
+
+ๅฝๆจๅจโๅผๅโๆจกๅผไธ่ฟ่กๆจ็ๅบ็จ็จๅบๆถ๏ผWails ไผๅฐๆจ็ๅบ็จ็จๅบๆๅปบไธบๅ็ๆก้ขๅบ็จ็จๅบ๏ผไฝไผไป็ฃ็่ฏปๅๆจ็่ตๆบใ ๅฎๅฐๆฃๆตๆจ็ Go ไปฃ็ ็ไปปไฝๆดๆนๅนถ่ชๅจ้ๆฐๆๅปบๅ้ๆฐๅฏๅจๆจ็ๅบ็จ็จๅบใ
+
+### ่ชๅจ้ๆฐๅ ่ฝฝ
+
+When changes to your application assets are detected, your running application will "reload", reflecting your changes almost immediately.
+
+### ๅจๆต่งๅจไธญๅผๅๆจ็ๅบ็จ็จๅบ
+
+ๅฆๆๆจๆดๅๆฌขๅจๆต่งๅจไธญ่ฐ่ฏๅๅผๅ๏ผ้ฃไน Wails ๅฏไปฅๆปก่ถณๆจ็้ๆฑใ ๆญฃๅจ่ฟ่ก็ๅบ็จ็จๅบ่ฟๆไธไธช็ฝ็ปๆๅกๅจ๏ผๅฎๅฐๅจ่ฟๆฅๅฐๅฎ็ไปปไฝๆต่งๅจไธญ่ฟ่กๆจ็ๅบ็จ็จๅบใ ๅฝๆจ็่ตๆบๅจ็ฃ็ไธๅ็ๅๅๆถ๏ผๅฎไผๅทๆฐใ
## ๅทฅๅ
ท
-Wails CLI ๆไพไบไธ็ง็ฎๅ็ๆนๆณๆฅ็ๆใๆๅปบๅๆๅ
ๆจ็ๅบ็จ็จๅบใๅฎๅฐๅฎๆๅๅปบๅพๆ ็็น้ๅทฅไฝ๏ผไฝฟ็จๆไฝณ่ฎพ็ฝฎ็ผ่ฏๆจ็ๅบ็จ็จๅบ๏ผๅนถๆไพๅฏๅๅ็ใๅฏ็จไบ็ไบง็ไบ่ฟๅถๆไปถใๅฏไปฅไป่ฎธๅคๅ
ฅ้จๆจกๆฟไธญ่ฟ่ก้ๆฉ๏ผไปฅๅฟซ้ๅฏๅจๅ่ฟ่ก๏ผ
+ๅฝๆจๅๅคๅฅฝๅฎๆๅบ็จ็จๅบ็ๆ็ปๆๅปบๆถ๏ผCLI ไผๅฐๅ
ถ็ผ่ฏไธบๅไธชๅฏๆง่กๆไปถ๏ผๅนถๅฐๆๆ่ตๆบๆๅ
ๅฐๅ
ถไธญใ ๅจ Windows ๅ MacOS ไธ๏ผๅฏไปฅๅๅปบ็จไบๅๅ็ๅ็ๅ
ใ ไฝฟ็จๆๅ
ๅทฅๅ
ทๅ็ๆ็่ตๆบ๏ผๅพๆ ใinfo.plistใๆธ
ๅๆไปถ็ญ๏ผๆฏๆจ้กน็ฎ็ไธ้จๅ๏ผๅฏไปฅ่ชๅฎไน๏ผ่ฎฉๆจๅฎๅ
จๆงๅถๅบ็จ็จๅบ็ๆๅปบๆนๅผใ
+
+## Tooling
+
+Wails CLI ๆไพไบไธ็ง็ฎๅ็ๆนๆณๆฅ็ๆใๆๅปบๅๆๅ
ๆจ็ๅบ็จ็จๅบใ ๅฎๅฐๅฎๆๅๅปบๅพๆ ็็น้ๅทฅไฝ๏ผไฝฟ็จๆไฝณ่ฎพ็ฝฎ็ผ่ฏๆจ็ๅบ็จ็จๅบ๏ผๅนถๆไพๅฏๅๅ็ใๅฏ็จไบ็ไบง็ไบ่ฟๅถๆไปถใ ๅฏไปฅไป่ฎธๅคๅ
ฅ้จๆจกๆฟไธญ่ฟ่ก้ๆฉ๏ผไปฅๅฟซ้ๅฏๅจๅ่ฟ่ก๏ผ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx
index 26fc6cda8..bad336a15 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/cli.mdx
@@ -1,11 +1,10 @@
---
-title: ๅฝไปค่ก
sidebar_position: 2
---
# ๅฝไปค่ก
-Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ่ก๏ผ
+Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใ ๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ่ก๏ผ
`wails <ๅฝไปค> <ๆ ๅฟ>`
@@ -13,19 +12,18 @@ Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ
`wails init` ็จไบ็ๆ้กน็ฎใ
-| ๆ ๅฟ | ๆ่ฟฐ | ้ป่ฎค |
-| :------------ | :---------------------------------------------------------------------------- | :-----: |
-| -n "้กน็ฎๅ็งฐ" | ้กน็ฎๅ็งฐใ **ๅผบๅถๅฟ
ๅกซ** | |
-| -d "้กน็ฎ็ฎๅฝ" | ่ฆๅๅปบ็้กน็ฎ็ฎๅฝ | ้กน็ฎๅ |
-| -g | ๅๅงๅ git ๅญๅจๅบ | |
-| -l | ๅฏ็จ้กน็ฎๆจกๆฟๅ่กจ | |
-| -q | ็ฆๆญข่พๅบๅฐๆงๅถๅฐ | |
-| -t "ๆจกๆฟๅ็งฐ" | ่ฆไฝฟ็จ็้กน็ฎๆจกๆฟใ่ฟๅฏ่ฝๆฏ้ป่ฎคๆจกๆฟ็ๅ็งฐๆๅจ github ไธๆ็ฎก็่ฟ็จๆจกๆฟ็ URL ใ | vanilla |
-| -ide | ็ๆ IDE ้กน็ฎๆไปถ | |
-| -f | ๅผบๅถๆๅปบๅบ็จ | ๅฆ |
+| ๆ ๅฟ | ๆ่ฟฐ | ้ป่ฎค |
+|:--------- |:---------------------------------------------- |:-------:|
+| -n "้กน็ฎๅ็งฐ" | ้กน็ฎๅ็งฐใ **ๅผบๅถๅฟ
ๅกซ** | |
+| -d "้กน็ฎ็ฎๅฝ" | ่ฆๅๅปบ็้กน็ฎ็ฎๅฝ | ้กน็ฎๅ |
+| -g | ๅๅงๅ git ๅญๅจๅบ | |
+| -l | ๅฏ็จ้กน็ฎๆจกๆฟๅ่กจ | |
+| -q | ็ฆๆญข่พๅบๅฐๆงๅถๅฐ | |
+| -t "ๆจกๆฟๅ็งฐ" | ่ฆไฝฟ็จ็้กน็ฎๆจกๆฟใ ่ฟๅฏ่ฝๆฏ้ป่ฎคๆจกๆฟ็ๅ็งฐๆๅจ github ไธๆ็ฎก็่ฟ็จๆจกๆฟ็ URL ใ | vanilla |
+| -ide | ็ๆ IDE ้กน็ฎๆไปถ | |
+| -f | ๅผบๅถๆๅปบๅบ็จ | ๅฆ |
-็คบไพ๏ผ
-`wails init -n test -d mytestproject -g -ide vscode -q`
+็คบไพ๏ผ `wails init -n test -d mytestproject -g -ide vscode -q`
่ฟๅฐๅจ "mytestproject" ็ฎๅฝ็ๆไธไธชๅไธบ "test" ็้กน็ฎ๏ผๅๅงๅ git๏ผ็ๆ vscode ้กน็ฎๆไปถๅนถ้้ปๆง่กใ
@@ -41,9 +39,9 @@ Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ
:::warning ๆณจๆ
-**Wails ้กน็ฎไธ็ปดๆคไนไธๅฏน็ฌฌ 3 ๆนๆจกๆฟ่ด่ดฃ**
+ **Wails ้กน็ฎไธ็ปดๆคไนไธๅฏน็ฌฌ 3 ๆนๆจกๆฟ่ด่ดฃ**
-ๅฆๆๆจไธไฟกไปปๆไธชๆจกๆฟ๏ผ่ฏทๆฃๆฅ `package.json` ๅ `wails.json` ไธญๅฎ่ฃ
็ๆจกๅๅ่ฟ่ก็่ๆฌใ
+ ๅฆๆๆจไธไฟกไปปๆไธชๆจกๆฟ๏ผ่ฏทๆฃๆฅ `package.json` ๅ `wails.json` ไธญๅฎ่ฃ
็ๆจกๅๅ่ฟ่ก็่ๆฌใ
:::
@@ -51,23 +49,26 @@ Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ
`wails build`็จไบๅฐๆจ็้กน็ฎ็ผ่ฏไธบ็ไบงๅฏ็จ็ไบ่ฟๅถๆไปถใ
-| ๆ ๅฟ | ๆ่ฟฐ | ้ป่ฎค |
-| :----------------- | :----------------------------------------------------------------------------------------------------------------------------- | :-------------------------- |
-| -platform | ไธบๆๅฎ็[ๅนณๅฐ](../reference/cli#ๅนณๅฐ)๏ผ้ๅทๅๅฒ๏ผๆๅปบ๏ผไพๅฆ๏ผ`windows/arm64`ใๆณจๆ๏ผๅฆๆๆฒกๆๆๅฎๆถๆ๏ผๅไฝฟ็จ`runtime.GOARCH`ใ | runtime.GOOS/runtime.GOARCH |
-| -clean | ๆธ
็`build/bin`็ฎๅฝ | |
-| -compiler "็ผ่ฏๅจ" | ไฝฟ็จไธๅ็ go ็ผ่ฏๅจๆฅๆๅปบ๏ผไพๅฆ go1.15beta1 | go |
-| -ldflags "ๆ ๅฟ" | ไผ ้็ป็ผ่ฏๅจ็้ขๅค ldflags | |
-| -nopackage | ไธๆๅ
ๅบ็จ็จๅบ | |
-| -o filename | ่พๅบๆไปถๅ | |
-| -s | ่ทณ่ฟๅ็ซฏๆๅปบ | |
-| -f | ๅผบๅถๆๅปบๅบ็จ | ๅฆ |
-| -tags "้ขๅคๆ ็ญพ" | ไผ ้็ป็ผ่ฏๅจๆๅปบๆ ็ญพ๏ผๅผๅทๅ็ฉบๆ ผๅ้๏ผ | |
-| -upx | ไฝฟ็จโupxโๅ็ผฉๆ็ปไบ่ฟๅถๆไปถ | |
-| -upxflags | ไผ ้็ป upx ็ๆ ๅฟ | |
-| -v int | ่ฏฆ็ป็บงๅซ (0 - silent, 1 - default, 2 - verbose) | 1 |
-| -webview2 | WebView2 ๅฎ่ฃ
็จๅบ็ญ็ฅ๏ผdownload,embed,browser,error. | download |
-| -u | ๆดๆฐ้กน็ฎ็ `go.mod` ไปฅไฝฟ็จไธ CLI ็ธๅ็ๆฌ็ Wails | |
-| -debug | ๅจๅบ็จ็จๅบไธญไฟ็่ฐ่ฏไฟกๆฏ | ๅฆ |
+| ๆ ๅฟ | ๆ่ฟฐ | ้ป่ฎค |
+|:-------------------- |:----------------------------------------------------------------------------------------------------------- |:--------------------------- |
+| -platform | ไธบๆๅฎ็[ๅนณๅฐ](../reference/cli#ๅนณๅฐ)๏ผ้ๅทๅๅฒ๏ผๆๅปบ๏ผไพๅฆ๏ผ`windows/arm64`ใ `windows/arm64`. ๆณจๆ๏ผๅฆๆๆฒกๆๆๅฎๆถๆ๏ผๅไฝฟ็จ`runtime.GOARCH`ใ | runtime.GOOS/runtime.GOARCH |
+| -clean | ๆธ
็`build/bin`็ฎๅฝ | |
+| -compiler "็ผ่ฏๅจ" | ไฝฟ็จไธๅ็ go ็ผ่ฏๅจๆฅๆๅปบ๏ผไพๅฆ go1.15beta1 | go |
+| -ldflags "ๆ ๅฟ" | ไผ ้็ป็ผ่ฏๅจ็้ขๅค ldflags | |
+| -nopackage | ไธๆๅ
ๅบ็จ็จๅบ | |
+| -o filename | ่พๅบๆไปถๅ | |
+| -s | ่ทณ่ฟๅ็ซฏๆๅปบ | ๅฆ |
+| -f | ๅผบๅถๆๅปบๅบ็จ | ๅฆ |
+| -tags "้ขๅคๆ ็ญพ" | ไผ ้็ป็ผ่ฏๅจๆๅปบๆ ็ญพ๏ผๅผๅทๅ็ฉบๆ ผๅ้๏ผ | |
+| -upx | ไฝฟ็จโupxโๅ็ผฉๆ็ปไบ่ฟๅถๆไปถ | |
+| -upxflags | ไผ ้็ป upx ็ๆ ๅฟ | |
+| -v int | ่ฏฆ็ป็บงๅซ (0 - silent, 1 - default, 2 - verbose) | 1 |
+| -webview2 | WebView2 ๅฎ่ฃ
็จๅบ็ญ็ฅ๏ผdownload,embed,browser,error. | download |
+| -u | ๆดๆฐ้กน็ฎ็ `go.mod` ไปฅไฝฟ็จไธ CLI ็ธๅ็ๆฌ็ Wails | |
+| -debug | ๅจๅบ็จ็จๅบไธญไฟ็่ฐ่ฏไฟกๆฏ Allows the use of the devtools in the application window | ๅฆ |
+| -trimpath | Remove all file system paths from the resulting executable. | ๅฆ |
+| -race | Build with Go's race detector | ๅฆ |
+| -platform "platform" | Keep the console window for Windows builds | ๅฆ |
ๆๅ
ณ`webview2`ๆ ๅฟ็่ฏฆ็ปๆ่ฟฐ๏ผ่ฏทๅ้
[Windows ็ณป็ป](../guides/windows)ๆๅใ
@@ -79,13 +80,13 @@ Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ
:::info ่นๆ่ฏ็ไธ็ UPX
-ๅจ่นๆ่ฏ็ไธไฝฟ็จ UPX ็ธๅ
ณ็[้ฎ้ข](https://github.com/upx/upx/issues/446)ใ
+ ๅจ่นๆ่ฏ็ไธไฝฟ็จ UPX ็ธๅ
ณ็[้ฎ้ข](https://github.com/upx/upx/issues/446)ใ
:::
:::info Windows ไธ็ UPX
-ไธไบ้ฒ็
ๆฏ่ฝฏไปถไพๅบๅ่ฏฏๅฐ`upx`ๅ็ผฉ็ไบ่ฟๅถๆไปถๆ ่ฎฐไธบ็
ๆฏ๏ผ่ฏทๆฅ็็ธๅ
ณ[้ฎ้ข](https://github.com/upx/upx/issues/437)ใ
+ ไธไบ้ฒ็
ๆฏ่ฝฏไปถไพๅบๅ่ฏฏๅฐ`upx`ๅ็ผฉ็ไบ่ฟๅถๆไปถๆ ่ฎฐไธบ็
ๆฏ๏ผ่ฏทๆฅ็็ธๅ
ณ[้ฎ้ข](https://github.com/upx/upx/issues/437)ใ
:::
@@ -93,8 +94,8 @@ Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ
ๆฏๆ็ๅนณๅฐๆ๏ผ
-| ๅนณๅฐ | ๆ่ฟฐ |
-| :--------------- | :-------------------------------------------- |
+| ๅนณๅฐ | ๆ่ฟฐ |
+|:---------------- |:--------------------------------------------- |
| darwin | MacOS + architecture of build machine |
| darwin/amd64 | MacOS 10.13+ AMD64 |
| darwin/arm64 | MacOS 11.0+ ARM64 |
@@ -106,17 +107,21 @@ Wails CLI ๆ่ฎธๅค็จไบ็ฎก็้กน็ฎ็ๅฝไปคใๆๆๅฝไปค้ฝไปฅๆญคๆนๅผ่ฟ
| linux/amd64 | Linux AMD64 |
| linux/arm64 | Linux ARM64 |
+
## ่ฏๆญๆฃๆฅ
`wails doctor` ๅฐ่ฟ่ก่ฏๆญ็จๅบไปฅ็กฎไฟๆจ็็ณป็ปๅทฒๅๅคๅฅฝ่ฟ่กๅผๅใ
-็คบไพ:
-
+็คบไพ๏ผ
```
Wails CLI v2.0.0-beta
Scanning system - Please wait (this may take a long time)...Done.
+Wails CLI v2.0.0-beta
+
+Scanning system - Please wait (this may take a long time)...Done.
+
System
------
OS: Windows 10 Pro
@@ -143,37 +148,39 @@ Your system is ready for Wails development!
## ๅผๅ
-`wails dev` ็จไบไปฅ "ๅฎๆถๅผๅ" ๆจกๅผ่ฟ่กๆจ็ๅบ็จใ่ฟๆๅณ็๏ผ
+`wails dev` ็จไบไปฅ "ๅฎๆถๅผๅ" ๆจกๅผ่ฟ่กๆจ็ๅบ็จใ ่ฟๆๅณ็๏ผ
-- ๅบ็จ็จๅบ็`go.mod`ๅฐ่ขซๆดๆฐไธบไธ Wails CLI ็ๆฌ็ธๅ็็ๆฌ
-- ๅบ็จ็จๅบ่ขซ็ผ่ฏๅนถ่ชๅจ่ฟ่ก
-- ไธไธช่งๅฏ่
่ขซๅฏๅจ๏ผๅฆๆๅฎๆฃๆตๅฐๆจ็ go ๆไปถ็ๅๅ๏ผๅฎๅฐ่งฆๅๆจ็ๅผๅๅบ็จ็จๅบ็้ๆฐๆๅปบ
-- ๅฏๅจไธไธช็ฝ็ปๆๅกๅจ`http://localhost:34115`๏ผ้่ฟ http ไธบๆจ็ๅบ็จ็จๅบ๏ผไธไป
ไป
ๆฏๅ็ซฏ๏ผๆไพๆๅกใ่ฟๅ
่ฎธๆจไฝฟ็จๆจๅๆฌข็ๆต่งๅจๅผๅๆฉๅฑ
-- ๆๆๅบ็จ็จๅบ่ตๆบ้ฝไป็ฃ็ๅ ่ฝฝใๅฆๆๅฎไปฌ่ขซๆดๆน๏ผๅบ็จ็จๅบๅฐ่ชๅจ้ๆฐๅ ่ฝฝ๏ผ่ไธๆฏ้ๆฐๆๅปบ๏ผใๆๆ่ฟๆฅ็ๆต่งๅจไนๅฐ้ๆฐๅ ่ฝฝ
-- ็ๆ็ JS ๆจกๅๆไพไปฅไธๅ
ๅฎน๏ผ
- - ๅธฆๆ่ชๅจ็ๆ็ JSDoc ็ Go ๆนๆณ็ Javascript ๅ
่ฃ
ๅจ๏ผๆไพไปฃ็ ๆ็คบ
- - ๆจ็ Go ็ปๆไฝ็ TypeScript ็ๆฌ๏ผๅฏไปฅๆ้ ๅนถไผ ้็ปๆจ็ Go ๆนๆณ
-- ็ๆ็ฌฌไบไธช JS ๆจกๅ๏ผไธบ่ฟ่กๆถๆไพๅ
่ฃ
ๅจ + TS ๅฃฐๆ
+ - ๅบ็จ็จๅบ็`go.mod`ๅฐ่ขซๆดๆฐไธบไธ Wails CLI ็ๆฌ็ธๅ็็ๆฌ
+ - ๅบ็จ็จๅบ่ขซ็ผ่ฏๅนถ่ชๅจ่ฟ่ก
+ - ไธไธช่งๅฏ่
่ขซๅฏๅจ๏ผๅฆๆๅฎๆฃๆตๅฐๆจ็ go ๆไปถ็ๅๅ๏ผๅฎๅฐ่งฆๅๆจ็ๅผๅๅบ็จ็จๅบ็้ๆฐๆๅปบ
+ - ๅฏๅจไธไธช็ฝ็ปๆๅกๅจ`http://localhost:34115`๏ผ้่ฟ http ไธบๆจ็ๅบ็จ็จๅบ๏ผไธไป
ไป
ๆฏๅ็ซฏ๏ผๆไพๆๅกใ ่ฟๅ
่ฎธๆจไฝฟ็จๆจๅๆฌข็ๆต่งๅจๅผๅๆฉๅฑ
+ - ๆๆๅบ็จ็จๅบ่ตๆบ้ฝไป็ฃ็ๅ ่ฝฝใ ๅฆๆๅฎไปฌ่ขซๆดๆน๏ผๅบ็จ็จๅบๅฐ่ชๅจ้ๆฐๅ ่ฝฝ๏ผ่ไธๆฏ้ๆฐๆๅปบ๏ผใ ๆๆ่ฟๆฅ็ๆต่งๅจไนๅฐ้ๆฐๅ ่ฝฝ
+ - ็ๆ็ JS ๆจกๅๆไพไปฅไธๅ
ๅฎน๏ผ
+ - ๅธฆๆ่ชๅจ็ๆ็ JSDoc ็ Go ๆนๆณ็ Javascript ๅ
่ฃ
ๅจ๏ผๆไพไปฃ็ ๆ็คบ
+ - ๆจ็ Go ็ปๆไฝ็ TypeScript ็ๆฌ๏ผๅฏไปฅๆ้ ๅนถไผ ้็ปๆจ็ Go ๆนๆณ
+ - ็ๆ็ฌฌไบไธช JS ๆจกๅ๏ผไธบ่ฟ่กๆถๆไพๅ
่ฃ
ๅจ + TS ๅฃฐๆ
-| ๆ ๅฟ | ๆ่ฟฐ | ้ป่ฎค |
-| :------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------- |
-| -assetdir "./path/to/assets" | ็ผ่ฏ่ตๆบ็่ทฏๅพ | `wails.json`ไธญ็ๅผ |
-| -browser | ๅจๅฏๅจๆถๆๅผๆต่งๅจๅฐ`http://localhost:34115` | |
-| -compiler "็ผ่ฏๅจ" | ไฝฟ็จไธๅ็ go ็ผ่ฏๅจๆฅๆๅปบ๏ผไพๅฆ go1.15beta1 | go |
-| -e | ่งฆๅ้ๆฐๆๅปบ็ๆฉๅฑ๏ผ้ๅทๅ้๏ผ | go |
-| -reloaddirs | ่งฆๅ้ๆฐๅ ่ฝฝ็้ๅ ็ฎๅฝ๏ผ้ๅทๅ้๏ผ | `wails.json`ไธญ็ๅผ |
-| -ldflags "ๆ ๅฟ" | ไผ ้็ป็ผ่ฏๅจ็้ขๅค ldflags | |
-| -tags "้ขๅคๆ ็ญพ" | ๆๅปบๆ ็ญพไปฅไผ ้็ป็ผ่ฏๅจ๏ผๅผๅทๅ็ฉบๆ ผๅ้๏ผ | |
-| -loglevel "ๆฅๅฟ็บงๅซ" | ่ฆไฝฟ็จ็ๆฅๅฟ็บงๅซ - Trace, Debug, Info, Warning, Error | Debug |
-| -noreload | ่ตๆบๆดๆนๆถ็ฆ็จ่ชๅจ้ๆฐๅ ่ฝฝ | |
-| -v | ่ฏฆ็ป็บงๅซ (0 - silent, 1 - standard, 2 - verbose) | 1 |
-| -wailsjsdir | ็ๆ็ๆ็ Wails JS ๆจกๅ็็ฎๅฝ | `wails.json`ไธญ็ๅผ |
-| -debounce | ๆฃๆตๅฐ่ตๆบๆดๆนๅ็ญๅพ
้ๆฐๅ ่ฝฝ็ๆถ้ด | 100 (ๆฏซ็ง) |
-| -devserver "ไธปๆบ:็ซฏๅฃ" | ๅฐ wails ๅผๅๆๅกๅจ็ปๅฎๅฐ็ๅฐๅ | "http://localhost:34115" |
-| -frontenddevserverurl "url ๅฐๅ" | ไฝฟ็จ็ฌฌไธๆนๅผๅๆๅกๅจๆไพ่ตๆบ๏ผๆฏๅฆ Vite | "" |
-| -appargs "args" | ไปฅ shell ๆ ทๅผไผ ้็ปๅบ็จ็จๅบ็ๅๆฐ | |
-| -platform "platform" | ็ฎๆ ๅนณๅฐ/ๆถๆ | `runtime.GOOS` |
-| -save | ๅฐๆๅฎ็ `assetdir`ใ `reloaddirs`ใ `wailsjsdir`ใ `debounce` ใ `devserver` ๅ `frontenddevserverurl` ๆ ๅฟ็ๅผไฟๅญๅฐ `wails.json` ไปฅๆไธบๅ็ปญ่ฐ็จ็้ป่ฎคๅผใ | |
+| ๆ ๅฟ | ๆ่ฟฐ | ้ป่ฎค |
+|:------------------------------ |:-------------------------------------------------------------------------------------------------------------------------------- |:------------------------ |
+| -assetdir "./path/to/assets" | ็ผ่ฏ่ตๆบ็่ทฏๅพ | `wails.json`ไธญ็ๅผ |
+| -browser | ๅจๅฏๅจๆถๆๅผๆต่งๅจๅฐ`http://localhost:34115` | |
+| -compiler "็ผ่ฏๅจ" | ไฝฟ็จไธๅ็ go ็ผ่ฏๅจๆฅๆๅปบ๏ผไพๅฆ go1.15beta1 | go |
+| -e | ่งฆๅ้ๆฐๆๅปบ็ๆฉๅฑ๏ผ้ๅทๅ้๏ผ | go |
+| -reloaddirs | ่งฆๅ้ๆฐๅ ่ฝฝ็้ๅ ็ฎๅฝ๏ผ้ๅทๅ้๏ผ | `wails.json`ไธญ็ๅผ |
+| -ldflags "ๆ ๅฟ" | ไผ ้็ป็ผ่ฏๅจ็้ขๅค ldflags | |
+| -tags "้ขๅคๆ ็ญพ" | ไผ ้็ป็ผ่ฏๅจๆๅปบๆ ็ญพ๏ผๅผๅทๅ็ฉบๆ ผๅ้๏ผ | |
+| -loglevel "ๆฅๅฟ็บงๅซ" | ่ฆไฝฟ็จ็ๆฅๅฟ็บงๅซ - Trace, Debug, Info, Warning, Error | Debug |
+| -noreload | ่ตๆบๆดๆนๆถ็ฆ็จ่ชๅจ้ๆฐๅ ่ฝฝ | |
+| -nogen | ่ฏฆ็ป็บงๅซ (0 - silent, 1 - standard, 2 - verbose) | |
+| -v | ็ๆ็ๆ็ Wails JS ๆจกๅ็็ฎๅฝ | 1 |
+| -wailsjsdir | ๆฃๆตๅฐ่ตๆบๆดๆนๅ็ญๅพ
้ๆฐๅ ่ฝฝ็ๆถ้ด | `wails.json`ไธญ็ๅผ |
+| -debounce | ๅฐ wails ๅผๅๆๅกๅจ็ปๅฎๅฐ็ๅฐๅ | "http://localhost:34115" |
+| -frontenddevserverurl "url ๅฐๅ" | ไฝฟ็จ็ฌฌไธๆนๅผๅๆๅกๅจๆไพ่ตๆบ๏ผๆฏๅฆ Vite | "localhost:34115" |
+| -frontenddevserverurl "url" | ไปฅ shell ๆ ทๅผไผ ้็ปๅบ็จ็จๅบ็ๅๆฐ | "" |
+| -appargs "args" | ็ฎๆ ๅนณๅฐ/ๆถๆ | |
+| -save | ๅฐๆๅฎ็ `assetdir`ใ `reloaddirs`ใ `wailsjsdir`ใ `debounce` ใ `devserver` ๅ `frontenddevserverurl` ๆ ๅฟ็ๅผไฟๅญๅฐ `wails.json` ไปฅๆไธบๅ็ปญ่ฐ็จ็้ป่ฎคๅผใ | |
+| -race | Build with Go's race detector | ๅฆ |
+| -s | ่ทณ่ฟๅ็ซฏๆๅปบ | ๅฆ |
็คบไพ๏ผ
@@ -181,10 +188,10 @@ Your system is ready for Wails development!
ๆญคๅฝไปคๅฐๆง่กไปฅไธๆไฝ๏ผ
-- ๆๅปบๅบ็จ็จๅบๅนถ่ฟ่กๅฎ๏ผๆดๅค็ป่ๅจ[่ฟ้](../guides/manual-builds)๏ผ
-- ๅจ`./frontend/src`ไธญ็ๆ Wails JS ๆจกๅ
-- ็ๅฌ`./frontend/dist`ไธญๆไปถ็ๆดๆฐๅนถๅจๆดๆนๆถ้ๆฐๅ ่ฝฝ
-- ๆๅผๆต่งๅจๅนถ่ฟๆฅๅฐๅบ็จ็จๅบ
+ - ๆๅปบๅบ็จ็จๅบๅนถ่ฟ่กๅฎ๏ผๆดๅค็ป่ๅจ[่ฟ้](../guides/manual-builds)๏ผ
+ - ๅจ`./frontend/src`ไธญ็ๆ Wails JS ๆจกๅ
+ - ็ๅฌ`./frontend/dist`ไธญๆไปถ็ๆดๆฐๅนถๅจๆดๆนๆถ้ๆฐๅ ่ฝฝ
+ - ๆๅผๆต่งๅจๅนถ่ฟๆฅๅฐๅบ็จ็จๅบ
[ๆญคๅค](../guides/application-development)ๆไพไบๆๅ
ณๅฐๆญคๅ่ฝไธ็ฐๆๆกๆถ่ๆฌไธ่ตทไฝฟ็จ็ๆดๅคไฟกๆฏใ
@@ -192,24 +199,29 @@ Your system is ready for Wails development!
### ๆจกๆฟ
-Wails ไฝฟ็จๆจกๆฟๆฅ็ๆ้กน็ฎใ`wails generate template`ๅฝไปคๆๅฉไบๆๅปบๆจกๆฟ๏ผไปฅไฝฟๅฎๅฏไปฅ็จไบ็ๆ้กน็ฎใ
+Wails ไฝฟ็จๆจกๆฟๆฅ็ๆ้กน็ฎใ `wails generate template`ๅฝไปคๆๅฉไบๆๅปบๆจกๆฟ๏ผไปฅไฝฟๅฎๅฏไปฅ็จไบ็ๆ้กน็ฎใ
-| ๆ ๅฟ | ๆ่ฟฐ |
-| :--------------- | :----------------------------- |
-| -name | ๆจกๆฟๅ็งฐ๏ผๅฟ
ๅกซ๏ผ |
+| ๆ ๅฟ | ๆ่ฟฐ |
+|:-------------- |:--------------- |
+| -name | ๆจกๆฟๅ็งฐ๏ผๅฟ
ๅกซ๏ผ |
| -frontend "่ทฏๅพ" | ่ฆๅจๆจกๆฟไธญไฝฟ็จ็ๅ็ซฏ้กน็ฎ็่ทฏๅพ |
ๆๅ
ณๅๅปบๆจกๆฟ็ๆดๅค่ฏฆ็ปไฟกๆฏ๏ผ่ฏทๅ้
[ๆจกๆฟๆๅ](../guides/templates)ใ
-## ๆดๆฐ
+### module
`wails update` ๅฐๆดๆฐ Wails CLI ็็ๆฌใ
-| ๆ ๅฟ | ๆ่ฟฐ |
-| :-------------- | :--------------------- |
-| -pre | ๆดๆฐๅฐๆๆฐ็้ขๅๅธ็ๆฌ |
-| -version "็ๆฌ" | ๅฎ่ฃ
ๆๅฎ็ๆฌ็ CLI |
+## ๆดๆฐ
+
+`wails version` ไป
่พๅบๅฝๅ็ CLI ็ๆฌใ
+
+| ๆ ๅฟ | ๆ่ฟฐ |
+|:------------- |:----------- |
+| -pre | ๆดๆฐๅฐๆๆฐ็้ขๅๅธ็ๆฌ |
+| -version "็ๆฌ" | ๅฎ่ฃ
ๆๅฎ็ๆฌ็ CLI |
+
## ็ๆฌ
-`wails version` ไป
่พๅบๅฝๅ็ CLI ็ๆฌใ
+`wails version` will simply output the current CLI version.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx
index e167544fc..3b5fe2179 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/menus.mdx
@@ -4,93 +4,98 @@ sidebar_position: 4
# ๅบ็จ่ๅ
-ๅฏไปฅ้่ฟๅฎไน [่ๅ](#่ๅ) ็ปๆๅนถ่ฎพ็ฝฎ [`Menu`](../reference/options#่ๅ) ้้กนๆ่
้่ฟ่ฐ็จ่ฟ่กๆถๆนๆณ [่ฎพ็ฝฎๅบ็จ็จๅบ่ๅ](../reference/runtime/menu#่ฎพ็ฝฎๅบ็จ็จๅบ่ๅ) ๆฅๅฐๅบ็จ็จๅบ่ๅๆทปๅ ๅฐ Wails ้กน็ฎใ
+It is possible to add an application menu to Wails projects. ๅฏไปฅ้่ฟๅฎไน [่ๅ](#่ๅ) ็ปๆๅนถ่ฎพ็ฝฎ [`Menu`](../reference/options#่ๅ) ้้กนๆ่
้่ฟ่ฐ็จ่ฟ่กๆถๆนๆณ [่ฎพ็ฝฎๅบ็จ็จๅบ่ๅ](../reference/runtime/menu#่ฎพ็ฝฎๅบ็จ็จๅบ่ๅ) ๆฅๅฐๅบ็จ็จๅบ่ๅๆทปๅ ๅฐ Wails ้กน็ฎใ
ไนๅฏไปฅ้่ฟๆดๆฐ่ๅ็ปๆๅนถ่ฐ็จ[ๆดๆฐๅบ็จ็จๅบ่ๅ](../reference/runtime/menu#ๆดๆฐๅบ็จ็จๅบ่ๅ)ๆฅๅจๆๆดๆฐ่ๅ ใ
-็คบไพ:
-
```go
- myMenu := menu.NewMenuFromItems(
- menu.SubMenu("File", menu.NewMenuFromItems(
- menu.Text("&Open", keys.CmdOrCtrl("o"), openFile),
- menu.Separator(),
- menu.Text("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) {
- runtime.Quit()
- }),
- )),
+ AppMenu := menu.NewMenu()
+ FileMenu := AppMenu.AddSubmenu("File")
+ FileMenu.AddText("&Open", keys.CmdOrCtrl("o"), openFile)
+ FileMenu.AddSeparator()
+ FileMenu.AddText("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) {
+ runtime.Quit()
+ })
+
+ if runtime.GOOS == "darwin" {
+ AppMenu.Append(menu.EditMenu()) // on macos platform, we should append EditMenu to enable Cmd+C,Cmd+V,Cmd+Z... shortcut
+ }
+
+ err := wails.Run(&options.App{
+ Title: "Menus Demo",
+ Width: 800,
+ Height: 600,
+ Menu: AppMenu,
+ Bind: []interface{}{
+ app,
+ },
)
+ // ...
+````
- runtime.MenuSetApplicationMenu(myMenu)
+It is also possible to dynamically update the menu, by updating the menu struct and calling
+[MenuUpdateApplicationMenu](../reference/runtime/menu.mdx#menuupdateapplicationmenu).
-```
+The example above uses helper methods, however it's possible to build the menu structs manually.
-ไธ้ข็็คบไพไฝฟ็จๅฟซๆทๆนๆณ๏ผไฝๆฏๅฏไปฅๆๅจๆๅปบ่ๅ็ปๆใ
-
-## ่ๅ
-
-่ๅๆฏ่ๅ้กน็้ๅ๏ผ
-
-```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
type Menu struct {
- Items []*MenuItem
+ Items []*MenuItem
}
```
-ๅฏนไบๅบ็จ็จๅบ่ๅ๏ผๆฏไธช่ๅ้กนไปฃ่กจไธไธช่ๅ๏ผไพๅฆโ็ผ่พโใ
+็คบไพ:
-ๆไพไบไธไธช็ฎๅ็ๅฟซๆทๆนๆณๆฅๆๅปบ่ๅ๏ผ
+ไธ้ข็็คบไพไฝฟ็จๅฟซๆทๆนๆณ๏ผไฝๆฏๅฏไปฅๆๅจๆๅปบ่ๅ็ปๆใ
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
func NewMenuFromItems(first *MenuItem, rest ...*MenuItem) *Menu
```
-่ฟไฝฟๅพไปฃ็ ็ๅธๅฑๆดๅๆฏ่ๅ็ๅธๅฑ๏ผ่ๆ ้ๅจๅๅปบ่ๅ้กนๅๆๅจๆทปๅ ๅฎไปฌใๆ่
๏ผๆจๅฏไปฅๅชๅๅปบ่ๅ้กนๅนถๆๅจๅฐๅฎไปฌๆทปๅ ๅฐ่ๅไธญใ
+่ฟไฝฟๅพไปฃ็ ็ๅธๅฑๆดๅๆฏ่ๅ็ๅธๅฑ๏ผ่ๆ ้ๅจๅๅปบ่ๅ้กนๅๆๅจๆทปๅ ๅฎไปฌใ ๆ่
๏ผๆจๅฏไปฅๅชๅๅปบ่ๅ้กนๅนถๆๅจๅฐๅฎไปฌๆทปๅ ๅฐ่ๅไธญใ
-## ่ๅ้กน
+## ่ๅ
-่ๅ้กน่กจ็คบ่ๅไธญ็ไธไธช้กน็ฎใ
+ๅฏนไบๅบ็จ็จๅบ่ๅ๏ผๆฏไธช่ๅ้กนไปฃ่กจไธไธช่ๅ๏ผไพๅฆโ็ผ่พโใ
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
// MenuItem represents a menu item contained in a menu
type MenuItem struct {
- Label string
- Role Role
- Accelerator *keys.Accelerator
- Type Type
- Disabled bool
- Hidden bool
- Checked bool
- SubMenu *Menu
- Click Callback
+ Label string
+ Role Role
+ Accelerator *keys.Accelerator
+ Type Type
+ Disabled bool
+ Hidden bool
+ Checked bool
+ SubMenu *Menu
+ Click Callback
}
```
-| ๅญๆฎต | ็ฑปๅ | ๆณจ่งฃ |
-| ----------- | ----------------------------- | ------------------------------------------- |
-| Label | string | ่ๅๆๅญ |
-| Accelerator | [\*keys.Accelerator](#ๅ ้ๅจ) | ๆญค่ๅ้กน็้ฎ็ปๅฎ |
-| Type | [Type](#็ฑปๅ) | ่ๅ้กน็็ฑปๅ |
-| Disabled | bool | ็ฆ็จ่ๅ้กน |
-| Hidden | bool | ้่ๆญค่ๅ้กน |
-| Checked | bool | ๅ่ๅ้กน่ฎพ็ฝฎ้ไธญ (ๅค้ๆกๅๅ้็ฑปๅ) |
-| SubMenu | [\*Menu](#่ๅ) | ่ฎพ็ฝฎๅญ่ๅ |
-| Click | [Callback](#ๅ่ฐ) | ๅๅป่ๅๆถ็ๅ่ฐๅฝๆฐ |
-| Role | string | ๅฎไนๆญค่ๅ้กน็[่ง่ฒ](#่ง่ฒ)ใๆๆถๅชๆฏๆ Mac |
+| ๅญๆฎต | Type | ๆณจ่งฃ |
+| ----------- | ------------------------------------ | --------------------------- |
+| Label | string | ่ๅๆๅญ |
+| Accelerator | [\*keys.Accelerator](#accelerator) | ๆญค่ๅ้กน็้ฎ็ปๅฎ |
+| Type | [Type](#type) | ่ๅ้กน็็ฑปๅ |
+| Disabled | bool | ็ฆ็จ่ๅ้กน |
+| Hidden | bool | ้่ๆญค่ๅ้กน |
+| Checked | bool | ๅ่ๅ้กน่ฎพ็ฝฎ้ไธญ (ๅค้ๆกๅๅ้็ฑปๅ) |
+| SubMenu | [\*Menu](#menu) | ่ฎพ็ฝฎๅญ่ๅ |
+| Click | [Callback](#callback) | ๅๅป่ๅๆถ็ๅ่ฐๅฝๆฐ |
+| Role | string | ๅฎไนๆญค่ๅ้กน็[่ง่ฒ](#่ง่ฒ)ใ ๆๆถๅชๆฏๆ Mac |
-### ๅ ้ๅจ
+### Accelerator
-ๅ ้ๅจ๏ผๆๆถ็งฐไธบ้ฎ็ๅฟซๆท้ฎ๏ผๅฎไนไบๆ้ฎๅ่ๅ้กนไน้ด็็ปๅฎใ Wails ๅฐๅ ้ๅจๅฎไนไธบไธไธช็ปๅๆ้ฎ + [ไฟฎ้ฅฐ็ฌฆ](#ไฟฎ้ฅฐ็ฌฆ)ใ
-ๅฎไปฌๅจ`"github.com/wailsapp/wails/v2/pkg/menu/keys"`ๅ
ไธญๅฏ็จใ
+ๅ ้ๅจ๏ผๆๆถ็งฐไธบ้ฎ็ๅฟซๆท้ฎ๏ผๅฎไนไบๆ้ฎๅ่ๅ้กนไน้ด็็ปๅฎใ Wails ๅฐๅ ้ๅจๅฎไนไธบไธไธช็ปๅๆ้ฎ + [ไฟฎ้ฅฐ็ฌฆ](#ไฟฎ้ฅฐ็ฌฆ)ใ ๅฎไปฌๅจ`"github.com/wailsapp/wails/v2/pkg/menu/keys"`ๅ
ไธญๅฏ็จใ
-็คบไพ:
+Example:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys"
// Defines cmd+o on Mac and ctrl-o on Window/Linux
myShortcut := keys.CmdOrCtrl("o")
```
-้ฎๆฏ้ฎ็ไธ้คไบ`+`็ไปปไฝๅญ็ฌฆ๏ผๅฎ่ขซๅฎไนไธบ`ๅ ๅท`ใๆไบ้ฎไธ่ฝ่กจ็คบไธบๅญ็ฌฆ๏ผๅ ๆญคๅฏไปฅไฝฟ็จไธ็ปๅฝๅๅญ็ฌฆ๏ผ
+้ฎๆฏ้ฎ็ไธ้คไบ`+`็ไปปไฝๅญ็ฌฆ๏ผๅฎ่ขซๅฎไนไธบ`ๅ ๅท`ใ ๆไบ้ฎไธ่ฝ่กจ็คบไธบๅญ็ฌฆ๏ผๅ ๆญคๅฏไปฅไฝฟ็จไธ็ปๅฝๅๅญ็ฌฆ๏ผ
- `backspace`
- `tab`
@@ -146,7 +151,7 @@ type MenuItem struct {
Wails ่ฟๆฏๆไฝฟ็จไธ Electron ็ธๅ็่ฏญๆณๆฅ่งฃๆๅ ้ๅจใ ่ฟๅฏนไบๅจ้
็ฝฎๆไปถไธญๅญๅจๅ ้ๅจๅพๆ็จใ
-็คบไพ:
+Example:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys"
// Defines cmd+o on Mac and ctrl-o on Window/Linux
@@ -155,22 +160,21 @@ Wails ่ฟๆฏๆไฝฟ็จไธ Electron ็ธๅ็่ฏญๆณๆฅ่งฃๆๅ ้ๅจใ ่ฟๅฏนไบ
#### ไฟฎ้ฅฐ็ฌฆ
-ไปฅไธไฟฎ้ฅฐ็ฌฆๆฏๅฏไปฅไธๅ ้้ฎ็ปๅไฝฟ็จ็้ฎ๏ผ
+The following modifiers are keys that may be used in combination with the accelerator key:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys"
const (
- // CmdOrCtrlKey represents Command on Mac and Control on other platforms
- CmdOrCtrlKey Modifier = "cmdorctrl"
- // OptionOrAltKey represents Option on Mac and Alt on other platforms
- OptionOrAltKey Modifier = "optionoralt"
- // ShiftKey represents the shift key on all systems
- ShiftKey Modifier = "shift"
- // ControlKey represents the control key on all systems
- ControlKey Modifier = "ctrl"
+ // CmdOrCtrlKey represents Command on Mac and Control on other platforms
+ CmdOrCtrlKey Modifier = "cmdorctrl"
+ // OptionOrAltKey represents Option on Mac and Alt on other platforms
+ OptionOrAltKey Modifier = "optionoralt"
+ // ShiftKey represents the shift key on all systems
+ ShiftKey Modifier = "shift"
+ // ControlKey represents the control key on all systems
+ ControlKey Modifier = "ctrl"
)
```
-
-่ฎธๅคๅฟซๆทๆนๆณๅฏ็จไบไฝฟ็จไฟฎ้ฅฐ็ฌฆๅๅปบๅ ้ๅจ๏ผ
+A number of helper methods are available to create Accelerators using modifiers:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys"
func CmdOrCtrl(key string) *Accelerator
@@ -179,28 +183,43 @@ func Shift(key string) *Accelerator
func Control(key string) *Accelerator
```
-ไฟฎ้ฅฐ็ฌฆๅฏไปฅ็ปๅ`keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`ไฝฟ็จ๏ผ
+็คบไพ:
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu/keys"
// Defines "Ctrl+Option+A" on Mac and "Ctrl+Alt+A" on Window/Linux
myShortcut := keys.Combo("a", ControlKey, OptionOrAltKey)
```
-### ็ฑปๅ
+### Type
-ๆฏไธช่ๅ้กนๅฟ
้กปๆไธไธช็ฑปๅ๏ผๆ 5 ็ง็ฑปๅๅฏ็จ๏ผ
+ไปฅไธไฟฎ้ฅฐ็ฌฆๆฏๅฏไปฅไธๅ ้้ฎ็ปๅไฝฟ็จ็้ฎ๏ผ
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
const (
- TextType Type = "Text"
- SeparatorType Type = "Separator"
- SubmenuType Type = "Submenu"
- CheckboxType Type = "Checkbox"
- RadioType Type = "Radio"
+ TextType Type = "Text"
+ SeparatorType Type = "Separator"
+ SubmenuType Type = "Submenu"
+ CheckboxType Type = "Checkbox"
+ RadioType Type = "Radio"
)
```
-ไธบๆนไพฟ่ตท่ง๏ผๆไพไบๅฟซๆทๆนๆณๆฅๅฟซ้ๅๅปบ่ๅ้กน๏ผ
+่ฎธๅคๅฟซๆทๆนๆณๅฏ็จไบไฝฟ็จไฟฎ้ฅฐ็ฌฆๅๅปบๅ ้ๅจ๏ผ
+
+```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
+myMenu := menu.NewMenuFromItems(
+ menu.SubMenu("File", menu.NewMenuFromItems(
+ menu.Text("&Open", keys.CmdOrCtrl("o"), openFile),
+ menu.Separator(),
+ menu.Text("Quit", keys.CmdOrCtrl("q"), func(_ *menu.CallbackData) {
+ runtime.Quit()
+ }),
+ )),
+ )
+
+ runtime.MenuSetApplicationMenu(myMenu)
+```
+ไฟฎ้ฅฐ็ฌฆๅฏไปฅ็ปๅ`keys.Combo(key string, modifier1 Modifier, modifier2 Modifier, rest ...Modifier)`ไฝฟ็จ๏ผ
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
func Text(label string, accelerator *keys.Accelerator, click Callback) *MenuItem
@@ -210,34 +229,35 @@ func Checkbox(label string, checked bool, accelerator *keys.Accelerator, click C
func SubMenu(label string, menu *Menu) *MenuItem
```
-ๅ
ณไบๅ้่ๅ็ป็่ฏดๆ:ๅ้่ๅ็ปๅฎไนไธบ่ๅไธญ็ธ้ป็ๅคไธชๅ้่ๅ้กนใ่ฟๆๅณ็ๆจไธ้่ฆๅฐ้กน็ฎๅ็ปๅจไธ่ตท๏ผๅ ไธบๅฎๆฏ่ชๅจ็ใ
-็ถ่๏ผ่ฟไนๆๅณ็ๆจไธ่ฝๆไธคไธช็ธ้ป็ๅ้่ๅ็ป-ๅฎไปฌไน้ดๅฟ
้กปๆไธไธช้ๅ้่ๅ้กนใ
-### ๅ่ฐ
+ๅ
ณไบๅ้่ๅ็ป็่ฏดๆ:ๅ้่ๅ็ปๅฎไนไธบ่ๅไธญ็ธ้ป็ๅคไธชๅ้่ๅ้กนใ ่ฟๆๅณ็ๆจไธ้่ฆๅฐ้กน็ฎๅ็ปๅจไธ่ตท๏ผๅ ไธบๅฎๆฏ่ชๅจ็ใ ็ถ่๏ผ่ฟไนๆๅณ็ๆจไธ่ฝๆไธคไธช็ธ้ป็ๅ้่ๅ็ป-ๅฎไปฌไน้ดๅฟ
้กปๆไธไธช้ๅ้่ๅ้กนใ
-ๆฏไธช่ๅ้กน้ฝๅฏ่ฝๆไธไธชๅ่ฐ๏ผๅจๅๅป่ฏฅ้กนๆถไผๆง่ก่ฏฅๅ่ฐ๏ผ
+### Callback
+
+ไธบๆนไพฟ่ตท่ง๏ผๆไพไบๅฟซๆทๆนๆณๆฅๅฟซ้ๅๅปบ่ๅ้กน๏ผ
```go title="Package: github.com/wailsapp/wails/v2/pkg/menu"
type Callback func(*CallbackData)
type CallbackData struct {
- MenuItem *MenuItem
+ MenuItem *MenuItem
}
```
-็ปๅฝๆฐไธไธช`CallbackData`็ปๆไฝ๏ผๅฎๆ็คบๅชไธช่ๅ้กน่งฆๅไบๅ่ฐใ่ฟๅจไฝฟ็จๅฏ่ฝๅ
ฑไบซๅ่ฐ็ๅ้่ๅ็ปๆถๅพๆ็จใ
+็ปๅฝๆฐไธไธช`CallbackData`็ปๆไฝ๏ผๅฎๆ็คบๅชไธช่ๅ้กน่งฆๅไบๅ่ฐใ ่ฟๅจไฝฟ็จๅฏ่ฝๅ
ฑไบซๅ่ฐ็ๅ้่ๅ็ปๆถๅพๆ็จใ
-### ่ง่ฒ
+### Role
-:::info ่ง่ฒ
+ๆฏไธช่ๅ้กน้ฝๅฏ่ฝๆไธไธชๅ่ฐ๏ผๅจๅๅป่ฏฅ้กนๆถไผๆง่ก่ฏฅๅ่ฐ๏ผ
-็ฎๅไป
Mac ๆฏๆ่ง่ฒใ
+ ็ฎๅไป
Mac ๆฏๆ่ง่ฒใ
:::
-ไธไธช่ๅ้กนๅฏ่ฝๆไธไธช่ง่ฒ๏ผๅฎๆฌ่ดจไธๆฏไธไธช้ขๅฎไน็่ๅ้กนใๆไปฌ็ฎๅๆฏๆไปฅไธ่ง่ฒ๏ผ
+ไธไธช่ๅ้กนๅฏ่ฝๆไธไธช่ง่ฒ๏ผๅฎๆฌ่ดจไธๆฏไธไธช้ขๅฎไน็่ๅ้กนใ ๆไปฌ็ฎๅๆฏๆไปฅไธ่ง่ฒ๏ผ
+
+| Role | ๆ่ฟฐ |
+| ------------ | -------------------------------------- |
+| AppMenuRole | ๆ ๅ็ Mac ๅบ็จ็จๅบ่ๅใ ๅฏไปฅไฝฟ็จ`menu.AppMenu()`ๅๅปบ |
+| EditMenuRole | ๆ ๅ็ Mac ็ผ่พ่ๅใ ๅฏไปฅไฝฟ็จ`menu.EditMenu()`ๅๅปบ |
-| ่ง่ฒ | ๆ่ฟฐ |
-| ------------ | ----------------------------------------------------- |
-| AppMenuRole | ๆ ๅ็ Mac ๅบ็จ็จๅบ่ๅใๅฏไปฅไฝฟ็จ`menu.AppMenu()`ๅๅปบ |
-| EditMenuRole | ๆ ๅ็ Mac ็ผ่พ่ๅใๅฏไปฅไฝฟ็จ`menu.EditMenu()`ๅๅปบ |
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx
index 47b1105cb..ab9a8a17d 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/options.mdx
@@ -1,5 +1,4 @@
---
-title: ๅๆฐ้้กน
sidebar_position: 3
---
@@ -7,7 +6,7 @@ sidebar_position: 3
## ๅบ็จ็จๅบๅๆฐ้้กน
-่ฏฅ`Options.App`็ปๆๅ
ๅซๅบ็จ็จๅบ้
็ฝฎใๅฎ่ขซไผ ้็ป`wails.Run()`ๆนๆณ๏ผ
+่ฏฅ`Options.App`็ปๆๅ
ๅซๅบ็จ็จๅบ้
็ฝฎใ ๅฎ่ขซไผ ้็ป`wails.Run()`ๆนๆณ๏ผ
```go title="Example"
import "github.com/wailsapp/wails/v2/pkg/options"
@@ -68,7 +67,7 @@ func main() {
UseToolbar: false,
HideToolbarSeparator: true,
},
- Appearance: mac.NSAppearanceNameDarkAqua,
+ Appearance: mac.NSAppearanceNameDarkAqua,
WebviewIsTransparent: true,
WindowIsTranslucent: false,
About: &mac.AboutInfo{
@@ -88,6 +87,8 @@ func main() {
```
+
+
### ๆ ้ข
ๅ็งฐ๏ผTitle
@@ -102,7 +103,7 @@ func main() {
็ฑปๅ๏ผint
-็ชๅฃ็ๅๅงๅฎฝๅบฆใ้ป่ฎคๅผ๏ผ1024ใ
+็ชๅฃ็ๅๅงๅฎฝๅบฆใ ้ป่ฎคๅผ๏ผ1024ใ
### ้ซๅบฆ
@@ -110,7 +111,7 @@ func main() {
็ฑปๅ๏ผint
-็ชๅฃ็ๅๅง้ซๅบฆใ้ป่ฎคๅผ๏ผ768
+็ชๅฃ็ๅๅง้ซๅบฆใ ้ป่ฎคๅผ๏ผ768
### ็ฆ็จ่ฐๆด็ชๅฃๅฐบๅฏธ
@@ -118,9 +119,9 @@ func main() {
็ฑปๅ๏ผbool
-้ป่ฎคๆ
ๅตไธ๏ผไธป็ชๅฃๅฏ่ฐๆดๅคงๅฐใๅฐๆญค่ฎพ็ฝฎไธบ `true` ๅฐไฝฟๅ
ถไฟๆๅบๅฎๅคงๅฐใ
+้ป่ฎคๆ
ๅตไธ๏ผไธป็ชๅฃๅฏ่ฐๆดๅคงๅฐใ ๅฐๆญค่ฎพ็ฝฎไธบ `true` ๅฐไฝฟๅ
ถไฟๆๅบๅฎๅคงๅฐใ
-### ๅ
จๅฑ
+### Fullscreen
ๅ็งฐ๏ผFullscreen
@@ -134,7 +135,7 @@ func main() {
็ฑปๅ๏ผbool
-่ฎพ็ฝฎไธบ`true`ๆถ๏ผ็ชๅฃๅฐๆฒกๆ่พนๆกๆๆ ้ขๆ ใๅฆ่ฏทๅ้
[ๆ ่พนๆก็ชๅฃ](../guides/frameless)ใ
+่ฎพ็ฝฎไธบ`true`ๆถ๏ผ็ชๅฃๅฐๆฒกๆ่พนๆกๆๆ ้ขๆ ใ ๅฆ่ฏทๅ้
[ๆ ่พนๆก็ชๅฃ](../guides/frameless)ใ
### ๆๅฐๅฎฝๅบฆ
@@ -142,7 +143,7 @@ func main() {
็ฑปๅ๏ผint
-่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅฐๅฎฝๅบฆใๅฆๆ็ปๅบ็ๅผ`Width`ๅฐไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MinWidth`้ป่ฎคๅผใ
+่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅฐๅฎฝๅบฆใ ๅฆๆ็ปๅบ็ๅผ`Width`ๅฐไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MinWidth`้ป่ฎคๅผใ
### ๆๅฐ้ซๅบฆ
@@ -150,7 +151,7 @@ func main() {
็ฑปๅ๏ผint
-่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅฐ้ซๅบฆใๅฆๆ็ปๅบ็ๅผ`Height`ๅฐไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MinHeight`้ป่ฎคๅผใ
+่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅฐ้ซๅบฆใ ๅฆๆ็ปๅบ็ๅผ`Height`ๅฐไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MinHeight`้ป่ฎคๅผใ
### ๆๅคงๅฎฝๅบฆ
@@ -158,7 +159,7 @@ func main() {
็ฑปๅ๏ผint
-่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅคงๅฎฝๅบฆใๅฆๆ็ปๅบ็ๅผ`Width`ๅคงไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MaxWidth`้ป่ฎคๅผใ
+่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅคงๅฎฝๅบฆใ ๅฆๆ็ปๅบ็ๅผ`Width`ๅคงไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MaxWidth`้ป่ฎคๅผใ
### ๆๅคง้ซๅบฆ
@@ -166,7 +167,7 @@ func main() {
็ฑปๅ๏ผint
-่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅคง้ซๅบฆใๅฆๆ็ปๅบ็ๅผ`Height`ๅคงไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MaxHeight`้ป่ฎคๅผใ
+่ฟๅฐ่ฎพ็ฝฎ็ชๅฃ็ๆๅคง้ซๅบฆใ ๅฆๆ็ปๅบ็ๅผ`Height`ๅคงไบ่ฟไธชๅผ๏ผ็ชๅฃๅฐ่ขซ่ฎพ็ฝฎไธบ`MaxHeight`้ป่ฎคๅผใ
### ๅฏๅจๆถ้่็ชๅฃ
@@ -182,7 +183,7 @@ func main() {
็ฑปๅ๏ผbool
-้ป่ฎคๆ
ๅตไธ๏ผๅ
ณ้ญ็ชๅฃๅฐๅ
ณ้ญๅบ็จ็จๅบใๅฐๆญค่ฎพ็ฝฎไธบ`true`ๆๅณ็ๅ
ณ้ญ็ชๅฃๅฐ้่็ชๅฃใ
+้ป่ฎคๆ
ๅตไธ๏ผๅ
ณ้ญ็ชๅฃๅฐๅ
ณ้ญๅบ็จ็จๅบใ ๅฐๆญค่ฎพ็ฝฎไธบ`true`ๆๅณ็ๅ
ณ้ญ็ชๅฃๅฐ้่็ชๅฃใ
### RGBA
@@ -190,7 +191,7 @@ func main() {
็ฑปๅ๏ผint (0xRRGGBBAA) ็คบไพ๏ผ0xFF000088 - ้ๆๅบฆไธบ 50% ็็บข่ฒ
-่ฏฅๅผๆฏ้ป่ฎค่ฎพ็ฝฎ็ชๅฃ็ RGBA ๅผใ้ป่ฎคๅผ๏ผ0xFFFFFFFFใ
+This value is the default background colour of the window. Default: white
### ็ชๅฃๅบๅฎๅจๆ้กถๅฑ
@@ -206,226 +207,277 @@ func main() {
็ฑปๅ๏ผ\*embed.FS
-ๅบ็จ็จๅบ่ฆไฝฟ็จ็ๅ็ซฏ่ตๆบใ้่ฆไธไธช`index.html`ๆไปถใ
+ๅบ็จ็จๅบ่ฆไฝฟ็จ็ๅ็ซฏ่ตๆบใ ้่ฆไธไธช`index.html`ๆไปถใ
### ่ๅ
-ๅ็งฐ๏ผMenu
+
็ฑปๅ๏ผ\*menu.Menu
-ๅบ็จ็จๅบ่ฆไฝฟ็จ็่ๅใ[่ๅๅ่](../reference/runtime/menu)ไธญๆๅ
ณ่ๅ็ๆดๅค่ฏฆ็ปไฟกๆฏใ
+็ฑปๅ๏ผlogger.Logger
+
ๆณจๆ๏ผๅจ Mac ไธ๏ผๅฆๆๆชๆๅฎ่ๅ๏ผๅๅฐๅๅปบ้ป่ฎค่ๅใ
+| ๅผ | Win | Mac | Lin |
+| ----------------------- | --- | --- | --- |
+| GET | โ
| โ
| โ
|
+| POST | โ
| โ
| โ |
+| PUT | โ
| โ
| โ |
+| PATCH | โ
| โ
| โ |
+| DELETE | โ
| โ
| โ |
+| Request Headers | โ
| โ
| โ |
+| Request Body | โ
| โ
| โ |
+| Request Body Streaming | โ | โ | โ |
+| Response StatusCodes | โ
| โ
| โ |
+| Response Headers | โ
| โ
| โ |
+| Response Body | โ
| โ
| โ
|
+| Response Body Streaming | โ | โ | โ
|
+
+NOTE: Linux is currently very limited due to targeting a WebKit2GTK Version < 2.36.0. In the future some features will be supported by the introduction of WebKit2GTK 2.36.0+ support.
+
+NOTE: When used in combination with a Frontend DevServer there might be limitations, eg. Vite serves the index.html on every path, that does not contain a file extension.
+
### ๆฅๅฟ
-ๅ็งฐ๏ผLogger
-
-็ฑปๅ๏ผlogger.Logger
-
้ป่ฎคๅผ๏ผLogger to Stdout
-ๅบ็จ็จๅบ่ฆไฝฟ็จ็่ฎฐๅฝๅจใๆๅ
ณๆฅๅฟ่ฎฐๅฝ็ๆดๅค่ฏฆ็ปไฟกๆฏ๏ผ่ฏทๅ้
[ๆฅๅฟๅ่](../reference/runtime/log)ใ
+ๅ็งฐ๏ผMenu
-### ๆฅๅฟ็บงๅซ
-
-ๅ็งฐ๏ผLogLevel
+ๅบ็จ็จๅบ่ฆไฝฟ็จ็่ๅใ [่ๅๅ่](../reference/runtime/menu)ไธญๆๅ
ณ่ๅ็ๆดๅค่ฏฆ็ปไฟกๆฏใ
็ฑปๅ๏ผlogger.LogLevel
+### ๆฅๅฟ็บงๅซ
+
้ป่ฎคๅผ๏ผๅจๅผๅๆจกๅผไธๆฏ`Info`๏ผๅจ็ไบงๆจกๅผไธๆฏ`Error`ใ
-้ป่ฎคๆฅๅฟ็บงๅซใๆๅ
ณๆฅๅฟ่ฎฐๅฝ็ๆดๅค่ฏฆ็ปไฟกๆฏ๏ผ่ฏทๅ้
[่ฎพ็ฝฎๆฅๅฟ็ญ็บง](../reference/runtime/log#่ฎพ็ฝฎๆฅๅฟ็ญ็บง)ใ
-
-### ๅบ็จๅฏๅจๅ่ฐ
+ๅ็งฐ๏ผLogger
ๅ็งฐ๏ผOnStartup
-็ฑปๅ๏ผfunc(ctx context.Context)
+ๅบ็จ็จๅบ่ฆไฝฟ็จ็่ฎฐๅฝๅจใ ๆๅ
ณๆฅๅฟ่ฎฐๅฝ็ๆดๅค่ฏฆ็ปไฟกๆฏ๏ผ่ฏทๅ้
[ๆฅๅฟๅ่](../reference/runtime/log)ใ
-ๆญคๅ่ฐๅจๅ็ซฏๅๅปบไนๅ่ฐ็จ๏ผไฝๅจ`index.html`ๅ ่ฝฝไนๅ่ฐ็จใๅฎๆไพไบๅบ็จ็จๅบไธไธๆใ
+### ๅบ็จๅฏๅจๅ่ฐ
-### ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ
+ๅ็งฐ๏ผLogLevel
ๅ็งฐ๏ผOnDomReady
็ฑปๅ๏ผfunc(ctx context.Context)
-ๅจๅ็ซฏๅ ่ฝฝๅฎๆฏ`index.html`ๅๅ
ถ่ตๆบๅ่ฐ็จๆญคๅ่ฐใๅฎๆไพไบๅบ็จ็จๅบไธไธๆใ
+้ป่ฎคๆฅๅฟ็บงๅซใ ๆๅ
ณๆฅๅฟ่ฎฐๅฝ็ๆดๅค่ฏฆ็ปไฟกๆฏ๏ผ่ฏทๅ้
[ๆฅๅฟๅ่](../reference/runtime/log)ใ
-### ๅบ็จ้ๅบๅ่ฐ
+### ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ
ๅ็งฐ๏ผOnShutdown
-็ฑปๅ๏ผfunc(ctx context.Context)
+ๅ็งฐ๏ผOnDomReady
-ๅจๅ็ซฏ่ขซ้ๆฏไนๅ๏ผๅบ็จ็จๅบ็ปๆญขไนๅ๏ผ่ฐ็จๆญคๅ่ฐใๅฎๆไพไบๅบ็จ็จๅบไธไธๆใ
+Default: `Error`
-### ๅ
ณ้ญๅบ็จ็จๅบไนๅๅ่ฐ
+The default log level for production builds. ๆๅ
ณๆฅๅฟ่ฎฐๅฝ็ๆดๅค่ฏฆ็ปไฟกๆฏ๏ผ่ฏทๅ้
[ๆฅๅฟๅ่](../reference/runtime/log)ใ
-ๅ็งฐ๏ผOnBeforeClose
+### ๅบ็จ้ๅบๅ่ฐ
็ฑปๅ๏ผfunc(ctx context.Context) bool
-ๅฆๆ่ฎพ็ฝฎไบๆญคๅ่ฐ๏ผๅฎๅฐๅจ้่ฟๅๅป็ชๅฃๅ
ณ้ญๆ้ฎๆ่ฐ็จ`runtime.Quit`ๅณๅฐ้ๅบๅบ็จ็จๅบๆถ่ขซ่ฐ็จ. ่ฟๅ `true` ๅฐๅฏผ่ดๅบ็จ็จๅบ็ปง็ปญ๏ผ`false` ๅฐ็ปง็ปญๆญฃๅธธๅ
ณ้ญใ่ฟๆๅฉไบไธ็จๆท็กฎ่ฎคไปไปฌๅธๆ้ๅบ็จๅบใ
+็ฑปๅ๏ผfunc(ctx context.Context)
-็คบไพ๏ผ
+ๆญคๅ่ฐๅจๅ็ซฏๅๅปบไนๅ่ฐ็จ๏ผไฝๅจ`index.html`ๅ ่ฝฝไนๅ่ฐ็จใ ๅฎๆไพไบๅบ็จ็จๅบไธไธๆใ
-```go title=windowsapp.go
-func (b *App) beforeClose(ctx context.Context) (prevent bool) {
- dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{
- ็ฑปๅ๏ผ runtime.QuestionDialog,
- Title: "Quit?",
- Message: "Are you sure you want to quit?",
- })
-
- if err != nil {
- return false
- }
- return dialog != "Yes"
-```
-
-### ็ชๅฃๅฏๅจ็ถๆ
+### ๅ
ณ้ญๅบ็จ็จๅบไนๅๅ่ฐ
ๅ็งฐ๏ผWindowStartState
-็ฑปๅ๏ผ options.WindowStartState
+็ฑปๅ๏ผfunc(ctx context.Context)
-ๅฎไน็ชๅฃๅจๅฏๅจๆถๅบๅฆไฝๅ็ฐใ
+ๅจๅ็ซฏๅ ่ฝฝๅฎๆฏ`index.html`ๅๅ
ถ่ตๆบๅ่ฐ็จๆญคๅ่ฐใ ๅฎๆไพไบๅบ็จ็จๅบไธไธๆใ
-| ๅผ | Win | Mac | Lin |
-| ---------- | --- | --- | --- |
-| Fullscreen | โ
| โ
| โ
|
-| Maximised | โ
| โ
| โ
|
-| Minimised | โ
| | โ
|
-
-### ็ปๅฎ
+### ็ชๅฃๅฏๅจ็ถๆ
ๅ็งฐ๏ผBind
-็ฑปๅ๏ผ []interface{}
+็ฑปๅ๏ผfunc(ctx context.Context)
-ๅฎไน้่ฆ็ปๅฎๅฐๅ็ซฏ็ๆนๆณ็ไธ้จๅ็ปๆๅฎไพใ
+ๅจๅ็ซฏ่ขซ้ๆฏไนๅ๏ผๅบ็จ็จๅบ็ปๆญขไนๅ๏ผ่ฐ็จๆญคๅ่ฐใ ๅฎๆไพไบๅบ็จ็จๅบไธไธๆใ
-### Windows
+### ็ปๅฎ
ๅ็งฐ๏ผWindows
็ฑปๅ๏ผ\*windows.Options
-่ฟๅฎไนไบ[Windows ็นๅฎ็้้กน](#windows-็นๅฎ้้กน)ใ
-
-### Mac
+ๅฆๆ่ฎพ็ฝฎไบๆญคๅ่ฐ๏ผๅฎๅฐๅจ้่ฟๅๅป็ชๅฃๅ
ณ้ญๆ้ฎๆ่ฐ็จ`runtime.Quit`ๅณๅฐ้ๅบๅบ็จ็จๅบๆถ่ขซ่ฐ็จ. ่ฟๅ `true` ๅฐๅฏผ่ดๅบ็จ็จๅบ็ปง็ปญ๏ผ`false` ๅฐ็ปง็ปญๆญฃๅธธๅ
ณ้ญใ Returning true will cause the application to continue, false will continue shutdown as normal. ่ฟๆๅฉไบไธ็จๆท็กฎ่ฎคไปไปฌๅธๆ้ๅบ็จๅบใ
ๅ็งฐ๏ผMac
+```go title=windowsapp.go
+func (b *App) beforeClose(ctx context.Context) (prevent bool) {
+ dialog, err := runtime.MessageDialog(ctx, runtime.MessageDialogOptions{
+ ็ฑปๅ๏ผ runtime.QuestionDialog,
+ Title: "Quit?",
+ Message: "Are you sure you want to quit?",
+ })
+
+ if err != nil {
+ return false
+ }
+ return dialog != "Yes"
+```
+
+### WindowStartState
็ฑปๅ๏ผ\*mac.Options
่ฟๅฎไนไบ[Mac ็นๅฎ็้้กน](#mac-็นๅฎ้้กน)ใ
-### Linux
-
ๅ็งฐ๏ผLinux
+| ๅผ | Win | Mac | Lin |
+| ---------- | --- | --- | --- |
+| Fullscreen | โ
| โ
| โ
|
+| Maximised | โ
| โ
| โ
|
+| Minimised | โ
| โ | โ
|
+
+### Bind
+
็ฑปๅ๏ผ\*linux.Options
่ฟๅฎไนไบ[Linux ็นๅฎ็้้กน](#linux-็นๅฎ้้กน).
-## Windows ็นๅฎ้้กน
-
-### ็ฝ้กต้ๆ
-
ๅ็งฐ๏ผWebviewIsTransparent
+### Windows
+
็ฑปๅ๏ผbool
-่ฎพ็ฝฎไธบ `true` ๆถๅฐไฝฟ WebView ่ๆฏ้ๆใ่ฟๆๅณ็ๅฆๆไฝ ไฝฟ็จ`rgba(0,0,0,0)`๏ผไธป็ชๅฃๅฐๆพ็คบใ้ๅธธไธ[็ชๅฃๅ้ๆ](#็ชๅฃๅ้ๆ)็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
-
-### ็ชๅฃๅ้ๆ
+็ฑปๅ๏ผ`*windows.Messages`
ๅ็งฐ๏ผWindowIsTranslucent
+### Mac
+
็ฑปๅ๏ผbool
-ๅฐๆญค่ฎพ็ฝฎไธบ `true` ๅฐไฝฟ็ชๅฃๅ้ๆใ้ๅธธไธ[็ฝ้กต้ๆ](#็ฝ้กต้ๆ) ็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
-
-### ็ฆ็จ็ชๅฃๅพๆ
+Type: \*mac.Options
ๅ็งฐ๏ผDisableWindowIcon
+### Linux
+
็ฑปๅ๏ผbool
ๅฐๆญค่ฎพ็ฝฎไธบ `true` ๅฐๅ ้คๆ ้ขๆ ๅทฆไธ่ง็ๅพๆ ใ
-### ็ฆ็จๆ ่พนๆก็ชๅฃ่ฃ
้ฅฐ
-
ๅ็งฐ๏ผDisableFramelessWindowDecorations
+## Windows ็นๅฎ้้กน
+
+### ็ฆ็จ็ชๅฃๅพๆ
+
็ฑปๅ๏ผbool
-ๅฐๆญค่ฎพ็ฝฎไธบ`true`ๅฐ็งป้ค[ๆ ่พนๆก](#ๆ ่พนๆก)ๆจกๅผไธ็็ชๅฃ่ฃ
้ฅฐใ่ฟๆๅณ็ๅฐไธไผๆ`Aero ้ดๅฝฑ` ๅ `ๅ่ง`ๆพ็คบๅจ็ชๅฃไธใ่ฏทๆณจๆ๏ผ`ๅ่ง`ๅชๅจ Windows 11 ไธๆฏๆใ
+็ฑปๅ๏ผbool
-### Webview ็จๆทๆฐๆฎ่ทฏๅพ
+่ฎพ็ฝฎไธบ `true` ๆถๅฐไฝฟ WebView ่ๆฏ้ๆใ ่ฟๆๅณ็ๅฆๆไฝ ไฝฟ็จ`rgba(0,0,0,0)`๏ผไธป็ชๅฃๅฐๆพ็คบใ ้ๅธธไธ[็ชๅฃๅ้ๆ](#็ชๅฃๅ้ๆ)็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
-ๅ็งฐ๏ผWebviewUserDataPath
+### ็ฆ็จๆ ่พนๆก็ชๅฃ่ฃ
้ฅฐ
็ฑปๅ๏ผstring
-่ฟๅฎไนไบ WebView2 ๅญๅจ็จๆทๆฐๆฎ็่ทฏๅพใๅฆๆไธบ็ฉบๅฐไฝฟ็จ`%APPDATA%\[BinaryName.exe]`ใ
+็ฑปๅ๏ผbool
-### ไธป้ข
+ๅฐๆญค่ฎพ็ฝฎไธบ `true` ๅฐไฝฟ็ชๅฃๅ้ๆใ ้ๅธธไธ[็ฝ้กต้ๆ](#็ฝ้กต้ๆ) ็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
-ๅ็งฐ๏ผTheme
+### Webview ็จๆทๆฐๆฎ่ทฏๅพ
็ฑปๅ๏ผ`windows.Theme`
-ๆไฝ Windows ็ๆฌ๏ผWindows 10 2004/20H1
+็ฑปๅ๏ผbool
่ฟๅฎไนไบๅบ็จ็จๅบๅบ่ฏฅไฝฟ็จ็ไธป้ข๏ผ
-| ๅผ | ๆ่ฟฐ |
-| ------------- | ---------------------------------------------------------------------------------- |
-| SystemDefault | _้ป่ฎค_. ไธป้ขๅฐๅบไบ็ณป็ป้ป่ฎคๅผใๅฆๆ็จๆทๆดๆนไบไปไปฌ็ไธป้ข๏ผๅบ็จ็จๅบๅฐๆดๆฐไปฅไฝฟ็จๆฐ่ฎพ็ฝฎ |
-| Dark | ่ฏฅๅบ็จ็จๅบๅฐๅชไฝฟ็จๆทฑ่ฒไธป้ข |
-| Light | ่ฏฅๅบ็จ็จๅบๅฐๅชไฝฟ็จๆต
่ฒไธป้ข |
-
-### ่ชๅฎไนไธป้ข
+### ไธป้ข
ๅ็งฐ๏ผCustomTheme
-็ฑปๅ๏ผ`windows.CustomTheme`
+็ฑปๅ๏ผbool
-ๆไฝ Windows ็ๆฌ๏ผWindows 10/11 2009/21H2 Build 22000
+ๅฐๆญค่ฎพ็ฝฎไธบ`true`ๅฐ็งป้ค[ๆ ่พนๆก](#ๆ ่พนๆก)ๆจกๅผไธ็็ชๅฃ่ฃ
้ฅฐใ ่ฟๆๅณ็ๅฐไธไผๆ`Aero ้ดๅฝฑ` ๅ `ๅ่ง`ๆพ็คบๅจ็ชๅฃไธใ ่ฏทๆณจๆ๏ผ`ๅ่ง`ๅชๅจ Windows 11 ไธๆฏๆใ
+
+### ่ชๅฎไนไธป้ข
ๅ
่ฎธๆจไธบๆต
่ฒๅๆทฑ่ฒๆจกๅผไปฅๅ็ชๅฃๅคไบๆดปๅจๆ้ๆดปๅจ็ถๆ็ TitleBarใTitleText ๅ Border ๆๅฎ่ชๅฎไน้ข่ฒใ
-#### ่ชๅฎไนไธป้ข
+็ฑปๅ๏ผstring
-CustomTheme ็ปๆไฝฟ็จ `int32` ๆๅฎ้ข่ฒๅผ. ่ฟไบๆฏ้ๆ ๅ Windows ๆ ผๅผ๏ผ
-`0x00BBGGAA`ใ ๆไพไบไธไธช่พ
ๅฉๅฝๆฐๆฅๅฐ RGB ่ฝฌๆขไธบ่ฟ็งๆ ผๅผ๏ผ`windows.RGB(r,g,b uint8)`ใ
+่ฟๅฎไนไบ WebView2 ๅญๅจ็จๆทๆฐๆฎ็่ทฏๅพใ ๅฆๆไธบ็ฉบๅฐไฝฟ็จ`%APPDATA%\[BinaryName.exe]`ใ
-ๆณจๆ๏ผไปปไฝๆชๆไพ็ๅผ้ฝๅฐ้ป่ฎคไธบ้ป่ฒใ
-
-```go
-type ThemeSettings struct {
- DarkModeTitleBar int32
- DarkModeTitleBarInactive int32
- DarkModeTitleText int32
- DarkModeTitleTextInactive int32
- DarkModeBorder int32
- DarkModeBorderInactive int32
- LightModeTitleBar int32
- LightModeTitleBarInactive int32
- LightModeTitleText int32
- LightModeTitleTextInactive int32
- LightModeBorder int32
- LightModeBorderInactive int32
-}
-```
+### ๆถๆฏ
็คบไพ๏ผ
+็ฑปๅ๏ผstring
+
+This defines the path to a directory with WebView2 executable files and libraries. If empty, webview2 installed in the system will be used.
+
+Important information about distribution of fixed version runtime:
+- [How to get and extract runtime](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#details-about-the-fixed-version-runtime-distribution-mode)
+- [Known issues for fixed version](https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#known-issues-for-fixed-version)
+- [The path of fixed version of the WebView2 Runtime should not contain \Edge\Application\.](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.1245.22#createcorewebview2environmentwithoptions)
+
+### ๆ ้ขๆ
+
+ๅ็งฐ๏ผTitleBar
+
+็ฑปๅ๏ผ[\*mac.TitleBar](#ๆ ้ขๆ ็ปๆ)
+
+TitleBar ็ปๆๆไพไบ้
็ฝฎๆ ้ขๆ ๅค่ง็่ฝๅใ
+
+ๅ็งฐ๏ผAppearance
+
+| ๅผ | ๆ่ฟฐ |
+| ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
+| SystemDefault | _้ป่ฎค_. ไธป้ขๅฐๅบไบ็ณป็ป้ป่ฎคๅผใ The theme will be based on the system default. ๅฆๆ็จๆทๆดๆนไบไปไปฌ็ไธป้ข๏ผๅบ็จ็จๅบๅฐๆดๆฐไปฅไฝฟ็จๆฐ่ฎพ็ฝฎ |
+| Dark | ่ฏฅๅบ็จ็จๅบๅฐๅชไฝฟ็จๆทฑ่ฒไธป้ข |
+| Light | ไปๆ ทๅผๆฉ็ ไธญ็งป้ค [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/)ใ |
+
+
+### ๅค่ง
+
+็ฑปๅ๏ผ[AppearanceType](#ๅค่ง็ฑปๅ)
+
+Appearance ็จไบๆ นๆฎ Apple ็ [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) ๅ็งฐ่ฎพ็ฝฎๅบ็จ็จๅบ็ๆ ทๅผใ
+
+ๅ็งฐ๏ผWebviewIsTransparent
+
+็ฑปๅ๏ผbool
+
+#### ๅค่ง
+
+CustomTheme ็ปๆไฝฟ็จ `int32` ๆๅฎ้ข่ฒๅผ. ่ฟไบๆฏ้ๆ ๅ Windows ๆ ผๅผ๏ผ `0x00BBGGAA`ใ These are in the standard(!) Windows format of: `0x00BBGGAA`. ๆไพไบไธไธช่พ
ๅฉๅฝๆฐๆฅๅฐ RGB ่ฝฌๆขไธบ่ฟ็งๆ ผๅผ๏ผ`windows.RGB(r,g,b uint8)`ใ
+
+ๅ็งฐ๏ผWindowIsTranslucent
+
+```go
+type ThemeSettings struct {
+ DarkModeTitleBar int32
+ DarkModeTitleBarInactive int32
+ DarkModeTitleText int32
+ DarkModeTitleTextInactive int32
+ DarkModeBorder int32
+ DarkModeBorderInactive int32
+ LightModeTitleBar int32
+ LightModeTitleBarInactive int32
+ LightModeTitleText int32
+ LightModeTitleTextInactive int32
+ LightModeBorder int32
+ LightModeBorderInactive int32
+}
+```
+
+ๅ็งฐ๏ผMac
```go
CustomTheme: &windows.ThemeSettings{
// Theme to use when window is active
@@ -445,116 +497,139 @@ type ThemeSettings struct {
},
```
-### ๆถๆฏ
-
-ๅ็งฐ๏ผMessages
-
-็ฑปๅ๏ผ`*windows.Messages`
-
-ไธไธชๅฆๆๆพไธๅฐๆๆ็ webview2 ่ฟ่กๆถ๏ผwebview2 ๅฎ่ฃ
็จๅบๆไฝฟ็จ็ๅญ็ฌฆไธฒ็ปๆใ
-ๆจๅฏไปฅ้ๆฉๆฏๆ็ไปปๆ่ฏญ่จๅฎๅถๆญค้้กนใ
-
-## Mac ็นๅฎ้้กน
-
-### ๆ ้ขๆ
-
-ๅ็งฐ๏ผTitleBar
-
-็ฑปๅ๏ผ[\*mac.TitleBar](#ๆ ้ขๆ ็ปๆ)
-
-TitleBar ็ปๆๆไพไบ้
็ฝฎๆ ้ขๆ ๅค่ง็่ฝๅใ
-
-### ๅค่ง
-
-ๅ็งฐ๏ผAppearance
-
-็ฑปๅ๏ผ[AppearanceType](#ๅค่ง็ฑปๅ)
-
-Appearance ็จไบๆ นๆฎ Apple ็ [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) ๅ็งฐ่ฎพ็ฝฎๅบ็จ็จๅบ็ๆ ทๅผใ
-
### ็ฝ้กต้ๆ
-ๅ็งฐ๏ผWebviewIsTransparent
-
-็ฑปๅ๏ผbool
-
-่ฎพ็ฝฎไธบ `true` ๆถๅฐไฝฟ WebView ่ๆฏ้ๆใ่ฟๆๅณ็ๅฆๆไฝ ไฝฟ็จ`rgba(0,0,0,0)`๏ผไธป็ชๅฃๅฐๆพ็คบใ้ๅธธไธ[็ชๅฃๅ้ๆ](#็ชๅฃๅ้ๆ)็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
-
-### ็ชๅฃๅ้ๆ
-
-ๅ็งฐ๏ผWindowIsTranslucent
-
-็ฑปๅ๏ผbool
-
-ๅฐๆญค่ฎพ็ฝฎไธบ `true` ๅฐไฝฟ็ชๅฃๅ้ๆใ้ๅธธไธ[็ฝ้กต้ๆ](#็ฝ้กต้ๆ) ็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
-
-### ๅ
ณไบ
+ๅ็งฐ๏ผTheme
ๅ็งฐ๏ผAbout
-็ฑปๅ๏ผ[About](#ๅ
ณไบ็ปๆ)
+ไธไธชๅฆๆๆพไธๅฐๆๆ็ webview2 ่ฟ่กๆถ๏ผwebview2 ๅฎ่ฃ
็จๅบๆไฝฟ็จ็ๅญ็ฌฆไธฒ็ปๆใ ๆจๅฏไปฅ้ๆฉๆฏๆ็ไปปๆ่ฏญ่จๅฎๅถๆญค้้กนใ
+
+### ็ชๅฃๅ้ๆ
ๆญค้
็ฝฎๅ
่ฎธๆจไธบโAppMenuโ role ๅๅปบ็ๅบ็จ็จๅบ่ๅไธญ็โๅ
ณไบโ่ๅ้กน่ฎพ็ฝฎๆ ้ขใๆถๆฏๅๅพๆ ใ
-#### ๆ ้ขๆ ็ปๆ
-
ๅฏไปฅไฝฟ็จ TitleBar ้้กน่ชๅฎไนๅบ็จ็จๅบ็ๆ ้ขๆ ๏ผ
-```go
-type TitleBar struct {
- TitlebarAppearsTransparent bool
- HideTitle bool
- HideTitleBar bool
- FullSizeContent bool
- UseToolbar bool
- HideToolbarSeparator bool
-}
-```
+ResizeDebounceMS is the amount of time to debounce redraws of webview2 when resizing the window. The default value (0) will perform redraws as fast as it can.
-| ๅ็งฐ | ๆ่ฟฐ |
-| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
-| TitlebarAppearsTransparent | ไฝฟๆ ้ขๆ ้ๆใ[Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) |
-| HideTitle | ้่็ชๅฃ็ๆ ้ขใ[Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) |
-| HideTitleBar | ไปๆ ทๅผๆฉ็ ไธญ็งป้ค [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/)ใ |
-| FullSizeContent | ไฝฟ webview ๅกซๆปกๆดไธช็ชๅฃใ[Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) |
-| UseToolbar | ๅ็ชๅฃๆทปๅ ้ป่ฎคๅทฅๅ
ทๆ ใ [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) |
-| HideToolbarSeparator | ๅ ้คๅทฅๅ
ทๆ ไธๆน็็บฟๆกใ [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) |
+### ๅ
ณไบ
+
+็คบไพ๏ผ
+
+ๅๅป[ๆญคๅค](https://github.com/lukakerr/NSWindowStyles)่ทๅๆๅ
ณ่ชๅฎไนๆ ้ขๆ ็ไธไบ็ตๆใ
+
+ๆจๅฏไปฅๆๅฎๅบ็จ็จๅบ็[ๅค่ง](https://developer.apple.com/documentation/appkit/nsappearance?language=objc)ใ
+
+### OnResume
+
+็คบไพ๏ผ
+
+ๅๅป[ๆญคๅค](https://github.com/lukakerr/NSWindowStyles)่ทๅๆๅ
ณ่ชๅฎไนๆ ้ขๆ ็ไธไบ็ตๆใ
+
+โๅ
ณไบโ่ๅ้กนๅฐๅบ็ฐๅจๅบ็จ็จๅบ่ๅไธญ๏ผ
+
+
+
+## Mac ็นๅฎ้้กน
+
+### TitleBar
+
+ๅ็งฐ๏ผOnBeforeClose
+
+ๅๅปๅ๏ผๅฐๆๅผไธไธชๅ
ณไบๆถๆฏๆก๏ผ
+
+The TitleBar struct provides the ability to configure the look and feel of the title bar.
+
+### Appearance
+
+ๅ็งฐ๏ผIcon
+
+็ฑปๅ๏ผ[]byte
+
+Appearance is used to set the style of your app in accordance with Apple's [NSAppearance](https://developer.apple.com/documentation/appkit/nsappearancename?language=objc) names.
+
+### ็ฆ็จ็ชๅฃๅพๆ
+
+็ฑปๅ๏ผbool
+
+็ฑปๅ๏ผbool
+
+่ฎพ็ฝฎไธบ `true` ๆถๅฐไฝฟ WebView ่ๆฏ้ๆใ ่ฟๆๅณ็ๅฆๆไฝ ไฝฟ็จ`rgba(0,0,0,0)`๏ผไธป็ชๅฃๅฐๆพ็คบใ ้ๅธธไธ[็ชๅฃๅ้ๆ](#็ชๅฃๅ้ๆ)็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
+
+### ็ฆ็จๆ ่พนๆก็ชๅฃ่ฃ
้ฅฐ
+
+็ฑปๅ๏ผstring
+
+็ฑปๅ๏ผbool
+
+ๅฐๆญค่ฎพ็ฝฎไธบ `true` ๅฐไฝฟ็ชๅฃๅ้ๆใ ้ๅธธไธ[็ฝ้กต้ๆ](#็ฝ้กต้ๆ) ็ปๅไฝฟ็จไปฅๅถไฝๅฐ้ๆๆ็ๅบ็จ็จๅบใ
+
+### About
+
+ๅ็งฐ๏ผWebviewUserDataPath
+
+็ฑปๅ๏ผ[About](#ๅ
ณไบ็ปๆ)
+
+This configuration lets you set the title, message and icon for the "About" menu item in the app menu created by the "AppMenu" role.
+
+#### ๆ ้ขๆ ็ปๆ
้ข่ฎพ็ๆ ้ขๆ ่ฎพ็ฝฎๅฏ็จ๏ผ
-| ่ฎพ็ฝฎ | ็คบไพ |
+```go
+type TitleBar struct {
+ TitlebarAppearsTransparent bool
+ HideTitle bool
+ HideTitleBar bool
+ FullSizeContent bool
+ UseToolbar bool
+ HideToolbarSeparator bool
+}
+```
+
+| ่ฎพ็ฝฎ | ๆ่ฟฐ |
+| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| TitlebarAppearsTransparent | ไฝฟๆ ้ขๆ ้ๆใ This has the effect of hiding the titlebar and the content fill the window. [Apple Docs](https://developer.apple.com/documentation/appkit/nswindow/1419167-titlebarappearstransparent?language=objc) |
+| HideTitle | ้่็ชๅฃ็ๆ ้ขใ [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowtitlevisibility?language=objc) |
+| HideTitleBar | Removes [NSWindowStyleMaskTitled](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktitled/) from the style mask |
+| FullSizeContent | ไฝฟ webview ๅกซๆปกๆดไธช็ชๅฃใ [Apple Docs](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemaskfullsizecontentview) |
+| UseToolbar | ๅ็ชๅฃๆทปๅ ้ป่ฎคๅทฅๅ
ทๆ ใ [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc) |
+| HideToolbarSeparator | ๅ ้คๅทฅๅ
ทๆ ไธๆน็็บฟๆกใ [Apple Docs](https://developer.apple.com/documentation/appkit/nstoolbar/1516954-showsbaselineseparator?language=objc) |
+
+Preconfigured titlebar settings are available:
+
+| ๅผ | ๆ่ฟฐ |
| --------------------------- | --------------------------------------------- |
| `mac.TitleBarDefault()` |  |
| `mac.TitleBarHidden()` |  |
| `mac.TitleBarHiddenInset()` |  |
-็คบไพ๏ผ
-
+ๅ็งฐ๏ผMac
```go
Mac: &mac.Options{
- TitleBar: mac.TitleBarHiddenInset(),
+ TitleBar: mac.TitleBarHiddenInset(),
}
```
-ๅๅป[ๆญคๅค](https://github.com/lukakerr/NSWindowStyles)่ทๅๆๅ
ณ่ชๅฎไนๆ ้ขๆ ็ไธไบ็ตๆใ
+Click [here](https://github.com/lukakerr/NSWindowStyles) for some inspiration on customising the titlebar.
#### ๅค่ง็ฑปๅ
-ๆจๅฏไปฅๆๅฎๅบ็จ็จๅบ็[ๅค่ง](https://developer.apple.com/documentation/appkit/nsappearance?language=objc)ใ
+You can specify the application's [appearance](https://developer.apple.com/documentation/appkit/nsappearance?language=objc).
-| ๅผ | ๆ่ฟฐ |
-| ----------------------------------------------------- | ------------------------------ |
-| DefaultAppearance | ไฝฟ็จ้ป่ฎค็ณป็ปๅผ |
-| NSAppearanceNameAqua | ๆ ๅๆฅ้ด็ณป็ปๅค่ง |
-| NSAppearanceNameDarkAqua | ๆ ๅ้ปๅค็ณป็ปๅค่ง |
-| NSAppearanceNameVibrantLight | ่ฝป็็ตๅจ็ๅค่ง |
+| ๅผ | ๆ่ฟฐ |
+| ----------------------------------------------------- | --------------- |
+| DefaultAppearance | ไฝฟ็จ้ป่ฎค็ณป็ปๅผ |
+| NSAppearanceNameAqua | ๆ ๅๆฅ้ด็ณป็ปๅค่ง |
+| NSAppearanceNameDarkAqua | ๆ ๅ้ปๅค็ณป็ปๅค่ง |
+| NSAppearanceNameVibrantLight | ่ฝป็็ตๅจ็ๅค่ง |
| NSAppearanceNameAccessibilityHighContrastAqua | ๆ ๅ็ฝๅคฉ็ณป็ปๅค่ง็้ซๅฏนๆฏๅบฆ็ๆฌ |
| NSAppearanceNameAccessibilityHighContrastDarkAqua | ๆ ๅ้ปๅค็ณป็ปๅค่ง็้ซๅฏนๆฏๅบฆ็ๆฌ |
-| NSAppearanceNameAccessibilityHighContrastVibrantLight | ่ฝป็็ตๅจๅค่ง็้ซๅฏนๆฏๅบฆ็ๆฌ |
-| NSAppearanceNameAccessibilityHighContrastVibrantDark | ๆทฑ่ฒๆดปๅๅค่ง็้ซๅฏนๆฏๅบฆ็ๆฌ |
-
-็คบไพ๏ผ
+| NSAppearanceNameAccessibilityHighContrastVibrantLight | ่ฝป็็ตๅจๅค่ง็้ซๅฏนๆฏๅบฆ็ๆฌ |
+| NSAppearanceNameAccessibilityHighContrastVibrantDark | ๆทฑ่ฒๆดปๅๅค่ง็้ซๅฏนๆฏๅบฆ็ๆฌ |
+ๅ็งฐ๏ผMac
```go
Mac: &mac.Options{
Appearance: mac.NSAppearanceNameDarkAqua,
@@ -565,21 +640,27 @@ Mac: &mac.Options{
```go
type AboutInfo struct {
- Title string
- Message string
- Icon []byte
+ Title string
+ Message string
+ Icon []byte
}
```
-
-ๅฆๆๆไพไบ่ฟไบ่ฎพ็ฝฎ๏ผโๅ
ณไบโ่ๅ้กนๅฐๅบ็ฐๅจๅบ็จ็จๅบ่ๅไธญ๏ผไฝฟ็จ`AppMenu` role ๆถ๏ผใๅปบ่ฎฎ่ฟๆ ท้
็ฝฎ๏ผ
-
+ๅฆๆๆไพไบ่ฟไบ่ฎพ็ฝฎ๏ผโๅ
ณไบโ่ๅ้กนๅฐๅบ็ฐๅจๅบ็จ็จๅบ่ๅไธญ๏ผไฝฟ็จ`AppMenu` role ๆถ๏ผใ ๅปบ่ฎฎ่ฟๆ ท้
็ฝฎ๏ผ
```go
//go:embed build/appicon.png
var icon []byte
func main() {
- err := wails.Run(&options.App{
- ...
+ err := wails.Run(&options.App{
+ ...
+ Mac: &mac.Options{
+ About: &mac.AboutInfo{
+ Title: "My Application",
+ Message: "ยฉ 2021 Me",
+ Icon: icon,
+ },
+ },
+ })
Mac: &mac.Options{
About: &mac.AboutInfo{
Title: "My Application",
@@ -589,45 +670,32 @@ func main() {
},
})
```
-
-โๅ
ณไบโ่ๅ้กนๅฐๅบ็ฐๅจๅบ็จ็จๅบ่ๅไธญ๏ผ
+The "About" menu item will appear in the app menu:
-

+
-
-ๅๅปๅ๏ผๅฐๆๅผไธไธชๅ
ณไบๆถๆฏๆก๏ผ
+
+
+When clicked, that will open an about message box:
-

+
-
+
+
## Linux ็นๅฎ้้กน
### Icon
-ๅ็งฐ๏ผIcon
+Name: Icon
-็ฑปๅ๏ผ[]byte
+Type: []byte
-่ฎพ็ฝฎไปฃ่กจ็ชๅฃ็ๅพๆ ใๅฝ็ชๅฃๆๅฐๅ๏ผไน็งฐไธบๅพๆ ๅ๏ผๆถไฝฟ็จๆญคๅพๆ ใไธไบ็ชๅฃ็ฎก็ๅจๆๆก้ข็ฏๅขไนๅฏ่ฝๅฐๅ
ถๆพ็ฝฎๅจ็ชๅฃๆกๆถไธญ๏ผๆๅจๅ
ถไปไธไธๆไธญๆพ็คบใๅจๅ
ถไปๆ
ๅตไธ๏ผๆ นๆฌไธไฝฟ็จ่ฏฅๅพๆ ๏ผๅ ๆญคๆจ็้ข่ฎกๆ
ๅตๅฏ่ฝไผๆๆไธๅใ
+่ฎพ็ฝฎไปฃ่กจ็ชๅฃ็ๅพๆ ใ ๅฝ็ชๅฃๆๅฐๅ๏ผไน็งฐไธบๅพๆ ๅ๏ผๆถไฝฟ็จๆญคๅพๆ ใ ไธไบ็ชๅฃ็ฎก็ๅจๆๆก้ข็ฏๅขไนๅฏ่ฝๅฐๅ
ถๆพ็ฝฎๅจ็ชๅฃๆกๆถไธญ๏ผๆๅจๅ
ถไปไธไธๆไธญๆพ็คบใ ๅจๅ
ถไปๆ
ๅตไธ๏ผๆ นๆฌไธไฝฟ็จ่ฏฅๅพๆ ๏ผๅ ๆญคๆจ็้ข่ฎกๆ
ๅตๅฏ่ฝไผๆๆไธๅใ
-ๆณจๆ๏ผWayland ไธ็ Gnome ่ณๅฐไธๆพ็คบๆญคๅพๆ ใ่ฆๅจ้ฃ้ๆไธไธชๅบ็จ็จๅบๅพๆ ๏ผๅฟ
้กปไฝฟ็จไธไธช`.desktop`ๆไปถใๅจ KDE ไธๅฎๅบ่ฏฅๅฏไปฅๅทฅไฝใ
+ๆณจๆ๏ผWayland ไธ็ Gnome ่ณๅฐไธๆพ็คบๆญคๅพๆ ใ ่ฆๅจ้ฃ้ๆไธไธชๅบ็จ็จๅบๅพๆ ๏ผๅฟ
้กปไฝฟ็จไธไธช`.desktop`ๆไปถใ ๅจ KDE ไธๅฎๅบ่ฏฅๅฏไปฅๅทฅไฝใ
-ๅพๆ ๅบ่ฏฅไปฅ่ช็ถ็ปๅถ็ไปปไฝๅฐบๅฏธๆไพ๏ผไนๅฐฑๆฏ่ฏด๏ผๅจไผ ้ๅพๅไนๅไธ่ฆ็ผฉๆพๅพๅใ
-็ผฉๆพๅฐๅปถ่ฟๅฐๅฝๆ้็ๆ็ปๅฐบๅฏธๅทฒ็ฅ็ๆๅไธๅป๏ผไปฅ่ทๅพๆไฝณ่ดจ้ใ
+ๅพๆ ๅบ่ฏฅไปฅ่ช็ถ็ปๅถ็ไปปไฝๅฐบๅฏธๆไพ๏ผไนๅฐฑๆฏ่ฏด๏ผๅจไผ ้ๅพๅไนๅไธ่ฆ็ผฉๆพๅพๅใ ็ผฉๆพๅฐๅปถ่ฟๅฐๅฝๆ้็ๆ็ปๅฐบๅฏธๅทฒ็ฅ็ๆๅไธๅป๏ผไปฅ่ทๅพๆไฝณ่ดจ้ใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx
index 1851ac70b..22f1ac671 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/project-config.mdx
@@ -4,7 +4,7 @@ sidebar_position: 5
# ้กน็ฎ้
็ฝฎ
-้กน็ฎ้
็ฝฎๅจ้กน็ฎ็ฎๅฝไธญ็`wails.json`ๆไปถไธญใ้
็ฝฎ็็ปๆๆฏ๏ผ
+้กน็ฎ้
็ฝฎๅจ้กน็ฎ็ฎๅฝไธญ็`wails.json`ๆไปถไธญใ ้
็ฝฎ็็ปๆๆฏ๏ผ
```json
{
@@ -13,26 +13,34 @@ sidebar_position: 5
"reloaddirs": "[่งฆๅ้ๆฐๅ ่ฝฝ็้ๅ ็ฎๅฝ๏ผ้ๅทๅ้๏ผ๏ผ่ฟไป
็จไบไธไบ้่ฆ่ตๆบ้
็ฝฎ]",
"frontend:install": "[ๅฎ่ฃ
node ไพ่ต็ๅฝไปค๏ผๅจ frontend ็ฎๅฝไธ่ฟ่ก - ้ๅธธๆฏ `npm install`]",
"frontend:build": "[ๆๅปบ่ตๆบ็ๅฝไปค๏ผๅจ frontend ็ฎๅฝไธ่ฟ่ก - ้ๅธธๆฏ `npm run build`]",
- "frontend:dev": "[ๆญคๅฝไปคๅทฒ่ขซ frontend:dev:build ๆฟไปฃใๅฆๆๆฒกๆๆๅฎ frontend:dev:build ๅฐๅ้ๅฐ่ฏฅๅฝไปค๏ผๅฆๆๆญคๅฝไปคไนๆฒกๆๆๅฎๅฐๅ้ๅฐ frontend:build]",
+ "frontend:dev": "[ๆญคๅฝไปคๅทฒ่ขซ frontend:dev:build ๆฟไปฃใ If frontend:dev:build is not specified will falls back to this command. ๅฆๆๆฒกๆๆๅฎ frontend:dev:build ๅฐๅ้ๅฐ่ฏฅๅฝไปค๏ผๅฆๆๆญคๅฝไปคไนๆฒกๆๆๅฎๅฐๅ้ๅฐ frontend:build]",
"frontend:dev:build": "[ๆญคๅฝไปค็ญๆไบๅผๅๆจกๅผไธญ็ frontend:build๏ผๅฆๆๆฒกๆๆๅฎๅๅ้ๅฐ frontend:dev]",
"frontend:dev:install": "[ๆญคๅฝไปค็ญๆไบๅผๅๆจกๅผไธญ็ frontend:install๏ผๅฆๆๆฒกๆๆๅฎๅๅชๆ frontend:install]",
- "frontend:dev:watcher": "[ๆญคๅฝไปคๅจ `wails dev` ไธ็ๅ็ฌ่ฟ็จไธญ่ฟ่กใๅฏน็ฌฌ 3 ๆน่งๅฏ่
ๆ็จ]",
+ "frontend:dev:watcher": "[ๆญคๅฝไปคๅจ `wails dev` ไธ็ๅ็ฌ่ฟ็จไธญ่ฟ่กใ If not specified falls back to frontend:dev]",
+ "frontend:dev:install": "[This command is the dev equivalent of frontend:install. If not specified falls back to frontend:install]",
+ "frontend:dev:watcher": "[This command is run in a separate process on `wails dev`. Useful for 3rd party watchers or starting 3d party dev servers]",
+ "frontend:dev:serverUrl": "[URL to a 3rd party dev server to be used to serve assets, EG Vite. ๅฏน็ฌฌ 3 ๆน่งๅฏ่
ๆ็จ]",
"frontend:dev:serverUrl": "[ไฝฟ็จ็ฌฌไธๆนๅผๅๆๅกๅจๆไพ่ตๆบ๏ผๆฏๅฆ Vite",
"wailsjsdir": "[่ชๅจ็ๆ็JSๆจกๅๅฐ่ขซๅๅปบ็็ฎๅฝ็็ธๅฏน่ทฏๅพ]",
"version": "[้กน็ฎ้
็ฝฎ็ๆฌ]",
"outputfilename": "[ไบ่ฟๅถๆไปถ็ๅ็งฐ]",
"debounceMS": 100, // ๅจๆฃๆตๅฐ่ตๆบๆดๆนๆถ๏ผๅผๅๆๅกๅจ็ญๅพ
้ๆฐๅ ่ฝฝ็ๆถ้ด
- "devServer": "[ๅฐ wails ๅผๅๆๅกๅจ็ปๅฎๅฐ็ๅฐๅใ้ป่ฎค๏ผlocalhost:34115]",
+ "devServer": "[ๅฐ wails ๅผๅๆๅกๅจ็ปๅฎๅฐ็ๅฐๅใ ้ป่ฎค๏ผlocalhost:34115]",
"appargs": "[ๅจdevๆจกๅผไธไปฅshellๆ ทๅผไผ ้็ปๅบ็จ็จๅบ็ๅๆฐ]",
"runNonNativeBuildHooks": false, // ๅฎไนๆๅปบ้ฉๅญๆฏๅฆๅบ่ฏฅ่ฟ่ก๏ผๅฐฝ็ฎกๅฎไปฌๆฏไธบไธปๆบๆไฝ็ณป็ปไปฅๅค็ๆไฝ็ณป็ปๅฎไน็ใ
- "postBuildHooks": {
- "GOOS/GOARCH": "[ๅจๆๅปบๆๅฎ็ GOOS/GOARCH ๅๅฐๆง่ก็ๅฝไปค๏ผ${platform} ๆฟๆขไธบ'GOOS/GOARCH'๏ผ${bin} ๆฟๆขไธบ็ผ่ฏๅ็ไบ่ฟๅถๆไปถ็่ทฏๅพใ'GOOS/GOARCH'้ฉๅญๅจ'GOOS/*'ๅ'*/*'้ฉๅญไนๅๆง่กใ]",
- "GOOS/*": "[ๅจๆๅปบๆๅฎ็ GOOS ๅๅฐๆง่ก็ๅฝไปค๏ผ${platform} ๆฟๆขไธบ'GOOS/GOARCH'๏ผ${bin} ๆฟๆขไธบ็ผ่ฏๅ็ไบ่ฟๅถๆไปถ็่ทฏๅพใ'GOOS/*'้ฉๅญๅจ'*/*'้ฉๅญไนๅๆง่กใ]",
- "*/*": "[ๆฏๆฌกๆๅปบๅๅฐๆง่ก็ๅฝไปค๏ผ${platform} ๆฟๆขไธบ'GOOS/GOARCH'๏ผ${bin} ๆฟๆขไธบ็ผ่ฏๅ็ไบ่ฟๅถๆไปถ็่ทฏๅพใ]"
+ "preBuildHooks": {
+ "GOOS/GOARCH": "[The command that will be executed before a build of the specified GOOS/GOARCH: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/GOARCH" hook is executed before the "GOOS/*" and "*/*" hook.]",
+ "GOOS/*": "[The command that will be executed before a build of the specified GOOS: ${platform} is replaced with the "GOOS/GOARCH". The "GOOS/*" hook is executed before the "*/*" hook.]",
+ "*/*": "[The command that will be executed before every build: ${platform} is replaced with the "GOOS/GOARCH".]"
+ "postBuildHooks": {
+ "GOOS/GOARCH": "[ๅจๆๅปบๆๅฎ็ GOOS/GOARCH ๅๅฐๆง่ก็ๅฝไปค๏ผ${platform} ๆฟๆขไธบ'GOOS/GOARCH'๏ผ${bin} ๆฟๆขไธบ็ผ่ฏๅ็ไบ่ฟๅถๆไปถ็่ทฏๅพใ 'GOOS/GOARCH'้ฉๅญๅจ'GOOS/*'ๅ'*/*'้ฉๅญไนๅๆง่กใ ]",
+ "GOOS/*": "[ๅจๆๅปบๆๅฎ็ GOOS ๅๅฐๆง่ก็ๅฝไปค๏ผ${platform} ๆฟๆขไธบ'GOOS/GOARCH'๏ผ${bin} ๆฟๆขไธบ็ผ่ฏๅ็ไบ่ฟๅถๆไปถ็่ทฏๅพใ 'GOOS/*'้ฉๅญๅจ'*/*'้ฉๅญไนๅๆง่กใ ]",
+ "*/*": "[ๆฏๆฌกๆๅปบๅๅฐๆง่ก็ๅฝไปค๏ผ${platform} ๆฟๆขไธบ'GOOS/GOARCH'๏ผ${bin} ๆฟๆขไธบ็ผ่ฏๅ็ไบ่ฟๅถๆไปถ็่ทฏๅพใ
+ ]"
},
"info": {
// ็จไบๅกซๅ
manifests ๅ version ไฟกๆฏ็ๆฐๆฎใ
- "companyName": "[ๅ
ฌๅธๅ็งฐใ ้ป่ฎค: [้กน็ฎๅ]]",
+ "companyName": "[ๅ
ฌๅธๅ็งฐใ ้ป่ฎค: [้กน็ฎๅ]]",
"productName": "[ไบงๅๅ็งฐใ ้ป่ฎค: [้กน็ฎๅ]]",
"productVersion": "[ไบงๅ็็ๆฌใ ้ป่ฎค: '1.0.0']",
"copyright": "[ไบงๅ็็ๆใ ้ป่ฎค: 'Copyright.........']",
@@ -44,4 +52,4 @@ sidebar_position: 5
่ฏฅๆไปถๅฐๅจ่ฟ่ก`wails build`ๆ`wails dev`ๆถ๏ผ็ฑ Wails CLI ่ฏปๅใ
-`wails build/dev`ๅฝไปคไธญ็`assetdir`ใ`reloaddirs`ใ`wailsjsdir`ใ`debounceMS`ใ`devserver`ๅ`frontenddevserverurl`ๆ ๅฟๅฐ่ฆ็้กน็ฎ้
็ฝฎๅนถไฝไธบๅ็ปญ่ฟ่ก็้ป่ฎคๅผใ
+`wails build/dev`ๅฝไปคไธญ็`assetdir`ใ`reloaddirs`ใ`wailsjsdir`ใ`debounceMS`ใ`devserver`ๅ`frontenddevserverurl`ๆ ๅฟๅฐ่ฆ็้กน็ฎ้
็ฝฎๅนถไฝไธบๅ็ปญ่ฟ่ก็้ป่ฎคๅผใ
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx
index d3ae2e6e8..eab04d107 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/browser.mdx
@@ -9,9 +9,12 @@ sidebar_position: 7
่ฟไบๆนๆณไธ็ณป็ปๆต่งๅจ็ธๅ
ณใ
### ๆต่งๅจๆๅผ URL
-
Go ๆนๆณ็ญพๅ: `BrowserOpenURL(ctx context.Context, url string)`
JS ๆนๆณ็ญพๅ: `BrowserOpenURL(url string)`
ไฝฟ็จ็ณป็ป้ป่ฎคๆต่งๅจๆๅผ็ปๅฎ็ URLใ
+
+
+
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx
index c9d415036..618f12844 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/dialog.mdx
@@ -1,5 +1,4 @@
---
-title: ๅฏน่ฏๆก
sidebar_position: 5
---
@@ -15,39 +14,46 @@ JS ่ฟ่กๆถๅฝๅไธๆฏๆๅฏน่ฏๆกใ
### ๆๅผ้ๆฉ็ฎๅฝๅฏน่ฏๆก
-ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉ็ฎๅฝใๅฏไปฅไฝฟ็จ [ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
+ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉ็ฎๅฝใ ๅฏไปฅไฝฟ็จ [ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
Go ๆนๆณ็ญพๅ: `OpenDirectoryDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)`
่ฟๅๅผ: ๆ้็ฎๅฝ๏ผๅฆๆ็จๆทๅๆถๅไธบ็ฉบ็ฝ๏ผๆ้่ฏฏ
+
### ๆๅผ้ๆฉๆไปถๅฏน่ฏๆก
-ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉๆไปถใๅฏไปฅไฝฟ็จ[ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
+ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉๆไปถใ ๅฏไปฅไฝฟ็จ [ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
Go ๆนๆณ็ญพๅ: `OpenFileDialog(ctx context.Context, dialogOptions OpenDialogOptions) (string, error)`
่ฟๅๅผ: ๆ้ๆไปถ๏ผๅฆๆ็จๆทๅๆถๅไธบ็ฉบ็ฝ๏ผๆ้่ฏฏ
+
+
### ๆๅผ้ๆฉๅคไธชๆไปถๅฏน่ฏๆก
-ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉๅคไธชๆไปถใๅฏไปฅไฝฟ็จ[ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
+ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉๅคไธชๆไปถใ ๅฏไปฅไฝฟ็จ [ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ๆๅผ้ๆฉๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
Go ๆนๆณ็ญพๅ: `OpenMultipleFilesDialog(ctx context.Context, dialogOptions OpenDialogOptions) ([]string, error)`
่ฟๅๅผ: ้ๅฎ็ๆไปถ๏ผๅฆๆ็จๆทๅๆถๅไธบ้ถ๏ผๆ้่ฏฏ
+
+
### ไฟๅญๆไปถๅฏน่ฏๆก
-ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉๆไปถๅไปฅ่ฟ่กไฟๅญใๅฏไปฅไฝฟ็จ[ไฟๅญๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ไฟๅญๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ชๅฎไนใ
+ๆๅผไธไธชๅฏน่ฏๆก๏ผๆ็คบ็จๆท้ๆฉๆไปถๅไปฅ่ฟ่กไฟๅญใ ๅฏไปฅไฝฟ็จ[ไฟๅญๆไปถๅฏน่ฏๆกๅๆฐ้้กน](#ไฟๅญๆไปถๅฏน่ฏๆกๅๆฐ้้กน)่ชๅฎไนใ
Go ๆนๆณ็ญพๅ: `SaveFileDialog(ctx context.Context, dialogOptions SaveDialogOptions) (string, error)`
่ฟๅๅผ: ๆ้ๆไปถ๏ผๅฆๆ็จๆทๅๆถๅไธบ็ฉบ็ฝ๏ผๆ้่ฏฏ
+
+
### ๆถๆฏๅฏน่ฏๆก
-ไฝฟ็จๆถๆฏๅฏน่ฏๆกๆพ็คบๆถๆฏใๅฏไปฅไฝฟ็จ[ๆถๆฏๅฏน่ฏๆกๅๆฐ้้กน](#ๆถๆฏๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
+ไฝฟ็จๆถๆฏๅฏน่ฏๆกๆพ็คบๆถๆฏใ ๅฏไปฅไฝฟ็จ[ๆถๆฏๅฏน่ฏๆกๅๆฐ้้กน](#ๆถๆฏๅฏน่ฏๆกๅๆฐ้้กน)่ฟ่ก่ชๅฎไนใ
Go ๆนๆณ็ญพๅ: `MessageDialog(ctx context.Context, dialogOptions MessageDialogOptions) (string, error)`
@@ -59,89 +65,86 @@ Go ๆนๆณ็ญพๅ: `MessageDialog(ctx context.Context, dialogOptions MessageDialog
```go
type OpenDialogOptions struct {
- DefaultDirectory string
- DefaultFilename string
- Title string
- Filters []FileFilter
- ShowHiddenFiles bool
- CanCreateDirectories bool
- ResolvesAliases bool
- TreatPackagesAsDirectories bool
+ DefaultDirectory string
+ DefaultFilename string
+ Title string
+ Filters []FileFilter
+ ShowHiddenFiles bool
+ CanCreateDirectories bool
+ ResolvesAliases bool
+ TreatPackagesAsDirectories bool
}
```
+| ๅญๆฎต | ๆ่ฟฐ | Win | Mac | Lin |
+| -------------------------- | ------------------- | --- | --- | --- |
+| DefaultDirectory | ๅฏน่ฏๆกๆๅผๆถๆพ็คบ็็ฎๅฝ | โ
| โ
| โ
|
+| DefaultFilename | ้ป่ฎคๆไปถๅ | โ
| โ
| โ
|
+| Title | ๅฏน่ฏๆก็ๆ ้ข | โ
| โ
| โ
|
+| [Filters](#filefilter) | ๆไปถ่ฟๆปคๅจๅ่กจ | โ
| โ
| โ
|
+| ShowHiddenFiles | ๆพ็คบ็ณป็ป้่็ๆไปถ | | โ
| โ
|
+| CanCreateDirectories | ๅ
่ฎธ็จๆทๅๅปบ็ฎๅฝ | | โ
| |
+| ResolvesAliases | ๅฆๆไธบ true๏ผๅ่ฟๅๆไปถ่ไธๆฏๅซๅ | | โ
| |
+| TreatPackagesAsDirectories | ๅ
่ฎธๅฏผ่ชๅฐๅ
| | โ
| |
-| ๅญๆฎต | ๆ่ฟฐ | Win | Mac | Lin |
-| -------------------------- | --------------------------------- | --- | --- | --- |
-| DefaultDirectory | ๅฏน่ฏๆกๆๅผๆถๆพ็คบ็็ฎๅฝ | โ
| โ
| โ
|
-| DefaultFilename | ้ป่ฎคๆไปถๅ | โ
| โ
| โ
|
-| Title | ๅฏน่ฏๆก็ๆ ้ข | โ
| โ
| โ
|
-| [Filters](#ๆไปถ่ฟๆปค) | ๆไปถ่ฟๆปคๅจๅ่กจ | โ
| โ
| โ
|
-| ShowHiddenFiles | ๆพ็คบ็ณป็ป้่็ๆไปถ | | โ
| โ
|
-| CanCreateDirectories | ๅ
่ฎธ็จๆทๅๅปบ็ฎๅฝ | | โ
| |
-| ResolvesAliases | ๅฆๆไธบ true๏ผๅ่ฟๅๆไปถ่ไธๆฏๅซๅ | | โ
| |
-| TreatPackagesAsDirectories | ๅ
่ฎธๅฏผ่ชๅฐๅ
| | โ
| |
### ไฟๅญๆไปถๅฏน่ฏๆกๅๆฐ้้กน
```go
type SaveDialogOptions struct {
- DefaultDirectory string
- DefaultFilename string
- Title string
- Filters []FileFilter
- ShowHiddenFiles bool
- CanCreateDirectories bool
- TreatPackagesAsDirectories bool
+ DefaultDirectory string
+ DefaultFilename string
+ Title string
+ Filters []FileFilter
+ ShowHiddenFiles bool
+ CanCreateDirectories bool
+ TreatPackagesAsDirectories bool
}
```
-| ๅญๆฎต | ๆ่ฟฐ | Win | Mac | Lin |
-| -------------------------- | ---------------------- | --- | --- | --- |
-| DefaultDirectory | ๅฏน่ฏๆกๆๅผๆถๆพ็คบ็็ฎๅฝ | โ
| โ
| โ
|
-| DefaultFilename | ้ป่ฎคๆไปถๅ | โ
| โ
| โ
|
-| Title | ๅฏน่ฏๆก็ๆ ้ข | โ
| โ
| โ
|
-| [Filters](#ๆไปถ่ฟๆปค) | ๆไปถ่ฟๆปคๅจๅ่กจ | โ
| โ
| โ
|
-| ShowHiddenFiles | ๆพ็คบ็ณป็ป้่็ๆไปถ | | โ
| โ
|
-| CanCreateDirectories | ๅ
่ฎธ็จๆทๅๅปบ็ฎๅฝ | | โ
| |
-| TreatPackagesAsDirectories | ๅ
่ฎธๅฏผ่ชๅฐๅ
| | โ
| |
+| ๅญๆฎต | ๆ่ฟฐ | Win | Mac | Lin |
+| -------------------------- | ----------- | --- | --- | --- |
+| DefaultDirectory | ๅฏน่ฏๆกๆๅผๆถๆพ็คบ็็ฎๅฝ | โ
| โ
| โ
|
+| DefaultFilename | ้ป่ฎคๆไปถๅ | โ
| โ
| โ
|
+| Title | ๅฏน่ฏๆก็ๆ ้ข | โ
| โ
| โ
|
+| [Filters](#filefilter) | ๆไปถ่ฟๆปคๅจๅ่กจ | โ
| โ
| โ
|
+| ShowHiddenFiles | ๆพ็คบ็ณป็ป้่็ๆไปถ | | โ
| โ
|
+| CanCreateDirectories | ๅ
่ฎธ็จๆทๅๅปบ็ฎๅฝ | | โ
| |
+| TreatPackagesAsDirectories | ๅ
่ฎธๅฏผ่ชๅฐๅ
| | โ
| |
### ๆถๆฏๅฏน่ฏๆกๅๆฐ้้กน
```go
type MessageDialogOptions struct {
- Type DialogType
- Title string
- Message string
- Buttons []string
- DefaultButton string
- CancelButton string
+ Type DialogType
+ Title string
+ Message string
+ Buttons []string
+ DefaultButton string
+ CancelButton string
}
```
-
-| ๅญๆฎต | ๆ่ฟฐ | Win | Mac | Lin |
-| ------------- | ---------------------------------------------------- | --- | --- | --- |
-| Type | ๆถๆฏๅฏน่ฏๆก็็ฑปๅ๏ผไพๅฆ้ฎ้ขใไฟกๆฏ... | โ
| โ
| โ
|
-| Title | ๅฏน่ฏๆก็ๆ ้ข | โ
| โ
| โ
|
-| Message | ๅ็จๆทๆพ็คบ็ๆถๆฏ | โ
| โ
| โ
|
-| Buttons | ๆ้ฎๆ ้ขๅ่กจ | | โ
| |
-| DefaultButton | ๅธฆๆๆญคๆๆฌ็ๆ้ฎๅบ่ขซ่งไธบ้ป่ฎคๆ้ฎใ Bound to `return` | | โ
| |
-| CancelButton | ๅธฆๆๆญคๆๆฌ็ๆ้ฎๅบ่ขซ่งไธบๅๆถใBound to `escape` | | โ
| |
+| ๅญๆฎต | ๆ่ฟฐ | Win | Mac | Lin |
+| ------------- | ----------------------------------- | --- | --- | --- |
+| Type | ๆถๆฏๅฏน่ฏๆก็็ฑปๅ๏ผไพๅฆ้ฎ้ขใไฟกๆฏ... | โ
| โ
| โ
|
+| Title | ๅฏน่ฏๆก็ๆ ้ข | โ
| โ
| โ
|
+| Message | ๅ็จๆทๆพ็คบ็ๆถๆฏ | โ
| โ
| โ
|
+| Buttons | ๆ้ฎๆ ้ขๅ่กจ | | โ
| |
+| DefaultButton | ๅธฆๆๆญคๆๆฌ็ๆ้ฎๅบ่ขซ่งไธบ้ป่ฎคๆ้ฎใ Bound to `return` | | โ
| |
+| CancelButton | ๅธฆๆๆญคๆๆฌ็ๆ้ฎๅบ่ขซ่งไธบๅๆถใ Bound to `escape` | | โ
| |
#### Windows
-Windows ๅ
ทๆๆ ๅๅฏน่ฏๆก็ฑปๅ๏ผๅ
ถไธญ็ๆ้ฎไธๅฏ่ชๅฎไนใ
-่ฟๅ็ๅผๅฐๆฏไปฅไธไนไธ๏ผ"Ok"ใ"Cancel"ใ"Abort"ใ"Retry"ใ"Ignore"ใ"Yes"ใ"No"ใ"Try Again"ๆ"Continue"
+Windows ๅ
ทๆๆ ๅๅฏน่ฏๆก็ฑปๅ๏ผๅ
ถไธญ็ๆ้ฎไธๅฏ่ชๅฎไนใ ่ฟๅ็ๅผๅฐๆฏไปฅไธไนไธ๏ผ"Ok"ใ"Cancel"ใ"Abort"ใ"Retry"ใ"Ignore"ใ"Yes"ใ"No"ใ"Try Again"ๆ"Continue"
#### Linux
-Linux ๆๆ ๅ็ๅฏน่ฏๆก็ฑปๅ๏ผๅ
ถไธญ็ๆ้ฎๆฏไธๅฏๅฎๅถ็ใ่ฟๅ็ๅผๅฐๆฏไปฅไธไนไธ๏ผโOkโใโCancelโใโYesโใโNoโ
+Linux ๆๆ ๅ็ๅฏน่ฏๆก็ฑปๅ๏ผๅ
ถไธญ็ๆ้ฎๆฏไธๅฏๅฎๅถ็ใ ่ฟๅ็ๅผๅฐๆฏไปฅไธไนไธ๏ผโOkโใโCancelโใโYesโใโNoโ
#### Mac
-Mac ไธ็ๆถๆฏๅฏน่ฏๆกๆๅคๅฏไปฅๆๅฎ 4 ไธชๆ้ฎใๅฆๆๆฒกๆ`DefaultButton`ๆ`CancelButton`็ปๅบ๏ผ็ฌฌไธไธชๆ้ฎ่ขซ่ฎคไธบๆฏ้ป่ฎค็ๅนถ็ปๅฎๅฐ`return`้ฎใ
+Mac ไธ็ๆถๆฏๅฏน่ฏๆกๆๅคๅฏไปฅๆๅฎ 4 ไธชๆ้ฎใ ๅฆๆๆฒกๆ`DefaultButton`ๆ`CancelButton`็ปๅบ๏ผ็ฌฌไธไธชๆ้ฎ่ขซ่ฎคไธบๆฏ้ป่ฎค็ๅนถ็ปๅฎๅฐ`return`้ฎใ
ๅฏนไบไปฅไธไปฃ็ ๏ผ
-
```go
selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Title: "It's your turn!",
@@ -149,23 +152,10 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Buttons: []string{"one", "two", "three", "four"},
})
```
-
-็ฌฌไธไธชๆ้ฎๆพ็คบไธบ้ป่ฎคๅผ๏ผ
-
-
-

-
-
+็ฌฌไธไธชๆ้ฎๆพ็คบไธบ้ป่ฎคๅผ๏ผdiv class="text--center">
+
ๅฆๆๆไปฌๆๅฎ`DefaultButton`ไธบโtwoโ๏ผ
-
```go
selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Title: "It's your turn!",
@@ -174,23 +164,14 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
DefaultButton: "two",
})
```
-
-็ฌฌไบไธชๆ้ฎๆพ็คบไธบ้ป่ฎคๅผใๅฝ `return` ่ขซๆไธๆถ๏ผๅ่ฟๅๆฐๅผโtwoโใ
-
+็ฌฌไบไธชๆ้ฎๆพ็คบไธบ้ป่ฎคๅผใ ๅฝ `return` ่ขซๆไธๆถ๏ผๅ่ฟๅๆฐๅผโtwoโใ
-

+
-
+
+
ๅฆๆๆไปฌ็ฐๅจๆๅฎ`CancelButton`ไธบโthreeโ๏ผ
-
```go
selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
Title: "It's your turn!",
@@ -200,31 +181,24 @@ selection, err := runtime.MessageDialog(b.ctx, runtime.MessageDialogOptions{
CancelButton: "three",
})
```
-
-ๅธฆๆโthreeโ็ๆ้ฎๆพ็คบๅจๅฏน่ฏๆก็ๅบ้จใๅฝ`escape`่ขซๆไธๆถ๏ผๅ่ฟๅๅผโthreeโ๏ผ
-
+ๅธฆๆโthreeโ็ๆ้ฎๆพ็คบๅจๅฏน่ฏๆก็ๅบ้จใ ๅฝ`escape`่ขซๆไธๆถ๏ผๅ่ฟๅๅผโthreeโ๏ผ
-

+
-
-
-
+
+
+
+
+
#### ๅฏน่ฏๆก็ฑปๅ
```go
const (
- InfoDialog DialogType = "info"
- WarningDialog DialogType = "warning"
- ErrorDialog DialogType = "error"
- QuestionDialog DialogType = "question"
+ InfoDialog DialogType = "info"
+ WarningDialog DialogType = "warning"
+ ErrorDialog DialogType = "error"
+ QuestionDialog DialogType = "question"
)
```
@@ -232,66 +206,53 @@ const (
```go
type FileFilter struct {
- DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)"
- Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png"
+ DisplayName string // Filter information EG: "Image Files (*.jpg, *.png)"
+ Pattern string // semi-colon separated list of extensions, EG: "*.jpg;*.png"
}
```
#### Windows
-Windows ๅ
่ฎธๆจๅจๅฏน่ฏๆกไธญไฝฟ็จๅคไธชๆไปถ่ฟๆปคๅจใๆฏไธช FileFilter ๅฐๅจๅฏน่ฏๆกไธญๆพ็คบไธบไธไธชๅ็ฌ็ๆก็ฎ๏ผ
+Windows ๅ
่ฎธๆจๅจๅฏน่ฏๆกไธญไฝฟ็จๅคไธชๆไปถ่ฟๆปคๅจใ ๆฏไธช FileFilter ๅฐๅจๅฏน่ฏๆกไธญๆพ็คบไธบไธไธชๅ็ฌ็ๆก็ฎ๏ผ
-

+
-
-
-
+
+
+
+
#### Linux
-Linux ๅ
่ฎธๆจๅจๅฏน่ฏๆกไธญไฝฟ็จๅคไธชๆไปถ่ฟๆปคๅจใๆฏไธช ๆไปถ่ฟๆปคๅจ ๅฐๅจๅฏน่ฏๆกไธญๆพ็คบไธบๅ็ฌ็ๆก็ฎ๏ผ
+Linux ๅ
่ฎธๆจๅจๅฏน่ฏๆกไธญไฝฟ็จๅคไธชๆไปถ่ฟๆปคๅจใ ๆฏไธช FileFilter ๅฐๅจๅฏน่ฏๆกไธญๆพ็คบไธบไธไธชๅ็ฌ็ๆก็ฎ๏ผ
-

+
-
-
-
+
+
+
+
+
#### Mac
-Mac ๅฏน่ฏๆกๅชๆไธ็ปๆจกๅผๆฅ่ฟๆปคๆไปถ็ๆฆๅฟตใๅฆๆๆไพไบๅคไธช FileFilters๏ผWails ๅฐไฝฟ็จๆๆๅฎไน็ๆจกๅผใ
+Mac ๅฏน่ฏๆกๅชๆไธ็ปๆจกๅผๆฅ่ฟๆปคๆไปถ็ๆฆๅฟตใ ๅฆๆๆไพไบๅคไธช FileFilters๏ผWails ๅฐไฝฟ็จๆๆๅฎไน็ๆจกๅผใ
็คบไพ๏ผ
-
```go
- selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{
- Title: "Select File",
- Filters: []runtime.FileFilter{
- {
- DisplayName: "Images (*.png;*.jpg)",
- Pattern: "*.png;*.jpg",
- }, {
- DisplayName: "Videos (*.mov;*.mp4)",
- Pattern: "*.mov;*.mp4",
- },
- },
- })
+ selection, err := runtime.OpenFileDialog(b.ctx, runtime.OpenDialogOptions{
+ Title: "Select File",
+ Filters: []runtime.FileFilter{
+ {
+ DisplayName: "Images (*.png;*.jpg)",
+ Pattern: "*.png;*.jpg",
+ }, {
+ DisplayName: "Videos (*.mov;*.mp4)",
+ Pattern: "*.mov;*.mp4",
+ },
+ },
+ })
```
-
-่ฟๅฐๅฏผ่ดไฝฟ็จ`*.png,*.jpg,*.mov,*.mp4`ไฝไธบ่ฟๆปคๅจๆๅผๆไปถๅฏน่ฏๆกใ
+่ฟๅฐๅฏผ่ดไฝฟ็จ`*.png,*.jpg,*.mov,*.mp4`ไฝไธบ่ฟๆปคๅจๆๅผๆไปถๅฏน่ฏๆกใ
\ No newline at end of file
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx
index d93a2c42a..6cdd40acb 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/events.mdx
@@ -1,5 +1,4 @@
---
-title: ไบไปถ
sidebar_position: 2
---
@@ -7,7 +6,7 @@ sidebar_position: 2
## ๆฆ่ฟฐ
-Wails ่ฟ่กๆถๆไพไบไธไธช็ปไธ็ไบไปถ็ณป็ป๏ผๅ
ถไธญไบไปถๅฏไปฅ็ฑ Go ๆ Javascript ๅๅบๆๆฅๆถใๅฏ้ๅฐ๏ผๆฐๆฎๅฏไปฅไธไบไปถไธ่ตทไผ ้ใไพฆๅฌๅจๅฐๆฅๆถๆฌๅฐๆฐๆฎ็ฑปๅไธญ็ๆฐๆฎใ
+Wails ่ฟ่กๆถๆไพไบไธไธช็ปไธ็ไบไปถ็ณป็ป๏ผๅ
ถไธญไบไปถๅฏไปฅ็ฑ Go ๆ Javascript ๅๅบๆๆฅๆถใ ๅฏ้ๅฐ๏ผๆฐๆฎๅฏไปฅไธไบไปถไธ่ตทไผ ้ใ ไพฆๅฌๅจๅฐๆฅๆถๆฌๅฐๆฐๆฎ็ฑปๅไธญ็ๆฐๆฎใ
### ๆทปๅ ไบไปถไพฆๅฌๅจ
@@ -15,7 +14,7 @@ Go ๆนๆณ็ญพๅ: `EventsOn(ctx context.Context, eventName string, callback func(
JS ๆนๆณ็ญพๅ: `EventsOn(eventName string, callback function(optionalData?: any))`
-ๆญคๆนๆณไธบ็ปๅฎ็ไบไปถๅ็งฐ่ฎพ็ฝฎไธไธชไพฆๅฌๅจใๅฝไธไธช`eventName`็ฑปๅ็ไบไปถ่ขซ[่งฆๅๆๅฎไบไปถ](#่งฆๅๆๅฎไบไปถ)ๆถ๏ผๅ่ฐ่ขซ่งฆๅใไธ่งฆๅไบไปถไธ่ตทๅ้็ไปปไฝๅ
ถไปๆฐๆฎ้ฝๅฐไผ ้็ปๅ่ฐใ
+ๆญคๆนๆณไธบ็ปๅฎ็ไบไปถๅ็งฐ่ฎพ็ฝฎไธไธชไพฆๅฌๅจใ ๅฝไธไธช`eventName`็ฑปๅ็ไบไปถ่ขซ[่งฆๅๆๅฎไบไปถ](#่งฆๅๆๅฎไบไปถ)ๆถ๏ผๅ่ฐ่ขซ่งฆๅใ ไธ่งฆๅไบไปถไธ่ตทๅ้็ไปปไฝๅ
ถไปๆฐๆฎ้ฝๅฐไผ ้็ปๅ่ฐใ
### ็งป้คไบไปถไพฆๅฌๅจ
@@ -47,4 +46,4 @@ Go ๆนๆณ็ญพๅ: `EventsEmit(ctx context.Context, eventName string, optionalData
JS ๆนๆณ็ญพๅ: `EventsEmit(ctx context, optionalData function(optionalData?: any))`
-ๆญคๆนๆณ่งฆๅๆๅฎ็ไบไปถใๅฏ้ๆฐๆฎๅฏไปฅไธไบไปถไธ่ตทไผ ้ใ่ฟๅฐ่งฆๅไปปไฝไบไปถไพฆๅฌๅจใ
+ๆญคๆนๆณ่งฆๅๆๅฎ็ไบไปถใ ๅฏ้ๆฐๆฎๅฏไปฅไธไบไปถไธ่ตทไผ ้ใ ่ฟๅฐ่งฆๅไปปไฝไบไปถไพฆๅฌๅจใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx
index 08abbef9f..617ec7316 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/intro.mdx
@@ -1,21 +1,20 @@
---
-title: ไป็ป
sidebar_position: 1
---
# ไป็ป
-่ฟ่กๆถๆฏไธไธชไธบๅบ็จ็จๅบๆไพๅฎ็จๆนๆณ็ๅบใๆ Go ๅ Javascript ่ฟ่กๆถ๏ผ็ฎ็ๆฏๅจๅฏ่ฝ็ๆ
ๅตไธๅฐ่ฏไฝฟๅฎไปฌไฟๆไธ่ดใ
+่ฟ่กๆถๆฏไธไธชไธบๅบ็จ็จๅบๆไพๅฎ็จๆนๆณ็ๅบใ ๆ Go ๅ Javascript ่ฟ่กๆถ๏ผ็ฎ็ๆฏๅจๅฏ่ฝ็ๆ
ๅตไธๅฐ่ฏไฝฟๅฎไปฌไฟๆไธ่ดใ
-Go ่ฟ่กๆถๅฏ้่ฟๅฏผๅ
ฅ`github.com/wailsapp/wails/v2/pkg/runtime`. ๆญคๅ
ไธญ็ๆๆๆนๆณ้ฝๅฐ context ไฝไธบ็ฌฌไธไธชๅๆฐใ่ฟไธช context ๅฏไปฅไป[ๅบ็จๅฏๅจๅ่ฐ](../../reference/options#ๅบ็จๅฏๅจๅ่ฐ) ๆ[ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](../../reference/options#ๅ็ซฏ-dom-ๅ ่ฝฝๅฎๆๅ่ฐ)ๅ่ฐไธญ่ทๅพใ
+Go ่ฟ่กๆถๅฏ้่ฟๅฏผๅ
ฅ`github.com/wailsapp/wails/v2/pkg/runtime`. ๆญคๅ
ไธญ็ๆๆๆนๆณ้ฝๅฐ context ไฝไธบ็ฌฌไธไธชๅๆฐใ All methods in this package take a context as the first parameter. This context should be obtained from the [OnStartup](../options.mdx#onstartup) or [OnDomReady](../options.mdx#ondomready) hooks.
:::info ๆณจๆ
-่ฝ็ถไธไธๆๅฐๆไพ็ป[ๅบ็จๅฏๅจๅ่ฐ](../../reference/options#ๅบ็จๅฏๅจๅ่ฐ)ๆนๆณ๏ผไฝไธ่ฝไฟ่ฏ่ฟ่กๆถๅฐๅจๆญคๆนๆณไธญๅทฅไฝ๏ผๅ ไธบ็ชๅฃๆญฃๅจไธๅ็็บฟ็จไธญๅๅงๅใๅฆๆๆจๅธๆๅจๅฏๅจๆถ่ฐ็จ่ฟ่กๆถๆนๆณ๏ผ่ฏทไฝฟ็จ[ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](../../reference/options#ๅ็ซฏ-dom-ๅ ่ฝฝๅฎๆๅ่ฐ)ๆนๆณใ
+่ฝ็ถไธไธๆๅฐๆไพ็ป[ๅบ็จๅฏๅจๅ่ฐ](../../reference/options#ๅบ็จๅฏๅจๅ่ฐ)ๆนๆณ๏ผไฝไธ่ฝไฟ่ฏ่ฟ่กๆถๅฐๅจๆญคๆนๆณไธญๅทฅไฝ๏ผๅ ไธบ็ชๅฃๆญฃๅจไธๅ็็บฟ็จไธญๅๅงๅใ ๅฆๆๆจๅธๆๅจๅฏๅจๆถ่ฐ็จ่ฟ่กๆถๆนๆณ๏ผ่ฏทไฝฟ็จ[ๅ็ซฏ Dom ๅ ่ฝฝๅฎๆๅ่ฐ](../../reference/options#ๅ็ซฏ-dom-ๅ ่ฝฝๅฎๆๅ่ฐ)ๆนๆณใ
:::
-Javascript ๅบๅฏ้่ฟ`window.runtime`ๆไพ็ปๅ็ซฏใไฝฟ็จ `ๅผๅ` ๆจกๅผๆถไผ็ๆไธไธช่ฟ่กๆถๅ
๏ผ่ฏฅๅ
ไธบ่ฟ่กๆถๆไพ Typescript ๅฃฐๆใ่ฟๅบ่ฏฅไฝไบๆจ็ๅ็ซฏ็ฎๅฝไธญ็`wailsjs`็ฎๅฝไธญใ
+Javascript ๅบๅฏ้่ฟ`window.runtime`ๆไพ็ปๅ็ซฏใ ไฝฟ็จ `ๅผๅ` ๆจกๅผๆถไผ็ๆไธไธช่ฟ่กๆถๅ
๏ผ่ฏฅๅ
ไธบ่ฟ่กๆถๆไพ Typescript ๅฃฐๆใ ่ฟๅบ่ฏฅไฝไบๆจ็ๅ็ซฏ็ฎๅฝไธญ็`wailsjs`็ฎๅฝไธญใ
### ้ๅบ
@@ -23,11 +22,27 @@ Go ๆนๆณ็ญพๅ: `Quit(ctx context.Context)`
้ๅบๅบ็จ็จๅบใ
+:::info Note On Mac, this will hide the application in the same way as the `Hide` menu item in standard Mac applications. This is different to hiding the window, but the application still being in the foreground. For Windows and Linux, this is currently the same as `WindowHide`. :::
+
### ็ฏๅข
+่ฟๅๅฝๅ็ฏๅข็่ฏฆ็ปไฟกๆฏใ
+
+Shows the application.
+
+:::info Note On Mac, this will bring the application back into the foreground. For Windows and Linux, this is currently the same as `WindowShow`. :::
+
+### Quit
+
Go ๆนๆณ็ญพๅ: `Environment(ctx context.Context) EnvironmentInfo`
-่ฟๅๅฝๅ็ฏๅข็่ฏฆ็ปไฟกๆฏใ
+Quits the application.
+
+### Environment
+
+Go Signature: `Environment(ctx context.Context) EnvironmentInfo`
+
+Returns details of the current environment.
#### ็ฏๅขไฟกๆฏ
@@ -36,3 +51,5 @@ type EnvironmentInfo struct {
BuildType string // Either "production", "debug" or "dev"
}
```
+
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx
index b7d537a2e..98bd211ee 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/log.mdx
@@ -1,5 +1,4 @@
---
-title: ๆฅๅฟ
sidebar_position: 3
---
@@ -7,16 +6,16 @@ sidebar_position: 3
## ๆฆ่ฟฐ
-Wails ่ฟ่กๆถๆไพไบไธ็งๅฏไปฅไป Go ๆ Javascript ่ฐ็จ็ๆฅๅฟ่ฎฐๅฝๆบๅถใๅๅคงๅคๆฐ่ฎฐๅฝๅจไธๆ ท๏ผๆ่ฎธๅคๆฅๅฟ็บงๅซ๏ผ
+Wails ่ฟ่กๆถๆไพไบไธ็งๅฏไปฅไป Go ๆ Javascript ่ฐ็จ็ๆฅๅฟ่ฎฐๅฝๆบๅถใ ๅๅคงๅคๆฐ่ฎฐๅฝๅจไธๆ ท๏ผๆ่ฎธๅคๆฅๅฟ็บงๅซ๏ผ
-- Trace
-- Debug
-- Info
-- Warning
-- Error
-- Fatal
+ - Trace
+ - Debug
+ - Info
+ - Warning
+ - Error
+ - Fatal
-่ฎฐๅฝๅจๅฐ่พๅบๅฝๅๆๆด้ซๆฅๅฟ็บงๅซ็ไปปไฝๆฅๅฟๆถๆฏใ็คบไพ๏ผ`Debug`ๆฅๅฟ็บงๅซๅฐ่พๅบ้ค`Trace`ๆถๆฏไนๅค็ๆๆๆถๆฏใ
+่ฎฐๅฝๅจๅฐ่พๅบๅฝๅๆๆด้ซๆฅๅฟ็บงๅซ็ไปปไฝๆฅๅฟๆถๆฏใ ็คบไพ๏ผ`Debug`ๆฅๅฟ็บงๅซๅฐ่พๅบ้ค`Trace`ๆถๆฏไนๅค็ๆๆๆถๆฏใ
### ๆๅฐๆฅๅฟ
@@ -122,28 +121,29 @@ Go ๆนๆณ็ญพๅ: `LogSetLogLevel(ctx context.Context, level logger.LogLevel)`
JS ๆนๆณ็ญพๅ: `LogSetLogLevel(level: number)`
-่ฎพ็ฝฎๆฅๅฟ็บงๅซใๅจ Javascript ไธญ๏ผ่ฏฅๆฐๅญไธไปฅไธๆฅๅฟ็บงๅซๆๅ
ณ๏ผ
+่ฎพ็ฝฎๆฅๅฟ็บงๅซใ ๅจ Javascript ไธญ๏ผ่ฏฅๆฐๅญไธไปฅไธๆฅๅฟ็บงๅซๆๅ
ณ๏ผ
-| ๅผ | ๆฅๅฟ็ญ็บง |
-| --- | -------- |
-| 1 | Trace |
-| 2 | Debug |
-| 3 | Info |
-| 4 | Warning |
-| 5 | Error |
+| ๅผ | ๆฅๅฟ็ญ็บง |
+| - | ------- |
+| 1 | Trace |
+| 2 | Debug |
+| 3 | Info |
+| 4 | Warning |
+| 5 | Error |
## ไฝฟ็จ่ชๅฎไนๆฅๅฟ
-ๅฏไปฅ้่ฟไฝฟ็จๅบ็จ็จๅบๅๆฐ้้กน [ๆฅๅฟ](../../reference/options#ๆฅๅฟ) ๆไพ่ชๅฎไน่ฎฐๅฝๅจๆฅไฝฟ็จๅฎใๅฏไธ็่ฆๆฑๆฏ่ฎฐๅฝๅจๅฎ็ฐไบๅจ`github.com/wailsapp/wails/v2/pkg/logger`้`logger.Logger`ๅฎไน็ๆฅๅฃ๏ผ
+ๅฏไปฅ้่ฟไฝฟ็จๅบ็จ็จๅบๅๆฐ้้กน [ๆฅๅฟ](../../reference/options#ๆฅๅฟ) ๆไพ่ชๅฎไน่ฎฐๅฝๅจๆฅไฝฟ็จๅฎใ ๅฏไธ็่ฆๆฑๆฏ่ฎฐๅฝๅจๅฎ็ฐไบๅจ`github.com/wailsapp/wails/v2/pkg/logger`้`logger.Logger`ๅฎไน็ๆฅๅฃ๏ผ
```go title="logger.go"
type Logger interface {
- Print(message string)
- Trace(message string)
- Debug(message string)
- Info(message string)
- Warning(message string)
- Error(message string)
- Fatal(message string)
+ Print(message string)
+ Trace(message string)
+ Debug(message string)
+ Info(message string)
+ Warning(message string)
+ Error(message string)
+ Fatal(message string)
}
```
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx
index b29b51ca0..098f9c997 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/menu.mdx
@@ -1,5 +1,4 @@
---
-title: ่ๅ
sidebar_position: 6
---
@@ -10,19 +9,17 @@ sidebar_position: 6
่ฟไบๆนๆณไธๅบ็จ็จๅบ่ๅ็ธๅ
ณใ
:::info Javascript
+ Menu is currently unsupported in the JS runtime.
+:::
+### ่ฎพ็ฝฎๅบ็จ็จๅบ่ๅ
JS ่ฟ่กๆถๅฝๅไธๆฏๆ่ๅใ
:::
-### ่ฎพ็ฝฎๅบ็จ็จๅบ่ๅ
-
+### ๆดๆฐๅบ็จ็จๅบ่ๅ
Go ๆนๆณ็ญพๅ: `MenuSetApplicationMenu(ctx context.Context, menu *menu.Menu)`
ๅฐๅบ็จ็จๅบ่ๅ่ฎพ็ฝฎไธบ็ปๅฎ็[ๅบ็จ่ๅ](../../reference/menus)ใ
-### ๆดๆฐๅบ็จ็จๅบ่ๅ
-Go ๆนๆณ็ญพๅ: `MenuUpdateApplicationMenu(ctx context.Context)`
-
-ๆดๆฐๅบ็จ็จๅบ่ๅ๏ผ้ๅๅฏนไผ ้็ป`MenuSetApplicationMenu`็่ๅๆๅ็ไปปไฝๆดๆนใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx
index de74674e1..9ea42856a 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/reference/runtime/window.mdx
@@ -1,5 +1,4 @@
---
-title: ็ชๅฃ
sidebar_position: 4
---
@@ -10,7 +9,6 @@ sidebar_position: 4
่ฟไบๆนๆณๅฏไปฅๆงๅถๅบ็จ็จๅบ็ชๅฃใ
### ็ชๅฃๆ ้ข
-
Go ๆนๆณ็ญพๅ: `WindowSetTitle(ctx context.Context, title string)`
JS ๆนๆณ็ญพๅ: `WindowSetTitle(title: string)`
@@ -18,7 +16,6 @@ JS ๆนๆณ็ญพๅ: `WindowSetTitle(title: string)`
่ฎพ็ฝฎ็ชๅฃๆ ้ขๆ ไธญ็ๆๆฌใ
### ็ชๅฃๅ
จๅฑ
-
Go ๆนๆณ็ญพๅ: `WindowFullscreen(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowFullscreen()`
@@ -26,7 +23,6 @@ JS ๆนๆณ็ญพๅ: `WindowFullscreen()`
ไฝฟ็ชๅฃๅ
จๅฑใ
### ็ชๅฃๅๆถๅ
จๅฑ
-
Go ๆนๆณ็ญพๅ: `WindowUnfullscreen(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowUnfullscreen()`
@@ -34,7 +30,6 @@ JS ๆนๆณ็ญพๅ: `WindowUnfullscreen()`
ๅจๅ
จๅฑไนๅๆขๅคๅ
ๅ็็ชๅฃๅฐบๅฏธๅไฝ็ฝฎใ
### ็ชๅฃๅฑ
ไธญ
-
Go ๆนๆณ็ญพๅ: `WindowCenter(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowCenter()`
@@ -42,7 +37,6 @@ JS ๆนๆณ็ญพๅ: `WindowCenter()`
ไฝฟ็ชๅฃๅจๅฝๅ็ชๅฃๆๅจ็็่งๅจไธๅฑ
ไธญใ
### ็ชๅฃ้ๆฐๅ ่ฝฝ
-
Go ๆนๆณ็ญพๅ: `WindowReload(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowReload()`
@@ -50,162 +44,162 @@ JS ๆนๆณ็ญพๅ: `WindowReload()`
ๆง่กโ้ๆฐๅ ่ฝฝโ๏ผ้ๆฐๅ ่ฝฝ index.html๏ผ
### ็ชๅฃ่ฎพ็ฝฎ็ณป็ป้ป่ฎคไธป้ข
-
Go ๆนๆณ็ญพๅ: `WindowSetSystemDefaultTheme(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowSetSystemDefaultTheme()`
ไป
้ Windowsใ
-ๅฐ็ชๅฃไธป้ข่ฎพ็ฝฎไธบ็ณป็ป้ป่ฎคๅผ๏ผๆต
่ฒ/ๆทฑ่ฒ๏ผใ
-
### ็ชๅฃ่ฎพ็ฝฎๆต
่ฒไธป้ข
+### ็ชๅฃ่ฎพ็ฝฎๆทฑ่ฒไธป้ข
+ๅฐ็ชๅฃไธป้ข่ฎพ็ฝฎไธบ็ณป็ป้ป่ฎคๅผ๏ผๆต
่ฒ/ๆทฑ่ฒ๏ผใ
+
Go ๆนๆณ็ญพๅ: `WindowSetLightTheme(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowSetLightTheme()`
ไป
้ Windowsใ
+### ๆพ็คบ็ชๅฃ
่ฎพ็ฝฎ็ชๅฃไธป้ขไธบๆต
่ฒ ใ
-### ็ชๅฃ่ฎพ็ฝฎๆทฑ่ฒไธป้ข
-
Go ๆนๆณ็ญพๅ: `WindowSetDarkTheme(ctx context.Context)`
-JS ๆนๆณ็ญพๅ: `WindowSetDarkTheme()`
+JS ๆนๆณ็ญพๅ: `WindowSetLightTheme()`
ไป
้ Windowsใ
+### ้่็ชๅฃ
่ฎพ็ฝฎ็ชๅฃไธป้ขไธบๆทฑ่ฒใ
-### ๆพ็คบ็ชๅฃ
-
Go ๆนๆณ็ญพๅ: `WindowShow(ctx context.Context)`
-JS ๆนๆณ็ญพๅ: `WindowShow()`
+JS ๆนๆณ็ญพๅ: `WindowSetLightTheme()`
ๅฆๆ็ชๅฃๅฝๅๅคไบ้่็ถๆ๏ผๅๆพ็คบ่ฏฅ็ชๅฃใ
-### ้่็ชๅฃ
-
+### ่ฎพ็ฝฎ็ชๅฃๅฐบๅฏธ
Go ๆนๆณ็ญพๅ: `WindowHide(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowHide()`
้่็ชๅฃ๏ผๅฆๆๅฝๅๅฏ่ง๏ผใ
-### ่ฎพ็ฝฎ็ชๅฃๅฐบๅฏธ
-
+### ่ทๅ็ชๅฃๅฐบๅฏธ
Go ๆนๆณ็ญพๅ: `WindowSetSize(ctx context.Context, width int, height int)`
JS ๆนๆณ็ญพๅ: `WindowSetSize(size: Size)`
่ฎพ็ฝฎ็ชๅฃ็ๅฎฝๅบฆๅ้ซๅบฆใ
-### ่ทๅ็ชๅฃๅฐบๅฏธ
-
+### ่ฎพ็ฝฎ็ชๅฃๆๅฐๅฐบๅฏธ
Go ๆนๆณ็ญพๅ: `WindowGetSize(ctx context.Context) (width int, height int)`
JS ๆนๆณ็ญพๅ: `WindowGetSize() : Size`
่ทๅ็ชๅฃ็ๅฎฝๅบฆๅ้ซๅบฆใ
-### ่ฎพ็ฝฎ็ชๅฃๆๅฐๅฐบๅฏธ
-
+### ่ฎพ็ฝฎ็ชๅฃๆๅคงๅฐบๅฏธ
Go ๆนๆณ็ญพๅ: `WindowSetMinSize(ctx context.Context, width int, height int)`
JS ๆนๆณ็ญพๅ: `WindowSetMinSize(size: Size)`
-่ฎพ็ฝฎๆๅฐ็ชๅฃๅคงๅฐใๅฆๆ็ชๅฃๅฝๅๅฐไบ็ปๅฎๅฐบๅฏธ๏ผๅฐ่ฐๆด็ชๅฃๅคงๅฐใ
+Gets the width and height of the window.
+### ่ฎพ็ฝฎ็ชๅฃไฝ็ฝฎ
ๅฐๅคงๅฐ่ฎพ็ฝฎไธบ `0,0` ๅฐ็ฆ็จๆญค็บฆๆใ
-### ่ฎพ็ฝฎ็ชๅฃๆๅคงๅฐบๅฏธ
-
Go ๆนๆณ็ญพๅ: `WindowSetMaxSize(ctx context.Context, width int, height int)`
-JS ๆนๆณ็ญพๅ: `WindowSetMaxSize(size: Size)`
+่ฎพ็ฝฎๆๅฐ็ชๅฃๅคงๅฐใ ๅฆๆ็ชๅฃๅฝๅๅฐไบ็ปๅฎๅฐบๅฏธ๏ผๅฐ่ฐๆด็ชๅฃๅคงๅฐใ
-่ฎพ็ฝฎๆๅคง็ชๅฃๅคงๅฐใๅฆๆ็ชๅฃๅฝๅๅคงไบ็ปๅฎๅฐบๅฏธ๏ผๅฐ่ฐๆด็ชๅฃๅคงๅฐใ
+Setting a size of `0,0` will disable this constraint.
+### ่ทๅ็ชๅฃไฝ็ฝฎ
ๅฐๅคงๅฐ่ฎพ็ฝฎไธบ `0,0` ๅฐ็ฆ็จๆญค็บฆๆใ
-### ่ฎพ็ฝฎ็ชๅฃไฝ็ฝฎ
-
Go ๆนๆณ็ญพๅ: `WindowSetPosition(ctx context.Context, x int, y int)`
-JS ๆนๆณ็ญพๅ: `WindowSetPosition(position: Position)`
+่ฎพ็ฝฎๆๅคง็ชๅฃๅคงๅฐใ ๅฆๆ็ชๅฃๅฝๅๅคงไบ็ปๅฎๅฐบๅฏธ๏ผๅฐ่ฐๆด็ชๅฃๅคงๅฐใ
-่ฎพ็ฝฎ็ธๅฏนไบ็ชๅฃๅฝๅๆๅจ็่งๅจ็็ชๅฃไฝ็ฝฎใ
-
-### ่ทๅ็ชๅฃไฝ็ฝฎ
+Setting a size of `0,0` will disable this constraint.
+### ็ชๅฃๆๅคงๅ
Go ๆนๆณ็ญพๅ: `WindowGetPosition(ctx context.Context) (x int, y int)`
JS ๆนๆณ็ญพๅ: `WindowGetPosition() : Position`
่ทๅ็ธๅฏนไบ็ชๅฃๅฝๅๆๅจๆพ็คบๅจ็็ชๅฃไฝ็ฝฎใ
-### ็ชๅฃๆๅคงๅ
+### ็ชๅฃๅๆถๆๅคงๅ
Go ๆนๆณ็ญพๅ: `WindowMaximise(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowMaximise()`
ๆๅคงๅ็ชๅฃไปฅๅกซๆปกๅฑๅนใ
-### ็ชๅฃๅๆถๆๅคงๅ
-
+### ็ชๅฃๆๅคงๅๅๆข
Go ๆนๆณ็ญพๅ: `WindowUnmaximise(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowUnmaximise()`
ๅฐ็ชๅฃๆขๅคๅฐๆๅคงๅไนๅ็ๅฐบๅฏธๅไฝ็ฝฎใ
-### ็ชๅฃๆๅคงๅๅๆข
-
+### ็ชๅฃๆๅฐๅ
Go ๆนๆณ็ญพๅ: `WindowToggleMaximise(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowToggleMaximise()`
ๅจๆๅคงๅๅๆๅคงๅไน้ดๅๆขใ
-### ็ชๅฃๆๅฐๅ
-
+### ็ชๅฃๅๆถๆๅฐๅ
Go ๆนๆณ็ญพๅ: `WindowMinimise(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowMinimise()`
ๆๅฐๅ็ชๅฃใ
-### ็ชๅฃๅๆถๆๅฐๅ
-
+### ็ชๅฃ่ฎพ็ฝฎ RGBA
Go ๆนๆณ็ญพๅ: `WindowUnminimise(ctx context.Context)`
JS ๆนๆณ็ญพๅ: `WindowUnminimise()`
ๅฐ็ชๅฃๆขๅคๅฐๆๅฐๅไนๅ็ๅฐบๅฏธๅไฝ็ฝฎใ
-### ็ชๅฃ่ฎพ็ฝฎ RGBA
-
+### ไฝ็ฝฎ
Go ๆนๆณ็ญพๅ: `WindowSetRGBA(ctx context.Context, R, G, B, A uint8)`
JS ๆนๆณ็ญพๅ: `WindowSetRGBA(R, G, B, A)`
-ๅฐ็ชๅฃ็่ๆฏ้ข่ฒ่ฎพ็ฝฎไธบ็ปๅฎ็ RGBA ้ข่ฒๅฎไนใๆญค้ข่ฒๅฐๆพ็คบๆๆ้ๆๅ็ด ใ
+็ชๅฃ
+### ๅฐบๅฏธ
RใGใB ๅ A ็ๆๆๅผไธบ 0-255ใ
+JS ๆนๆณ็ญพๅ: `WindowSetMaxSize(size: Size)`
+
+Restores the window to the dimensions and position prior to minimising.
+
+### WindowSetBackgroundColour
+Go Signature: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`
+
+JS ๆนๆณ็ญพๅ: `WindowSetPosition(position: Position)`
+
+ๅฐ็ชๅฃ็่ๆฏ้ข่ฒ่ฎพ็ฝฎไธบ็ปๅฎ็ RGBA ้ข่ฒๅฎไนใ ๆญค้ข่ฒๅฐๆพ็คบๆๆ้ๆๅ็ด ใ
+
+Valid values for R, G, B and A are 0-255.
+
:::info Windows
-ๅจ Windows ไธ๏ผไป
ๆฏๆ 0 ๆ 255 ็ alpha ๅผใไปปไฝไธไธบ 0 ็ๅผ้ฝๅฐ่ขซ่งไธบ 255ใ
+ๅจ Windows ไธ๏ผไป
ๆฏๆ 0 ๆ 255 ็ alpha ๅผใ ไปปไฝไธไธบ 0 ็ๅผ้ฝๅฐ่ขซ่งไธบ 255ใ
:::
## Typescript ๅฏน่ฑกๅฎไน
-### ไฝ็ฝฎ
+### Position
```ts
interface Position {
@@ -214,7 +208,7 @@ interface Position {
}
```
-### ๅฐบๅฏธ
+### Size
```ts
interface Size {
@@ -222,3 +216,5 @@ interface Size {
h: number;
}
```
+
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx
index e0db60335..632b0e970 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/tutorials/helloworld.mdx
@@ -4,22 +4,22 @@ sidebar_position: 10
# ไฝ ๅฅฝไธ็
-The aim of this tutorial is to get you up and running with the most basic
-application using Wails. You will be able to:
+The aim of this tutorial is to get you up and running with the most basic application using Wails. You will be able to: You will be able to:
-- Create a new Wails application
-- Build the application
-- Run the application
+ - Create a new Wails application
+ - Build the application
+ - Run the application
:::note
This tutorial uses Windows as the target platform. Output will vary slightly
depending on your operating system.
+::: Output will vary slightly
+depending on your operating system.
:::
## Create a new Wails application
-To create a new Wails application using the default vanilla JS template,
-you need to run the following command:
+To create a new Wails application using the default vanilla JS template, you need to run the following command:
```bash
wails init -n helloworld
@@ -41,8 +41,7 @@ Template Support: https://wails.io
Initialised project 'helloworld' in 232ms.
```
-This will create a new directory called `helloworld` in the current directory.
-In this directory, you will find a number of files:
+This will create a new directory called `helloworld` in the current directory. In this directory, you will find a number of files: In this directory, you will find a number of files:
```
build/ - Contains the build files + compiled application
@@ -85,6 +84,10 @@ Building target: windows/amd64
- Compiling frontend: Done.
- Generating bundle assets: Done.
- Compiling application: Done.
+Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s.
+ - Compiling frontend: Done.
+ - Generating bundle assets: Done.
+ - Compiling application: Done.
Built 'C:\Users\leaan\tutorial\helloworld\build\bin\helloworld.exe' in 10.616s.
```
@@ -95,9 +98,10 @@ This has compiled the application and saved it in the `build/bin` directory.
If we view the `build/bin` directory in Windows Explorer, we should see our project binary:
-

+
-
+
+
We can run it by simply double-clicking the `helloworld.exe` file.
@@ -108,13 +112,7 @@ On Linux, you can run the application using `./helloworld` from the `build/bin`
You should see the application working as expected:
-

+
-
+
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md
index a127e4667..2b5802e06 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/changelog.md
@@ -2,12 +2,314 @@
ๆญค้กน็ฎ็ๆๆ้่ฆๅๆด้ฝๅฐ่ฎฐๅฝๅจๆญคๆไปถไธญใ
-ๆ ผๅผๅบไบ [็ปดๆคๆดๆฐๆฅๅฟ](https://keepachangelog.com/en/1.0.0/)๏ผ
-ๅนถไธ่ฏฅ้กน็ฎ้ตๅพช [่ฏญไนๅ็ๆฌ](https://semver.org/spec/v2.0.0.html)ใ
+ๆ ผๅผๅบไบ [็ปดๆคๆดๆฐๆฅๅฟ](https://keepachangelog.com/en/1.0.0/)๏ผ ๅนถไธ่ฏฅ้กน็ฎ้ตๅพช [่ฏญไนๅ็ๆฌ](https://semver.org/spec/v2.0.0.html)ใ
-## [Unreleased]
+## [Unreleased][]
-## [v2.0.0-beta.33] - 2022-03-05
+## [v2.0.0-beta.43] - 2022-08-08
+
+## Added
+
+* NSIS Installer support for creating installers for Windows applications - Thanks [@stffabi](https://github.com/stffabi) ๐
+* New frontend:dev:watcher command to spin out 3rd party watchers when using wails dev - Thanks [@stffabi](https://github.com/stffabi)๐
+
+## Fixed
+
+* Fix formatting of some error messages by @stffabi in https://github.com/wailsapp/wails/pull/1665
+* Windows dialogs now work when window is not visible yet by @leaanthony in https://github.com/wailsapp/wails/pull/1662
+* Multiple fixes for MacOS asset requests by @stffabi in https://github.com/wailsapp/wails/pull/1668 and https://github.com/wailsapp/wails/pull/1681
+* Fix for Go 1.19 by @stffabi in https://github.com/wailsapp/wails/pull/1689
+* Removed Linux warnings by @leaanthony in https://github.com/wailsapp/wails/pull/1656
+* Better support for doubleclick events in drag regions by @leaanthony in https://github.com/wailsapp/wails/pull/1704
+* Allow MacOS frameless window to be miniturisable by @leaanthony in https://github.com/wailsapp/wails/pull/1705
+
+## What's Changed
+
+* add wails-sveltekit-template by @h8gi in https://github.com/wailsapp/wails/pull/1671
+* wails doctor now reports correct MacOS os id by @stffabi in https://github.com/wailsapp/wails/pull/1673
+* Update application-development.mdx by @SamHennessy in https://github.com/wailsapp/wails/pull/1682
+* Move SetMin/Max calls to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1684
+* Change `frontend:dev` to `frontend:dev:build` by @LGiki in https://github.com/wailsapp/wails/pull/1691
+* Build frontend only before starting the dev watcher command by @stffabi in https://github.com/wailsapp/wails/pull/1694
+* Improve error message for auto dev server discovery without a dev watcher by @stffabi in https://github.com/wailsapp/wails/pull/1711
+
+## New Contributors
+
+* @h8gi made their first contribution in https://github.com/wailsapp/wails/pull/1671
+* @SamHennessy made their first contribution in https://github.com/wailsapp/wails/pull/1682
+
+## [v2.0.0-beta.42] - 2022-07-25
+
+## Added
+
+* Added `options.NewRGBA` and `options.NewRGB` functions to create `*options.RGBA` by @leaanthony
+
+## Fixed
+
+* Fixed initial build of frontend when using `wails dev` on new projects by @leaanthony in https://github.com/wailsapp/wails/pull/1650
+* Ignore empty install command when running `wails dev` by @stffabi in https://github.com/wailsapp/wails/pull/1651
+* Fixed error reporting in templates
+* BackgroundColour documentation fix
+* Generalize manual compile steps [Documentation] by @acheong08 in https://github.com/wailsapp/wails/pull/1644
+
+## [v2.0.0-beta.40] - 2022-07-24
+
+## Added
+
+* Add Show() and Hide() to runtime to show/hide application by @leaanthony in https://github.com/wailsapp/wails/pull/1599
+* Override target platform/arch using GOOS and GOARCH environment variables by @leaanthony in https://github.com/wailsapp/wails/pull/1618
+* Add option to skip frontend rebuild in dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1632
+
+## Fixed
+
+* Update svelte templates to use vite 3 by @leaanthony in https://github.com/wailsapp/wails/pull/1643
+* Fix plain template by @stffabi in https://github.com/wailsapp/wails/pull/1609
+* Fix Website layout by @leaanthony in https://github.com/wailsapp/wails/pull/1616
+* Fixed typo in documentation page docs/howdoesitwork by @MyNameIsAres in https://github.com/wailsapp/wails/pull/1636
+* Use scaling when setting min/max window by @leaanthony in https://github.com/wailsapp/wails/pull/1557
+
+## Changed
+
+* Install dev dependencies before starting dev mode by @leaanthony in https://github.com/wailsapp/wails/pull/1615
+* Translate and fix website text by @misitebao in https://github.com/wailsapp/wails/pull/1525
+* docs: add MyNameIsAres as a contributor for doc by @allcontributors in https://github.com/wailsapp/wails/pull/1638
+* Deprecate Fullscreen appoption by @acheong08 in https://github.com/wailsapp/wails/pull/1640
+
+## Deprecated
+
+* The `Fullscreen` application option is deprecated. Please use [`WindowStartState`](https://wails.io/docs/reference/options#windowstartstate) instead.
+## New Contributors
+
+* @MyNameIsAres made their first contribution in https://github.com/wailsapp/wails/pull/1636
+
+## [v2.0.0-beta.39.2] - 2022-07-20
+
+## Added
+
+* Update example for macOS Menu by @acheong08 in https://github.com/wailsapp/wails/pull/1600
+
+## Fixed
+
+* Reinstate Go 1.17 compatibility by @leaanthony in https://github.com/wailsapp/wails/pull/1605
+
+## [v2.0.0-beta.39] - 2022-07-19
+
+## Added
+
+* New screen dimensions runtime API by @skamensky in https://github.com/wailsapp/wails/pull/1519
+* Auto discover vite devserver port by @leaanthony in https://github.com/wailsapp/wails/pull/1547
+* Add nixpkgs support to doctor command. by @ianmjones in https://github.com/wailsapp/wails/pull/1551
+* New pre-build hooks feature by @leaanthony in https://github.com/wailsapp/wails/pull/1578
+* New production log level option by @leaanthony in https://github.com/wailsapp/wails/pull/1555
+
+## Fixed
+
+* Fix stack corruption in Windows when using ICoreWebView2HttpHeadersCollectionIterator by @stffabi in https://github.com/wailsapp/wails/pull/1589
+* Move WindowGet* to main thread by @leaanthony in https://github.com/wailsapp/wails/pull/1464
+* Allow -appargs flag to pass flags to binary. by @ianmjones in https://github.com/wailsapp/wails/pull/1534
+* Fix checking for installed apt package in none English session. by @ianmjones in https://github.com/wailsapp/wails/pull/1548
+* Fix OnBeforeClose code for Mac by @leaanthony in https://github.com/wailsapp/wails/pull/1558
+* Support Maps in TS conversion by @leaanthony in https://github.com/wailsapp/wails/pull/1435
+* Check for line length when scanning for local devserver url by @leaanthony in https://github.com/wailsapp/wails/pull/1566
+* Remove usage of unsafe.Pointer in winc by @stffabi and @leaanthony in https://github.com/wailsapp/wails/pull/1556
+
+## Changed
+
+* Rename WindowSetRGBA -> WindowSetBackgroundColour by @leaanthony in https://github.com/wailsapp/wails/pull/1506
+* Improvements to the dev command by @stffabi in https://github.com/wailsapp/wails/pull/1510
+* Update vscode template by @leaanthony in https://github.com/wailsapp/wails/pull/1398
+* Bump svelte from 3.42.2 to 3.49.0 in /v2/internal/frontend/runtime/dev by @dependabot in https://github.com/wailsapp/wails/pull/1572
+* Bump svelte from 3.42.5 to 3.49.0 in /v2/internal/frontend/runtime by @dependabot in https://github.com/wailsapp/wails/pull/1573
+* Add troubleshooting for `Not Found` error by @acheong08 in https://github.com/wailsapp/wails/pull/1586
+* Docs/better homepage by @leaanthony in https://github.com/wailsapp/wails/pull/1591
+
+## New Contributors
+
+* @skamensky made their first contribution in https://github.com/wailsapp/wails/pull/1519
+* @acheong08 made their first contribution in https://github.com/wailsapp/wails/pull/1586
+
+**Full Changelog**: https://github.com/wailsapp/wails/compare/v2.0.0-beta.38...v2.0.0-beta.39
+
+## [v2.0.0-beta.38] - 2022-06-27
+
+### Added
+
+* Add race detector to build & dev by @Lyimmi in https://github.com/wailsapp/wails/pull/1426
+* [linux] Support `linux/arm` architecture by @Lyimmi in https://github.com/wailsapp/wails/pull/1427
+* Create gitignore when using `-g` option by @jaesung9507 in https://github.com/wailsapp/wails/pull/1430
+* [windows] Add Suspend/Resume callback support by @leaanthony in https://github.com/wailsapp/wails/pull/1474
+* Add runtime function `WindowSetAlwaysOnTop` by @chenxiao1990 in https://github.com/wailsapp/wails/pull/1442
+* [windows] Allow setting browser path by @NanoNik in https://github.com/wailsapp/wails/pull/1448
+
+### Fixed
+
+* [linux] Improve switching to main thread for callbacks by @stffabi in https://github.com/wailsapp/wails/pull/1392
+* [windows] Fix WebView2 minimum runtime version check by @stffabi in https://github.com/wailsapp/wails/pull/1456
+* [linux] Fix apt command syntax (#1458) by @abtin in https://github.com/wailsapp/wails/pull/1461
+* [windows] Set Window Background colour if provided + debounce redraw option by @leaanthony in https://github.com/wailsapp/wails/pull/1466
+* Fix small typo in docs by @LukenSkyne in https://github.com/wailsapp/wails/pull/1449
+* Fix the url to surge by @andywenk in https://github.com/wailsapp/wails/pull/1460
+* Fixed theme change at runtime by @leaanthony in https://github.com/wailsapp/wails/pull/1473
+* Fix: Don't stop if unable to remove temporary bindings build by @leaanthony in https://github.com/wailsapp/wails/pull/1465
+* [windows] Pass the correct installationStatus to the webview installation strategy by @stffabi in https://github.com/wailsapp/wails/pull/1483
+* [windows] Make `SetBackgroundColour` compatible for `windows/386` by @stffabi in https://github.com/wailsapp/wails/pull/1493
+* Fix lit-ts template by @Orijhins in https://github.com/wailsapp/wails/pull/1494
+
+### Changed
+
+* [windows] Load WebView2 loader from embedded only by @stffabi in https://github.com/wailsapp/wails/pull/1432
+* Add showcase entry for October + update homepage carousel entry for October by @marcus-crane in https://github.com/wailsapp/wails/pull/1436
+* Always use return in wrapped method by @leaanthony in https://github.com/wailsapp/wails/pull/1410
+* [windows] Unlock OSThread after native calls have been finished by @stffabi in https://github.com/wailsapp/wails/pull/1441
+* Add `BackgroundColour` and deprecate `RGBA` by @leaanthony in https://github.com/wailsapp/wails/pull/1475
+* AssetsHandler remove retry logic in dev mode by @stffabi in https://github.com/wailsapp/wails/pull/1479
+* Add Solid JS template to docs by @sidwebworks in https://github.com/wailsapp/wails/pull/1492
+* Better signal handling by @leaanthony in https://github.com/wailsapp/wails/pull/1488
+* Chore/react 18 create root by @tomanagle in https://github.com/wailsapp/wails/pull/1489
+
+## New Contributors
+
+* @jaesung9507 made their first contribution in https://github.com/wailsapp/wails/pull/1430
+* @LukenSkyne made their first contribution in https://github.com/wailsapp/wails/pull/1449
+* @andywenk made their first contribution in https://github.com/wailsapp/wails/pull/1460
+* @abtin made their first contribution in https://github.com/wailsapp/wails/pull/1461
+* @chenxiao1990 made their first contribution in https://github.com/wailsapp/wails/pull/1442
+* @NanoNik made their first contribution in https://github.com/wailsapp/wails/pull/1448
+* @sidwebworks made their first contribution in https://github.com/wailsapp/wails/pull/1492
+* @tomanagle made their first contribution in https://github.com/wailsapp/wails/pull/1489
+
+## [v2.0.0-beta.37] - 2022-05-26
+
+### Added
+
+* Add `nogen` flag in wails dev command by @mondy in https://github.com/wailsapp/wails/pull/1413
+* Initial support for new native translucency in Windows Preview by @leaanthony in https://github.com/wailsapp/wails/pull/1400
+
+### Fixed
+
+* Bugfix/incorrect bindings by @leaanthony in https://github.com/wailsapp/wails/pull/1383
+* Fix runtime.js events by @polikow in https://github.com/wailsapp/wails/pull/1369
+* Fix docs formatting by @antimatter96 in https://github.com/wailsapp/wails/pull/1372
+* Events | fixes #1388 by @lambdajack in https://github.com/wailsapp/wails/pull/1390
+* bugfix: correct typo by @tmclane in https://github.com/wailsapp/wails/pull/1391
+* Fix typo in docs by @LGiki in https://github.com/wailsapp/wails/pull/1393
+* Fix typo bindings.js to ipc.js by @rayshoo in https://github.com/wailsapp/wails/pull/1406
+* Make sure to execute the menu callbacks on a new goroutine by @stffabi in https://github.com/wailsapp/wails/pull/1403
+* Update runtime.d.ts & templates by @Yz4230 in https://github.com/wailsapp/wails/pull/1421
+* Add missing className to input in React and Preact templates by @edwardbrowncross in https://github.com/wailsapp/wails/pull/1419
+
+### Changed
+* Improve multi-platform builds by @stffabi in https://github.com/wailsapp/wails/pull/1373
+* During wails dev only use reload logic if no AssetsHandler are in use by @stffabi in https://github.com/wailsapp/wails/pull/1385
+* Update events.mdx by @Junkher in https://github.com/wailsapp/wails/pull/1387
+* Add Next.js template by @LGiki in https://github.com/wailsapp/wails/pull/1394
+* Add docs on wails generate module by @TechplexEngineer in https://github.com/wailsapp/wails/pull/1414
+* Add macos custom menu EditMenu tips by @daodao97 in https://github.com/wailsapp/wails/pull/1423
+
+### New Contributors
+* @polikow made their first contribution in https://github.com/wailsapp/wails/pull/1369
+* @antimatter96 made their first contribution in https://github.com/wailsapp/wails/pull/1372
+* @Junkher made their first contribution in https://github.com/wailsapp/wails/pull/1387
+* @lambdajack made their first contribution in https://github.com/wailsapp/wails/pull/1390
+* @LGiki made their first contribution in https://github.com/wailsapp/wails/pull/1393
+* @rayshoo made their first contribution in https://github.com/wailsapp/wails/pull/1406
+* @TechplexEngineer made their first contribution in https://github.com/wailsapp/wails/pull/1414
+* @mondy made their first contribution in https://github.com/wailsapp/wails/pull/1413
+* @Yz4230 made their first contribution in https://github.com/wailsapp/wails/pull/1421
+* @daodao97 made their first contribution in https://github.com/wailsapp/wails/pull/1423
+* @edwardbrowncross made their first contribution in https://github.com/wailsapp/wails/pull/1419
+
+
+## [v2.0.0-beta.36] - 2022-04-27
+
+### Fixed
+- [v2] Validate devServer property to be of the correct form by [@stffabi](https://github.com/stffabi) in https://github.com/wailsapp/wails/pull/1359
+- [v2, darwin] Initialize native variables on stack to prevent segfault by [@stffabi](https://github.com/stffabi) in https://github.com/wailsapp/wails/pull/1362
+- Vue-TS template fix
+
+### Changed
+- Added `OnStartup` method back to default templates
+
+## [v2.0.0-beta.35] - 2022-04-27
+
+### Breaking Changes
+
+- When data was sent to the `EventsOn` callback, it was being sent as a slice of values, instead of optional parameters to the method. `EventsOn` now works as expected, but you will need to update your code if you currently use this. [More information](https://github.com/wailsapp/wails/issues/1324)
+- The broken `bindings.js` and `bindings.d.ts` files have been replaced by a new JS/TS code generation system. More details [here](https://wails.io/docs/howdoesitwork#calling-bound-go-methods)
+
+### Added
+
+- **New Templates**: Svelte, React, Vue, Preact, Lit and Vanilla templates, both JS and TS versions. `wails init -l` for more info.
+- Default templates now powered by [Vite](https://vitejs.dev). This enables lightning fast reloads when you use `wails dev`!
+- Add support for external frontend development servers. See `frontend:dev:serverUrl` in the [project config](https://wails.io/docs/reference/project-config) - [@stffabi](https://github.com/stffabi)
+- [Fully configurable dark mode](https://wails.io/docs/reference/options#theme) for Windows.
+- Hugely improved [WailsJS generation](https://wails.io/docs/howdoesitwork#calling-bound-go-methods) (both Javascript and Typescript)
+- Wails doctor now reports information about the wails installation - [@stffabi](https://github.com/stffabi)
+- Added docs for [code-signing](https://wails.io/docs/guides/signing) and [NSIS installer](https://wails.io/docs/guides/windows-installer) - [@gardc](https://github.com/gardc)
+- Add support for `-trimpath` [build flag](https://wails.io/docs/reference/cli#build)
+- Add support for a default AssetsHandler - [@stffabi](https://github.com/stffabi)
+
+### Fixed
+
+- Improved mimetype detection for BOM marker and comments - [@napalu](https://github.com/napalu)
+- Remove duplicate mimetype entries - [@napalu](https://github.com/napalu)
+- Remove duplicate Typescript imports in generated definition files - [@adalessa](https://github.com/adalessa)
+- Add missing method declaration - [@adalessa](https://github.com/adalessa)
+- Fix Linux sigabrt on start - [@napalu](https://github.com/napalu)
+- Double Click event now works on elements with `data-wails-drag` attribute - [@jicg](https://github.com/jicg)
+- Suppress resizing during minimize of a frameless window - [@stffabi](https://github.com/stffabi)
+- Fixed TS/JS generation for Go methods with no returns
+- Fixed WailsJS being generated in project directory
+
+### Changed
+
+- Website docs are now versioned
+- Improved `runtime.Environment` call
+- Improve the close action for Mac
+- A bunch of dependabot security updates
+- Improved website content - [@misitebao](https://github.com/misitebao)
+- Upgrade issue template - [@misitebao](https://github.com/misitebao)
+- Convert documents that don't require version management to individual pages
+ - [@misitebao](https://github.com/misitebao)
+- Website now using Algolia search
+
+## [v2.0.0-beta.34] - 2022-03-26
+
+### Added
+
+- Add support for 'DomReady' callback on linux by [@napalu](https://github.com/napalu) in #1249
+- MacOS - Show extension by default by [@leaanthony](https://github.com/leaanthony) in #1228
+
+### Fixed
+
+- [v2, nsis] Seems like / as path separator works only for some directives in a cross platform way by [@stffabi](https://github.com/stffabi) in #1227
+- import models on binding definition by [@adalessa](https://github.com/adalessa) in #1231
+- Use local search on website by [@leaanthony](https://github.com/leaanthony) in #1234
+- Ensure binary resources can be served by [@napalu](https://github.com/napalu) in #1240
+- Only retry loading assets when loading from disk by [@leaanthony](https://github.com/leaanthony) in #1241
+- [v2, windows] Fix maximised start state by [@stffabi](https://github.com/stffabi) in #1243
+- Ensure Linux IsFullScreen uses GDK_WINDOW_STATE_FULLSCREEN bitmask appropriately. by [@ianmjones](https://github.com/ianmjones) in #1245
+- Fix memory leak in ExecJS for Mac by [@leaanthony](https://github.com/leaanthony) in #1230
+- Fix, or at least a workaround, for (#1232) by [@BillBuilt](https://github.com/BillBuilt) in #1247
+- [v2] Use os.Args[0] for self starting wails by [@stffabi](https://github.com/stffabi) in #1258
+- [v2, windows] Windows switch scheme: https -> http by @stefpap in #1255
+- Ensure Focus is regained by Webview2 when tabbing by [@leaanthony](https://github.com/leaanthony) in #1257
+- Try to focus window when Show() is called. by [@leaanthony](https://github.com/leaanthony) in #1212
+- Check system for user installed Linux dependencies by [@leaanthony](https://github.com/leaanthony) in #1180
+
+### Changed
+
+- feat(website): sync documents and add content by [@misitebao](https://github.com/misitebao) in #1215
+- refactor(cli): optimize default templates by [@misitebao](https://github.com/misitebao) in #1214
+- Run watcher after initial build by [@leaanthony](https://github.com/leaanthony) in #1216
+- Feature/docs update by [@leaanthony](https://github.com/leaanthony) in #1218
+- feat(website): optimize website and sync documents by [@misitebao](https://github.com/misitebao) in #1219
+- docs: sync documents by [@misitebao](https://github.com/misitebao) in #1224
+- Default index page by [@leaanthony](https://github.com/leaanthony) in #1229
+- Build added win32 compatibility by [@fengweiqiang](https://github.com/fengweiqiang) in #1238
+- docs: sync documents by [@misitebao](https://github.com/misitebao) in #1260
+
+## [v2.0.0-beta.33][] - 2022-03-05
### Added
@@ -28,5 +330,5 @@
- The docs have been improved and updated
- Added troubleshooting guide
-[unreleased]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.33...HEAD
+[Unreleased]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.33...HEAD
[v2.0.0-beta.33]: https://github.com/wailsapp/wails/compare/v2.0.0-beta.32...v2.0.0-beta.33
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.md b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.md
index 5109f8c52..0018a4632 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/community-guide.md
@@ -1,3 +1,3 @@
# ็คพๅบๆๅ
-Wails ็จๆท้ๆญฃๅจไปฅๆไบบ็้ๅบฆๅข้ฟ๏ผๅฆๆๆจๆญฃๅจ้
่ฏปๆฌๆ๏ผ้ฃไนๆจๅพๆๅฏ่ฝๅทฒ็ปๅๅคๅฅฝๅ ๅ
ฅๅฎใ้ฃไนโฆโฆๆฌข่ฟๅ ๅ
ฅ๏ผ
+Wails ็จๆท้ๆญฃๅจไปฅๆไบบ็้ๅบฆๅข้ฟ๏ผๅฆๆๆจๆญฃๅจ้
่ฏปๆฌๆ๏ผ้ฃไนๆจๅพๆๅฏ่ฝๅทฒ็ปๅๅคๅฅฝๅ ๅ
ฅๅฎใ ้ฃไนโฆโฆๆฌข่ฟๅ ๅ
ฅ๏ผ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/credits.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/credits.mdx
index 5ac54a9cd..f5909ee39 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/credits.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/credits.mdx
@@ -4,18 +4,19 @@
- [Misitebao](https://github.com/misitebao) - ไธญๆๆๆกฃ๏ผWindows ๅนณๅฐๆต่ฏ๏ผๆผๆดๅ็ฐ่
- [Travis McLane](https://github.com/tmclane) - ๅค็ไบคๅ็ผ่ฏ็ธๅ
ณๅทฅไฝ, MacOS ๅนณๅฐ็ๆต่ฏ
- [Byron Chris](https://github.com/bh90210) - Linux ๅ่ก็ๆๅฏผ๏ผLinux ๅนณๅฐ็ๆต่ฏ
+- [Byron Chris](https://github.com/bh90210) - Linux distro wizard, Linux testing
## ่ตๅฉๅ
-
-

+
+
@@ -28,6 +29,7 @@
+
@@ -112,28 +114,184 @@ directory
-`,
- }}
-/>
+`, }} />
## ่ดก็ฎ่
+
+
+
+
+
+
-
-
-
-
-
-
-import Contributors from "@wails/react-contributors";
-
-
+
## ็นๅซๆๅ
-- [John Chadwick](https://github.com/jchv) - ไปๅจ [go-webview2](https://github.com/jchv/go-webview2) ๅ
- [go-winloader](https://github.com/jchv/go-winloader) ๆน้ข็ๅบ่ฒๅทฅไฝไฝฟ Windows ็ๆฌๆไธบๅฏ่ฝใ
+- [John Chadwick](https://github.com/jchv) - ไปๅจ [go-webview2](https://github.com/jchv/go-webview2) ๅ [go-winloader](https://github.com/jchv/go-winloader) ๆน้ข็ๅบ่ฒๅทฅไฝไฝฟ Windows ็ๆฌๆไธบๅฏ่ฝใ
- [Tad Vizbaras](https://github.com/tadvi) - ไป็ winc ้กน็ฎๆฏ่ตฐๅ็บฏ็ฒน็ Go Wails ็็ฌฌไธๆญฅใ
- [Mat Ryer](https://github.com/matryer) - ๅฏปๆฑๅปบ่ฎฎๅๆฏๆใ
- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - ๆไพไบๅทจๅคง็็ๆฏๆๅๅ้ฆใ
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/markdown-page.md b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/markdown-page.md
new file mode 100644
index 000000000..9756c5b66
--- /dev/null
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/markdown-page.md
@@ -0,0 +1,7 @@
+---
+title: Markdown page example
+---
+
+# Markdown page example
+
+You don't need React to write simple standalone pages.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/stats.mdx b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/stats.mdx
index 2d7ec6086..bc4eaf82c 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-pages/stats.mdx
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-pages/stats.mdx
@@ -1 +1,24 @@
# ็ฝ็ซ็ป่ฎก
+
+To enable us to understand how better to focus our efforts on translations and platform support, we use [Plausible](https://plausible.io/privacy-focused-web-analytics) to gather **anonymous** stats like country and platform. We chose Plausible because we believe in respecting the privacy of our users. We also believe in transparency, therefore have made the dashboard public.
+
+If you have any concerns or suggestions, please raise them in the projects github discussions.
+
+
+
+
+
+export const NewComponent = () => (
+
+
+
+);
+
+