fix: relax xwebview webview typings
这个提交包含在:
父节点
77feb6ecd9
当前提交
9adc3e3084
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@xuqm/rn-xwebview",
|
"name": "@xuqm/rn-xwebview",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"description": "XuqmGroup RN SDK — XWebView module",
|
"description": "XuqmGroup RN SDK — XWebView module",
|
||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
|
|||||||
@ -42,6 +42,7 @@ import { fetchDownloadInfo, saveBase64File, startDownload } from './XWebViewDown
|
|||||||
import IconBack from './icons/IconBack'
|
import IconBack from './icons/IconBack'
|
||||||
import IconClose from './icons/IconClose'
|
import IconClose from './icons/IconClose'
|
||||||
import IconMenu from './icons/IconMenu'
|
import IconMenu from './icons/IconMenu'
|
||||||
|
const WebViewAny = WebView as unknown as React.ComponentType<any>
|
||||||
|
|
||||||
const DOWNLOAD_EXTENSIONS = [
|
const DOWNLOAD_EXTENSIONS = [
|
||||||
'.pdf',
|
'.pdf',
|
||||||
@ -536,7 +537,7 @@ export function XWebViewScreen() {
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
) : (
|
) : (
|
||||||
<WebView
|
<WebViewAny
|
||||||
ref={webViewRef}
|
ref={webViewRef}
|
||||||
source={source}
|
source={source}
|
||||||
style={styles.webview}
|
style={styles.webview}
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import {
|
|||||||
|
|
||||||
import XWebViewProgress from './XWebViewProgress'
|
import XWebViewProgress from './XWebViewProgress'
|
||||||
import { fetchDownloadInfo, saveBase64File, startDownload } from './XWebViewDownload'
|
import { fetchDownloadInfo, saveBase64File, startDownload } from './XWebViewDownload'
|
||||||
|
const WebViewAny = WebView as unknown as React.ComponentType<any>
|
||||||
|
|
||||||
const DOWNLOAD_EXTENSIONS = [
|
const DOWNLOAD_EXTENSIONS = [
|
||||||
'.pdf',
|
'.pdf',
|
||||||
@ -346,7 +347,7 @@ export function XWebViewView() {
|
|||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
) : (
|
) : (
|
||||||
<WebView
|
<WebViewAny
|
||||||
ref={webViewRef}
|
ref={webViewRef}
|
||||||
source={source}
|
source={source}
|
||||||
style={styles.webview}
|
style={styles.webview}
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户