-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] window.add_child dosen't work at tauri 2.0.5 #11452
Comments
@why0123 @jianghaitaoo 可以请问下你们这个 app 的顶部的效果类似于 google 浏览器的顶部效果是怎么做到的呢? 我是使用vue作为前端的,然后打开新窗口也是在前端打开的
|
我是通过在一个 window 中构建多个 webview 的方式实现的,上面的tab其实是自己用 webview 画出来的一个页面,通过 tauri 的命令进行交互,进而动态地控制下方的 webview ,上下两个部分是分开来的。 如何创建子 webview 可以查看这里:WebviewBuilder 该功能不是默认功能,需要在 部分创建新 webview 的代码: let mut webview_builder =
WebviewBuilder::new(label.clone(), tauri::WebviewUrl::App(url.into()))
.disable_drag_drop_handler();
let webview = window
.add_child(
webview_builder,
tauri::LogicalPosition::new(0, 86),
PhysicalSize::new(size.width, size.height - 86),
)
.unwrap(); 如果你希望自定义顶栏,并重绘相关控件,可以查看:window-customization 希望我理解了你的疑问,并且这个回答对你有帮助 |
Describe the bug
window.add_child dosen't work at tauri 2.0.5
this code works well in tauri 2.0.1
but in tauri 2.0.5,it dosen't woked anymore.
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: