08 2024 档案
摘要:背景 有的时候我们需要向后端发送多个网络请求,如果全部在主线程中操作的话页面会变得非常卡顿,我们可以使用webwoker来发送网络请求,一旦服务响应结果,我们再从子线程给主线程发送消息 步骤 默认情况下vue2是不支持webwoker。 安装worker-loader npm i -D worker
阅读全文
摘要:需求 有的时候我们通过前端将应用的某些内容整理到PPT文档中,通过PPT文档展示给其他用户看 参考文档 https://vikeya.com/archives/1703660042725#heading-1 https://gitbrent.github.io/PptxGenJS/docs/api-
阅读全文
摘要:需求 有的情况,我们需要给我们的网页添加水印。我们可以使用第三方库Watermark Design。官方地址:https://watermark-design.github.io/watermark/zh/ 效果 示例代码 入口文件main.js import WatermarkDesign fro
阅读全文
摘要:效果图 代码 <template> <div class="app"> <div class="demo" ref="demoRef"></div> </div> </template> <script> import * as echarts from 'echarts' export defau
阅读全文
摘要:效果 option = { tooltip: { trigger: 'axis', axisPointer: { // Use axis to trigger tooltip type: 'shadow' // 'shadow' as default; can also be 'line' or '
阅读全文
摘要:效果图 代码 <template> <div class="app"> <span class="menu-btn">菜单列表</span> <div class="menu-container"> <div class="menu-list"> <!-- <div class="menu-list
阅读全文
摘要:背景 有的时候后端返回文件,文件是属于stream类型(二进制格式),我们获取到二进制格式的文件后可能是需要下载,也直接在页面上预览等等。 代码 <template> <div class="app"> <iframe :src="iframeSrc" scrolling="auto" style=
阅读全文
摘要:背景 有的时候我们需要在前端页面上预览某些文档,文档的格式比如:word、ppt、pdf、图片等等 实现方案 可以使用@zuiyouliao/vue-file-viewer第三方库,官方地址 方式1:通过组件方式引入 优点:word/图片可以识别,方便快捷。 缺点:pdf/pptx文件无法识别。 安
阅读全文
摘要:文章链接:https://blog.csdn.net/wybaby168/article/details/122842866 https://gitee.com/ye-jizeng/vue-office https://home.me7.cn/file-viewer-doc/index.html#/
阅读全文