更新新特性的文档

This commit is contained in:
Tw93
2022-10-25 19:11:16 +08:00
parent aceb4e4531
commit 691233d655
3 changed files with 17 additions and 18 deletions

View File

@@ -71,9 +71,9 @@ npm run build
## 打新包
1. 修改 `src-tauri` 目录下的 `tauri.conf.json` 中的 `productName、icon、title、identifier`4 个字段,其中 icon 可以从 icons 目录选择一个,也可以去 [macOSicons](https://macosicons.com/#/) 下载符合产品名称的
2. 修改 `src-tauri/src` 目录下的 `main.rs` 中的 with_url 字段为你需要打包网页的地址
3. `npm run dev` 本地调试看看效果,此外可以打开 `main.rs` 中 devtools 两处注释(搜索 `_devtools`)进行容器调试,假如你不好适配沉浸式头部,可以将 `.with_titlebar_transparent(true)` 注释掉就好
1. 修改 `src-tauri` 目录下的 `tauri.conf.json` 中的 `url、productName、icon、title、identifier`5 个字段,其中 icon 可以从 icons 目录选择一个,也可以去 [macOSicons](https://macosicons.com/#/) 下载符合产品名称的
2. 关于窗口属性设置,可以在 `tauri.conf.json` 修改 `windows` 属性对应的`width/height`,是否全屏 `fullscreen`,是否可以调整大小 `resizable`,假如你不好适配沉浸式头部,可以将 `transparent` 设置成 `true` 即可。
3. `npm run dev` 本地调试看看效果,此外可以打开 `main.rs` 中 devtools 两处注释(搜索 `_devtools`)进行容器调试
4. `npm run build` 运行即可打包,假如有打开 devtools 模式,记得注释掉
## 高级

View File

@@ -71,9 +71,9 @@ npm run build
## New pack
1. Modify the `tauri.conf.json` in the `src-tauri` directory to include 4 fields `productName, icon, title, identifier`, icon can be selected from the `icons` directory or downloaded from [macOSicons](https://macosicons.com/#/) to match the product.
2. Change the with_url field in `main.rs` in the `src-tauri/src` directory to the address of the page you want to package.
3. `npm run dev` for local debugging, and open the devtools comments in `main.rs` (search for `_devtools`) for container debugging, if you have trouble adapting the immersive header, just leave out the `.with_titlebar_transparent(true)` comment.
1. Modify the `tauri.conf.json` in the `src-tauri` directory to include 5 fields `url, productName, icon, title, identifier`, icon can be selected from the `icons` directory or downloaded from [macOSicons](https://macosicons.com/#/) to match the product.
2. For window property settings, you can modify the `width/height` of the `windows` property in `tauri.conf.json`, whether it is `fullscreen`, whether it is `resizable`, if you are not good at adapting immersive headers, you can set `transparent` to `true` and you're done.
3. `npm run dev` for local debugging, and open the devtools comments in `main.rs` (search for `_devtools`) for container debugging.
4. `npm run build` can be run to package, if you have devtools mode open, remember to comment it out.
## Advanced

View File

@@ -10,6 +10,16 @@
"beforeDevCommand": ""
},
"tauri": {
"windows": [
{
"url": "https://weread.qq.com/",
"transparent": true,
"fullscreen": false,
"width": 1200,
"height": 728,
"resizable": true
}
],
"allowlist": {
"all": true
},
@@ -45,17 +55,6 @@
},
"updater": {
"active": false
},
"windows": [
{
"fullscreen": false,
"height": 728,
"resizable": true,
"title": "WeRead",
"transparent": true,
"url": "https://weread.qq.com/",
"width": 1200
}
]
}
}
}