09 2021 档案

摘要:uni使用new image()报ReferenceError: Image is not defined或者获取不到对象 JS代码: var img = new Image(); // 创建对象 img.src = getBase64List; // 改变图片的src img.onload = f 阅读全文
posted @ 2021-09-27 14:19 编程民工 阅读(5056) 评论(0) 推荐(0) 编辑
摘要:vue路由报[vue-router] Duplicate named routes definition的原因: 配置路由定义的路由名称name存在重复名称 解决方案: 把重复的路由的名称name修改成不一样即可 阅读全文
posted @ 2021-09-26 10:50 编程民工 阅读(3543) 评论(0) 推荐(0) 编辑
摘要:封装自定义toast: 1、新建toast文件夹,文件夹内新建toast.vue和index.js文件: 2、toast.vue代码: <template> <transition name="fade"> <div class="toast" v-show="show" v-html="messa 阅读全文
posted @ 2021-09-22 13:55 编程民工 阅读(424) 评论(0) 推荐(0) 编辑
摘要:使用 qrcodejs2 实现二维码生成 下载 qrcodejs2 依赖: npm install qrcodejs2 -S 需要使用 qrcodejs2 页面引入该依赖: import QRCode from 'qrcodejs2' // 引入qrcode html代码: <div class=" 阅读全文
posted @ 2021-09-21 15:03 编程民工 阅读(2027) 评论(0) 推荐(0) 编辑
摘要:使用html2canvas把界面生成图片 下载 html2canvas 依赖: npm install html2canvas -S 需要使用 html2canvas 页面引入该依赖: import html2canvas from 'html2canvas' html代码: <template> 阅读全文
posted @ 2021-09-20 22:28 编程民工 阅读(554) 评论(0) 推荐(0) 编辑
摘要:主应用通过url给内嵌h5传参: <web-view src="http://xxxxxxxxxx/?Id=1111"></web-view> h5页面通过路径获取参数: onLoad() { this.getQueryString() }, onShow() { this.getQueryStri 阅读全文
posted @ 2021-09-13 14:40 编程民工 阅读(959) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示