摘要: 用了 viewjs 预览图片的时候 发现 用着两个 还是有区别的, 相同点 v-if与v-show都可以动态控制dom元素显示隐藏 不同点 = v-if显示隐藏是将dom元素整个添加或删除,而v-show隐藏则是为该元素添加css--display:none,dom元素还在。 1.手段:v-if是动 阅读全文
posted @ 2019-06-19 17:30 拈花醉 阅读(224) 评论(0) 推荐(0)
摘要: window.open(url) get 请求 导出文件 阅读全文
posted @ 2019-06-19 16:48 拈花醉 阅读(3032) 评论(0) 推荐(0)
摘要: *上传图片: x 报表图片 getFile () { document.getElementById('pfile').click() }, getPhoto () { let... 阅读全文
posted @ 2019-06-19 16:26 拈花醉 阅读(253) 评论(0) 推荐(0)
摘要: // 下载图片 downPhoto (path) { this.downloadFiles(path) }, // 下载 downloadFiles (content) { console.log(content) const downloadElement = document.createEle... 阅读全文
posted @ 2019-06-19 15:41 拈花醉 阅读(2554) 评论(0) 推荐(0)
摘要: document.location 这个对象包含了当前URL的信息 location.host 获取port号 location.hostname 设置或获取主机名称 location.href 设置或获取整个URL location.port设置或获取URL的端口号 location.search 阅读全文
posted @ 2019-01-07 16:38 拈花醉 阅读(409) 评论(0) 推荐(0)
摘要: 本文部分摘自:https://www.cnblogs.com/Byme/archive/2017/10/23/7718218.html 阅读全文
posted @ 2019-01-07 16:03 拈花醉 阅读(276) 评论(0) 推荐(0)
摘要: 一、校验数字的js正则表达式 1 数字:^[0-9]*$ 2 n位的数字:^d{n}$ 3 至少n位的数字:^d{n,}$ 4 m-n位的数字:^d{m,n}$ 5 零和非零开头的数字:^(0|[1-9][0-9]*)$ 6 非零开头的最多带两位小数的数字:^([1-9][0-9]*)+(.[0-9 阅读全文
posted @ 2019-01-07 15:26 拈花醉 阅读(483) 评论(0) 推荐(0)
摘要: 第一种方法 用连接符“+”把要连接的字符串连起来 第二种方法 以数组作为中介用 join 连接字符串 函数:John() 字符串拼接功能:使用您选择的分隔符将一个数组合并为一个字符串 阅读全文
posted @ 2019-01-07 14:51 拈花醉 阅读(107514) 评论(0) 推荐(2)
摘要: 三种 js 截取字符串的方法: substring() 方法; substr() 方法; slice() 方法; 1、:substring() 方法:string.substring(from, to) 方法从 from 位置截取到 to 位置,to 可选,没有设置时默认到末尾【用于提取字符串中介于 阅读全文
posted @ 2019-01-07 14:47 拈花醉 阅读(6558) 评论(0) 推荐(0)
摘要: 最近在做一个移动端的项目,简单记录一下该功能。 需求是这样的: 将带有二维码和一些介绍信息 动态生成一张图片 比如说是 生成这样的图片,文字、主图、价格、二维码都是不固定的。 对于这个需求,看见微信上已经有很多了,但是没发现认识的人有做过这样子的需求。 因此百度了很多。 最后选择了 用 html2c 阅读全文
posted @ 2017-12-27 17:20 拈花醉 阅读(1859) 评论(0) 推荐(0)