Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

docs: fix Tauri v2 advanced usage examples

Luís Miguel12017b2f1116
diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md
index 724c99a7..d2c9d186 100644
--- a/docs/advanced-usage.md
+++ b/docs/advanced-usage.md
@@ -83,7 +83,7 @@ Send messages between web content and Pake container.
**Web Side (JavaScript):**
```javascript
-window.__TAURI__.invoke("handle_scroll", {
+window.__TAURI__.core.invoke("handle_scroll", {
scrollY: window.scrollY,
scrollX: window.scrollX,
});
@@ -104,17 +104,19 @@ Configure window properties in `pake.json`:
```json
{
- "windows": {
- "width": 1200,
- "height": 780,
- "fullscreen": false,
- "resizable": true
- },
- "hideTitleBar": true
+ "windows": [
+ {
+ "width": 1200,
+ "height": 780,
+ "fullscreen": false,
+ "resizable": true,
+ "hide_title_bar": true
+ }
+ ]
}
```
-`hideTitleBar` is only supported on macOS. It is ignored on Windows and Linux.
+`hide_title_bar` is the `pake.json` key (the CLI exposes it as `--hide-title-bar`). It is only supported on macOS and is ignored on Windows and Linux.
## Static File Packaging
diff --git a/docs/advanced-usage_CN.md b/docs/advanced-usage_CN.md
index e523e448..2b01bfc6 100644
--- a/docs/advanced-usage_CN.md
+++ b/docs/advanced-usage_CN.md
@@ -83,7 +83,7 @@ if (window.Notification && Notification.permission === "default") {
**网页端(JavaScript):**
```javascript
-window.__TAURI__.invoke("handle_scroll", {
+window.__TAURI__.core.invoke("handle_scroll", {
scrollY: window.scrollY,
scrollX: window.scrollX,
});
@@ -104,17 +104,19 @@ fn handle_scroll(scroll_y: f64, scroll_x: f64) {
```json
{
- "windows": {
- "width": 1200,
- "height": 780,
- "fullscreen": false,
- "resizable": true
- },
- "hideTitleBar": true
+ "windows": [
+ {
+ "width": 1200,
+ "height": 780,
+ "fullscreen": false,
+ "resizable": true,
+ "hide_title_bar": true
+ }
+ ]
}
```
-`hideTitleBar` 仅支持 macOS,在 Windows 和 Linux 上会被忽略。
+`hide_title_bar` 是 `pake.json` 中的字段名(CLI 对应参数为 `--hide-title-bar`)。仅支持 macOS,在 Windows 和 Linux 上会被忽略。
## 静态文件打包