摘要:
ESLint Definition for rule 'vue/script-setup-uses-vars' was not found 在rules中配置:'vue/script-setup-uses-vars': 'off' 阅读全文
posted @ 2022-09-29 20:07
jiazq
阅读(194)
评论(0)
推荐(0)
摘要:
import axios from 'axios' import qs from 'qs' axios.defaults.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8' // 'Content- 阅读全文
posted @ 2022-09-29 20:06
jiazq
阅读(86)
评论(0)
推荐(0)
摘要:
axios 调用raw类型的参数接口 content-Type要设置成application/json axios.defaults.headers['content-Type'] = 'application/json' 参数直接object对象传进去,不需要qs.stringfy() expor 阅读全文
posted @ 2022-09-29 20:05
jiazq
阅读(620)
评论(0)
推荐(0)
摘要:
生成二维码,扫码跳转网址 import QRCode from 'qrcode' // <canvas ref="myCanvas" style="width: 160px; height: 160px;"/> this.$nextTick(() => { // jumpUrl为跳转的网址,myCa 阅读全文
posted @ 2022-09-29 20:04
jiazq
阅读(170)
评论(0)
推荐(0)
摘要:
JS getClientRects 和 getBoundingClientRect() getClientRects获取元素占据页面的所有矩形区域 getBoundingClientRect该方法用于计算获取的dom元素各边与上、左容器边框之间的距离,返回一个对象{ left, top, right 阅读全文
posted @ 2022-09-29 20:03
jiazq
阅读(182)
评论(0)
推荐(0)
摘要:
/** * input框限制小数 * @param {*} val * @returns */ export const inputLimitFloat = function(val) { val = val.toString() // 截取可能为负号 // const t = val.charAt 阅读全文
posted @ 2022-09-29 20:02
jiazq
阅读(267)
评论(0)
推荐(0)
摘要:
Date.prototype.format = function (format) { var o = { 'M+': this.getMonth() + 1, // month 'd+': this.getDate(), // day 'h+': this.getHours(), // hour 阅读全文
posted @ 2022-09-29 20:00
jiazq
阅读(15)
评论(0)
推荐(0)
摘要:
计算滚动条是否滑倒底部 document.documentElement.scrollTop + document.documentElement.clientHeight >= document.documentElement.scrollHeight 滚动的高度加上窗口的高度 可能会碰到某个手机 阅读全文
posted @ 2022-09-29 19:58
jiazq
阅读(38)
评论(0)
推荐(0)
摘要:
常见正则 手机号 /^1\d{10}$|^[2-9]\d{6,7}$|^[48]00\d{7}$|^[19]\d{4}$|^1\d{2}$/; 邮箱 /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0 阅读全文
posted @ 2022-09-29 19:51
jiazq
阅读(38)
评论(0)
推荐(0)
摘要:
less写法示例 <div class="parentDiv"> <div class="childDiv">childDiv1</div> <div class="childDiv">childDiv2</div> <div class="childDiv">childDiv3</div> <di 阅读全文
posted @ 2022-09-29 19:50
jiazq
阅读(213)
评论(0)
推荐(0)
浙公网安备 33010602011771号