web页面上面有附件,点击没反应,最后发现是需要实现以下代理方法
func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? {
if navigationAction.targetFrame?.isMainFrame == nil {
webView.load(navigationAction.request)
}
return nil;
}