自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 后端返回的文件流,vue在线预览excel---待完善

项目场景:上传excel文件后,需实现预览功能,后端返回的文件流,需要实现预览功能解决方案:preview() { const _this = this; _this.$http({ method: "get", responseType: "arraybuffer", // 预览arraybuffer,下载:blob url:"接口地址", }) .then((res) => { console.log(res); // 图一

2022-03-18 09:28:33 1993

原创 实现在线预览word文档

实现在线预览word文档引用htmlvue引用const docx = require('docx-preview');window.JSZip = require('jszip')html<div ref="file"></div>vuethis.$http({ method: "get", responseType: "blob", url: "//接口地址" }) .then((res

2022-03-16 15:13:36 1533 1

原创 父组件通过props传值给子组件,子组件改变props的属性值报错问题

报错Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop’s value. Prop being mutated: “status”解决方法: props: { editPrice: { type: Str

2021-04-19 15:24:30 225

原创 vue 打印qrcode动态生成的二维码

<!-- 打印区域 --> <div class="QR-code" id="QR-code"> <div id="qrcode" ref="qrCodeDiv" class="qrCode" style="margin:0 auto"></div> </div> <div class="btn-content"> <a class="btn btn-right" v-on:click

2021-01-07 17:55:13 773

转载 vue 打印 页面指定地方的内容

<!-- 打印区域 --> <div class="QR-code" id="QR-code"> <div id="qrcode" ref="qrCodeDiv" class="qrCode" style="margin:0 auto"></div> </div> <div class="btn-content"> <a c

2021-01-07 17:22:22 659

原创 链接生成二维码( QRCode )

Vue中链接生成二维码安装插件sudo npm install qrcodejs2 --save页面中引入 import QRCode from "qrcodejs2";components: { QRCode },页面展示与配置html部分<div class="QR-code"> <div id="qrCode" ref="qrCodeDiv" class="qrCode"></div></div>方法crea

2020-12-28 16:00:54 1610

原创 Mac 安装 Typescript(zsh: command not found: tsc)

Mac 安装 Typescript(zsh: command not found: tsc)想学习新语言的第一天,差点被安装打败了话不多说上图安装typescript包sudo npm install typescript -g //全局安装typesrcpttsc --version //查看是否安装成功安装的时候检查是否安装成功如果出现了以上的情况,主要是缺少了环境变量安装成功后回显的地址,就是我们环境

2020-12-25 15:53:11 8890 4

转载 数组对象里的时间排序

Vue 时间排序数组对象里的时间排序后端接口返回的时间类型是:yyyy-MM-dd HH:mm:ss通过replace()函数,将其转换为:yyyy/MM/dd HH:mm:ss再通过getTime()方法返回距1970年1月1日之间的毫秒数通过sort()函数进行比较替换,具体代码如下:this.noticeList.sort((a,b)=>{ let aTimeString = a.effectiveDate; let bTimeString = b.e

2020-09-07 18:09:22 937

原创 render函数(根据条件判断是否影响--style:-----)

2020-01-06 17:51:31 817

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除