先附上npm网址:https://www.npmjs.com/package/react-native-doc-viewer 检查并链接: 一、ios端: 1、在XCode中,在项目导航器中,右键单击Libraries➜Add Files to [你的项目名字] 2、转到node_modules➜ react-native-doc-viewer并添加RNReactNativeDocViewer.xcodeproj 3、在XCode中,在项目导航器中,选择您...
In Visual Studio add theRNReactNativeDocViewer.slninnode_modules/react-native-react-native-doc-viewer/windows/RNReactNativeDocViewer.slnfolder to their solution, reference from their app. Open up yourMainPage.csapp Addusing Com.Reactlibrary.RNReactNativeDocViewer;to the usings at the top of the ...
compile project(':react-native-doc-viewer') Windows on the Roadmap Read it! In Visual Studio add theRNReactNativeDocViewer.slninnode_modules/react-native-react-native-doc-viewer/windows/RNReactNativeDocViewer.slnfolder to their solution, reference from their app. Open up yourMainPage.csapp Addu...
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-...
DocumentDirectoryPath; export default class DocumentViewerExample extends Component { constructor(props) { super(props); this.state = { animating: false, progress: "", donebuttonclicked: false, } this.eventEmitter = new NativeEventEmitter(NativeModules.RNReactNativeDocViewer); this.eventEmitter....
DocumentDirectoryPath; export default class DocumentViewerExample extends Component { constructor(props) { super(props); this.state = { animating: false, progress: "", donebuttonclicked: false, } this.eventEmitter = new NativeEventEmitter(NativeModules.RNReactNativeDocViewer); this.eventEmitter....
IOS Document Viewer Doc Android Document Viewer Doc Usage importReact, { Component }from'react';import{ AppRegistry, StyleSheet, Text, View, Platform, Button, Alert, ActivityIndicator, NativeAppEventEmitter, DeviceEventEmitter, NativeModules, NativeEventEmitter, ...
见:https://www.microsoft.com/en-us/microsoft-365/blog/2013/04/10/office-web-viewer-view-office-documents-in-a-browser/ 如果项目比较大,还是让后端搭建一套服务,把doc等文件转成pdf把 其他 react-native-file-viewer 使用手机里安装的应用打开,缺点是,需要手机装有能打开对应文件的app,而且要跳出我们的...
"react-native-code-push": "^7.0.4", "react-native-device-info": "^8.1.3", "react-native-document-picker": "^4.1.0", "react-native-elements": "^1.2.1", "react-native-fast-image": "^8.3.4", "react-native-file-viewer": "^2.0.0", ...
因为那样根本没法跟Native的比。而是要把React这种Viewer的架构在Native上实现,把原有的模板式UI重构成...