YVAN7123
V2EX  ›  问与答

有没有会 uts 大佬, 一个问题

  •  
  •   YVAN7123 · Apr 17, 2025 · 1020 views
    This topic created in 418 days ago, the information mentioned may be changed or developed.

    背景: 重写 webview 的 input 的 文件操作

    uts 自定义了一个 WebChromeClient 的 onShowFileChooser 的方法

    override onShowFileChooser(webView: WebView, filePathCallback?:  ValueCallback<android.net.Uri[]> | null ,
    fileChooserParams: WebChromeClient.FileChooserParams) {
    	super.onShowFileChooser(webView, filePathCallback, fileChooserParams); 
    }
    

    hbuilder 报错 18:44:14.744 ‌error: 类型不匹配: 推断类型是 ValueCallback<UTSArray<Uri>>?(可为空的 ValueCallback<UTSArray<Uri>>),但预期的是 ValueCallback<Array<(out) Uri!>!>!。‌

    完全搞不清楚 ValueCallback<Array<(out) Uri!>!>!的类型如何写

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4072 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 00:53 · PVG 08:53 · LAX 17:53 · JFK 20:53
    ♥ Do have faith in what you're doing.