-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👑 [需求]实现ant design pro 文档预览,如pdf,world,excel,png等 #10032
Comments
以下的 Issues 可能会帮助到你 / The following issues may help you
|
阿里云可以买到这个服务的,这不是前端能单独做到的事情 |
kkFileView 了解一下? |
我之前也想用这个,安装失败,现在统一做的处理是将他们转为pdf 然后进行预览 |
别用了吧 几年不维护了。那个word excel基本样式全乱掉。
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🥰 需求描述 | Requirements description
使用 react-file-viewer 实现ant design pro 文档预览,如pdf,world,excel,png等。
有没有哪位大佬使用上述插件实现过,我这面报错
const index = () => {
//const w = require('../../assets/DocumentSharing/项目建议书.docx');
const type = 'docx';
return (
<FileViewer
fileType={type} //文件类型
//filePath="../../assets/DocumentSharing/项目建议书.docx" //文件地址(后台给返的二进制流也可以)
filePath={xiangmu}
//onError={this.onError.bind(this)} //函数[可选]:当文件查看器在获取或呈现请求的资源时发生错误时将调用的函数。在这里可以传递日志记录实用程序的回调。
errorComponent={console.log('出现错误')} //[可选]:发生错误时呈现的组件,而不是react-file-viewer随附的默认错误组件。
unsupportedComponent={console.log('不支持')} //[可选]:在不支持文件格式的情况下呈现的组件。
/>
);
};
export default index;
The text was updated successfully, but these errors were encountered: