docs: sync documents (#2443)

Co-authored-by: misitebao <misitebao@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-03-11 17:57:56 +11:00
committed by GitHub
co-authored by misitebao
parent e339c40e85
commit 4cd873fecb
215 changed files with 5219 additions and 2810 deletions
@@ -71,6 +71,7 @@ WailsではGitHubでホストされているリモートテンプレートをサ
| -windowsconsole | Windiws向けビルドでコンソールウィンドウを維持する | |
| -obfuscate | [garble](https://github.com/burrowers/garble)を使用してアプリケーションを難読化する | false |
| -garbleargs | garbleへ渡す引数 | `-literals -tiny -seed=random` |
| -nosyncgomod | go.modとWailsのバージョンを同期させない | false |
`webview2`フラグの詳細については、[Windows](../guides/windows.mdx)ガイドをご覧ください。
@@ -80,8 +81,10 @@ WailsではGitHubでホストされているリモートテンプレートをサ
`wails build -clean -o myproject.exe`
:::Info
Macでは、アプリケーションは`Info.dev.plist`ではなく`Info.plist`でバンドルされます。
:::info
Macの場合、`Info.dev.plist`ではなく`Info.plist`がアプリケーションにバンドルされます。
:::
:::info AppleシリコンでのUPX
@@ -184,6 +187,9 @@ Your system is ready for Wails development!
| -save | 指定された`assetdir`、`reloaddirs`、`wailsjsdir`、`debounce`、`devserver`、`frontenddevserverurl`フラグの値を、`wails.json`へ保存し、次回以降のデフォルト値にする | |
| -race | Goのrace detectorを使用してビルドする | false |
| -s | フロントエンドのビルドをスキップ | false |
| -nosyncgomod | go.modとWailsのバージョンを同期させない | false |
例:
@@ -50,6 +50,7 @@ func main() {
OnBeforeClose: app.beforeClose,
CSSDragProperty: "--wails-draggable",
CSSDragValue: "drag",
EnableFraudulentWebsiteDetection: false,
ZoomFactor: 1.0,
IsZoomControlEnabled: false,
Bind: []interface{}{
@@ -77,7 +78,8 @@ func main() {
// OnSuspendはWindowsが省電力モードに移行した場合に呼び出されます
OnSuspend func()
// OnResumeはWindowsが省電力モードから復帰した場合に呼び出されます
OnResume func()
OnResume func(),
WebviewGpuDisabled: false,
},
Mac: &mac.Options{
TitleBar: &mac.TitleBar{
@@ -100,6 +102,7 @@ func main() {
Linux: &linux.Options{
Icon: icon,
WindowIsTranslucent: false,
WebviewGpuPolicy: linux.WebviewGpuPolicyAlways,
},
Debug: options.Debug{
OpenInspectorOnStartup: false,
@@ -232,11 +235,11 @@ AssetServerの固有オプションを定義します。 静的なアセット
| DELETE | ✅ | ✅ | ✅ [^1] |
| Request Headers | ✅ | ✅ | ✅ [^1] |
| Request Body | ✅ | ✅ | ❌ |
| Request Body Streaming | | | ❌ |
| Request Body Streaming | | | ❌ |
| Response StatusCodes | ✅ | ✅ | ✅ [^1] |
| Response Headers | ✅ | ✅ | ✅ [^1] |
| Response Body | ✅ | ✅ | ✅ |
| Response Body Streaming | ❌ | | ✅ |
| Response Body Streaming | ❌ | | ✅ |
| WebSockets | ❌ | ❌ | ❌ |
| HTTP Redirects 30x | ✅ | ❌ | ❌ |
@@ -356,6 +359,12 @@ func (b *App) beforeClose(ctx context.Context) (prevent bool) {
名前: CSSDragValue<br/> データ型: `string`
### EnableFraudulentWebsiteDetection
EnableFraudulentWebsiteDetectionは、マルウェアやフィッシング詐欺などの不正コンテンツのスキャンサービスを有効にします。 これらのサービスは、ナビゲートされたURLやその他コンテンツ情報を、アプリからAppleおよびMicrosoftのクラウドサービスに送信する可能性があります。
名前: EnableFraudulentWebsiteDetection<br/> データ型: `bool`
### ZoomFactor
名前: ZoomFactor<br/> データ型: `float64`
@@ -542,6 +551,12 @@ Windowsがローパワーモード(サスペンド/休止状態) から復帰し
名前: OnResume<br/> データ型: `func()`
#### WebviewGpuIsDisabled
`true`に設定すると、webviewのGPUハードウェアアクセラレーションが無効化されます。
名前: WebviewGpuIsDisabled<br/> データ型: `bool`
### Mac
[Mac固有のオプション](#mac)を定義します。
@@ -722,6 +737,20 @@ func main() {
名前: WindowIsTranslucent<br/> データ型: `bool`
#### WebviewGpuPolicy
このオプションでは、webviewのハードウェアアクセラレーションポリシーを指定することができます。
名前: WebviewGpuPolicy<br/> データ型: [`options.WebviewGpuPolicy`](#webviewgpupolicy-type)<br/> デフォルト値: `WebviewGpuPolicyAlways`
##### WebviewGpuPolicy型
| 値 | 説明 |
| ------------------------ | --------------------------------------------- |
| WebviewGpuPolicyAlways | ハードウェアアクセラレーションを常に有効にする |
| WebviewGpuPolicyOnDemand | Webコンテンツからの要求に応じて、ハードウェアアクセラレーションの有効/無効を切り替える |
| WebviewGpuPolicyNever | ハードウェアアクセラレーションを常に無効にする |
### Debug
デバッグビルド時に適用される[デバッグ固有のオプション](#Debug)を定義します。
@@ -0,0 +1,23 @@
---
sidebar_position: 8
---
# クリップボード
ランタイム機能の一部として、オペレーティングシステムのクリップボードへのアクセスを提供します。<br/> 現在は、テキストの処理のみに対応しています。
### ClipboardGetText
このメソッドは、クリップボードに現在保存されているテキストを読み込みます。
Go: `ClipboardGetText(ctx context.Context) (string, error)`<br/> 返り値: 文字列(クリップボードが空の場合は、空文字)またはエラー。
JS: `ClipboardGetText(): Promise<string>`<br/> 返り値: 文字列を待機するPromise(クリップボードが空の場合は、空文字)。
### ClipboardSetText
このメソッドは、クリップボードにテキストを書き込みます。
Go: `ClipboardSetText(ctx context.Context, text string) error`<br/> 返り値: anyの場合はエラー。
JS: `ClipboardSetText(text: string): Promise<boolean>`<br/> 返り値: クリップボードにテキストが正常に書き込まれた場合はtrue、そうでない場合はfalseを返すようなPromise。
@@ -34,4 +34,4 @@ Go: `EventsOnMultiple(ctx context.Context, eventName string, callback func(optio
このメソッドは、指定されたイベントを発行します。 必要に応じて、イベント発行時にデータを渡すこともできます。 このメソッドによって、任意のイベントリスナーをトリガーさせることができます。
Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`<br/> JS: `EventsEmit(ctx context, optionalData function(optionalData?: any))`
Go: `EventsEmit(ctx context.Context, eventName string, optionalData ...interface{})`<br/> JS: `EventsEmit(eventName: string, ...optionalData: any)`
@@ -14,6 +14,7 @@ sidebar_position: 1
- [イベント](events.mdx)
- [ブラウザ](browser.mdx)
- [ログ](log.mdx)
- [クリップボード](clipboard.mdx)
Goのランタイムは、`github.com/wailsapp/wails/v2/pkg/runtime`をインポートすることで利用できます。 このパッケージのすべてのメソッドは、1番目の引数でContextを渡す必要があります。 このContextは、[OnStartup](../options.mdx#onstartup)フック、または[OnDomReady](../options.mdx#ondomready)フックからあらかじめ取得しておいてください。
@@ -200,7 +200,7 @@ Windowsの場合、0または255のアルファ値(A) のみがサポートさ
Go: `WindowSetBackgroundColour(ctx context.Context, R, G, B, A uint8)`<br/> JS: `WindowSetBackgroundColour(R, G, B, A)`
## TypeScript Object Definitions
## TypeScript型定義
### Position