< 返回版块

廴壬吉 发表于 2023-10-23 13:34

fn main() -> Result<()> {
    mutils::init();
    let _ = tauri::Builder::default()
        .setup(|app| {
            let mut pb=PathBuf::new();
            pb.push(&CFG.system.login_domain);
            let local_window: tauri::Window =
                tauri::WindowBuilder::new(app, "local", tauri::WindowUrl::App("index.html".into()))
                    .build()?;
            
            let main_window: tauri::Window = tauri::WindowBuilder::new(
                app,
                "main",
                tauri::WindowUrl::App(pb),
            )
            .build()?;
            
            main_window
                .with_webview(move |_webview| unsafe {
                    let core = _webview.controller().CoreWebView2().unwrap();
                    let corem=core.clone();

评论区

写评论
github.com/shanliu/lsys 2023-10-24 13:59

--
👇
github.com/shanliu/lsys: 建议先把文档看下,文档上都写.

let ser_mgr=1;
 tauri::Builder::default()
        .manage(ser_mgr)
#[tauri::command]
async fn start_server(state: tauri::State<'_, i32>) -> Result<String, String> {
   todo!();
}
1 共 1 条评论, 1 页