随笔分类 - vue
摘要:准备工作 npm install qrcodejs2 --save 使用页面引入 import QRCode from "qrcodejs2"; html代码 <div> <div v-for="(v, index) in printList " :id="'printDiv' + index" :
阅读全文
摘要:环境:vue3+ts 解决办法:在src目录里面添加env.d.ts文件,在文件里贴上 declare module '*.vue' { import type { DefineComponent } from 'vue' const component: ComponentOptions | Co
阅读全文
摘要:npm install vue-quill-editor main中 // 富文本 import VueQuillEditor from "vue-quill-editor"; import "quill/dist/quill.core.css"; import "quill/dist/quill.
阅读全文
摘要:cnpm install html2canvas;cnpm install jspdf --save; <el-button @click="getPdf('print', 'aa')" icon="el-icon-refresh" size="mini"> 打印PNG </el-button> <
阅读全文
摘要:先下载依赖 npm install html2canvas <el-button @click="getPdf('print', 'aa')" icon="el-icon-refresh" size="mini"> 打印JPG </el-button> <div id="print"> <内容> <
阅读全文
摘要:const originalPush = Router.prototype.push Router.prototype.push = function push (location) { return originalPush.call(this, location).catch(err => er
阅读全文
摘要:需求:因为公司使用的是若以框架,所以存在一个首页状态缓存,导致每次到首页页面没有刷新的问题。 watch: { $route: function (to, from) { if (from.name != "Index") { console.log("牛逼~~"); } } 这个方法可以很多跟路由
阅读全文
摘要:原因:在写项目的时候碰到了一个bug,就是在用户点击打开一个弹框的时候,做多选框的数据回现,但是不知道什么原因,elenemt的方法就是实现不了。 初步理解:vue.nexttick()当时对它的理解只是最快的拿到方法里的值,并且可以判断值是否为空。(当时我对我的bug的理解是,在方法执行的时候,值
阅读全文

浙公网安备 33010602011771号