winform WebView2 - 远程和本地资源的写法区别

远程

this.webView21.Source = new System.Uri("http://localhost:8080/#/", System.UriKind.Absolute);

本地

 string path = Path.GetFullPath(Path.Combine(Global.ExePath, Global.VueHtmlPath));
 this.webView21.Source = new Uri(@"file:///" + path);

 

posted @ 2024-06-04 11:00  岑惜  阅读(11)  评论(0编辑  收藏  举报