
常用javascript
zarek_jiamu
借鉴前人的平台,用自己的逻辑思维构建自己的style!
展开
-
js获取本地文件
采用动态注入标签获取本地文件,好处在于不用编写固定的input框样式获取文件,在哪个便签上都可以绑定方法获取文件。原创 2022-08-26 14:22:41 · 2020 阅读 · 1 评论 -
vue时间格式转换工具
javascript时间格式转换工具原创 2022-08-25 10:29:13 · 1233 阅读 · 0 评论 -
原生http数据请求封装
// 数据请请求 contentType对象var contentType = { POST: 'application/x-www-form-urlencoded', GET: 'application/x-www-form-urlencoded', FILE: 'multipart/form-data'}// 业务消息提示var infoTip = function(data, success, fail) { // 需要自己确定外层结构并修改业务处理 i...原创 2022-02-14 10:51:40 · 600 阅读 · 0 评论 -
web识别二维码信息
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title>图片二维码识别</title> <script src="./jsQR.js"></script><!-- <script src="https://cozmo.github.io/jsQR/jsQR.js">&l...原创 2021-08-23 18:28:45 · 517 阅读 · 0 评论 -
html生成PDF与图片
import html2canvas from 'html2canvas';import JsPDF from 'jspdf';/** * 生成文件名 */const getFilename = () => { const newDate = new Date(); const year = newDate.getFullYear(); const month = (newDate.getMonth() + 1 + '').padStart(2, '0'); .原创 2021-03-08 15:21:42 · 384 阅读 · 0 评论 -
常用拷贝信息,深拷贝数据,加密,解密
import CryptoJS from "crypto-js";const CRYPTOJSKEY = "zhouzhenrongqq12";class PublicMethod { /** * 复制文本 * @param text 复制的内容 */ static copy(text) { const oInput = document.createE...原创 2019-12-21 10:27:57 · 225 阅读 · 0 评论