react-native-doc-viewer,可以在手机上直接打开文档,支持远程和本地文档。 支持的文档格式:xls,ppt,doc,xlsx,pptx,docx,png,jpg,pdf,mp4。支持iOS和Android。 组件名称:react-native-doc-viewer 首先安装:npm install react-native-doc-viewer --save 其次自动链接:react-native link react-native-doc-viewer 按...
Breadcrumbs react-doc-viewer/ tsconfig-npm.jsonLatest commit Cannot retrieve latest commit at this time. HistoryHistory File metadata and controls Code Blame 28 lines (28 loc) · 655 Bytes Raw { "compilerOptions": { "outDir": "./build", "target": "es5", "module": "commonjs", "lib...
react中使用office-document-viewer React中可以通过使用`react-officedocumentviewer`组件来使用Office文档查看器。 安装: 可以使用NPM安装`react-officedocumentviewer`,使用以下命令: npm install react-officedocumentviewer 使用: 1.导入组件: javascript import DocumentViewer from'react-officedocumentviewer'; 2.在组件中...
我结合了上传组件:react-native-file-selector 以及下载组件:react-native-fs一起实现的这个功能,具体的使用可以查看我的其他博文 react-native-doc-viewer,可以在手机上直接打开文档,支持远程和本地文档。 支持的文档格式:xls,ppt,doc,xlsx,pptx,docx,png,jpg,pdf,mp4。支持iOS和Android。 这里我是做安卓的,所以...
File viewer for React. Contribute to cyntler/react-doc-viewer development by creating an account on GitHub.
from"@cyntler/react-doc-viewer";import"@cyntler/react-doc-viewer/dist/index.css";functionApp(){constdocs=[{uri:"https://url-to-my-pdf.pdf"},// Remote file{uri:require("./example-files/pdf.pdf")},// Local File];return<DocViewerdocuments={docs}pluginRenderers={DocViewerRenderers}/>...
1、在项目的根目录下新建一个 react-native.config.js文件。文件中如下配置: // react-native.config.js module.exports = { dependencies: { 'react-native-doc-viewer': { platforms: { android: null, ios: null, // add more platform to disable auto-linking for them too }, }, 'react-native-...
npm install react-native-doc-viewer --save Add the plugin dependency to your Podfile, pointing at the path where NPM installed it: pod 'RNReactNativeDocViewer', path: '../node_modules/react-native-doc-viewer' Runpod install Manual installation ...
importReact, { Component }from'react';import{ AppRegistry, StyleSheet, Text, View, Platform, Button, Alert, ActivityIndicator, NativeAppEventEmitter, DeviceEventEmitter, NativeModules, NativeEventEmitter, TouchableHighlight }from'react-native';importOpenFilefrom'react-native-doc-viewer';varRNFS =require(...
import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Platform, Button, Alert, ActivityIndicator, NativeAppEventEmitter, DeviceEventEmitter, NativeModules, NativeEventEmitter, TouchableHighlight } from 'react-native'; import OpenFile from 'react-native-doc-viewer';...