//判断文件是否已存在,返回result为true说明存在,result为false说明不存在 (result)=>{ console.log(result); if(!result){ var DownloadFileOptions = { fromUrl: "https://calibre-ebook.com/downloads/demos/demo.docx",// 下载文件的URL toFile: SavePath+"/demo.docx", // 将文件保存到的本地文件系...
OpenFile.openDoc([{ url:"https://calibre-ebook.com/downloads/demos/demo.docx", fileNameOptional:"test filename" }],(error,url)=>{ if(error){ this.setState({animating:false}); }else{ this.setState({animating:false}); console.log(url) } }) }else{ //Android this.setState({animati...
Storybook Demo https://cyntler.github.io/react-doc-viewer Installation Use one of the package managers for Node.js. npm i @cyntler/react-doc-viewer # or yarn add @cyntler/react-doc-viewer Usage Warning: By default the component height will expand and contract to the current loaded file....
Storybook Demo https://cyntler.github.io/react-doc-viewer Installation Use one of the package managers for Node.js. npm i @cyntler/react-doc-viewer # or yarn add @cyntler/react-doc-viewer Usage Warning: By default the component height will expand and contract to the current loaded file....
1.创建一个名为`file-viewer-demo`的React项目。 2.在项目中添加一个名为`example.docx`的Word文档。 3.在项目根目录下创建一个名为`App.js`的文件,并将上述示例代码复制到`App.js`中。 4.执行`npm start`命令来运行React项目。 5.在浏览器中打开`localhost:3000`来查看React File Viewer的运行效果。 V...
{url:SavePath+"/demo.jpg", fileName:"sample", cache:false, fileType:"jpg" }], (error, url) => { if (error) { this.setState({animating: false}); } else { this.setState({animating: false}); console.log(url) } }) } } /* * Binary in URL * Binary String in Url * ...
if(Platform.OS ==='ios'){ OpenFile.openDoc([{url:"https://calibre-ebook.com/downloads/demos/demo.docx",fileNameOptional:"test filename"}], (error, url) => {if(error) {this.setState({animating:false}); }else{this.setState({animating:false});console.log(url) } }) }else{//...
Removed Setup Demo from contents at top of README (8a8db314) Added README info for importing and using the included individual renderers (3a87cf87) README updated (39fd2b93) New Features TIF: Added .tif as an option to render within TIFFRenderer. (a32f9b0f) FileName Header: decode...
mattmogford-alcumus ignore yarn-error.log in npm package 0faf71f· Aug 28, 2020 HistoryHistory File metadata and controls Code Blame 10 lines (10 loc) · 103 Bytes Raw /.git /.vscode /demo /public /src CHANGELOG.md README.md tsconfig-npm.json tsconfig.json yarn-error.log 1 2 3 4...
{url:SavePath+"/demo.jpg", fileName:"sample", cache:false, fileType:"jpg" }], (error, url) => { if (error) { this.setState({animating: false}); } else { this.setState({animating: false}); console.log(url) } }) } } /* * Binary in URL * Binary String in Url * ...