首页 > 编程知识 正文

vue动态生成前端功能页面,vue如何使用echarts

时间:2023-05-05 08:32:28 阅读:164272 作者:2371

要使用的插件mammoth

安装

NPM install--只能预览savemammothtip: docx文件

(只能转换. docx文档,转换过程中复杂的样式会突然居中、首行缩进等)

完整的代码

templatedivclass=' word-wrap ' divid=' word view ' v-html=' wordtext '/div/template script///docx文档预览wordtext: ',word URL : ' vue-mobile/media/word.docx ' /文件地址};created () { this.getWordText;methods : { getword text (} { const xhr=newxmlhttprequest ); xhr.open('get ',this.wordURL,true ); xhr.responseType='arraybuffer '; xhr.onload=() (if ) xhr.Status==200 ) mammoth.converttohtml ) Arraybuffer3360newuint8Array ) xhr.responsponsponssion ); }; xhr.send (; (,);/scriptstylelang=' less '.word-wrap { padding :15 px; img { width: 100%; }}/style通过改变颜色可以改变标签

原来文: https://www.cn blogs.com/zjianfei/p/14862952.html

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。