- 博客(8)
- 收藏
- 关注
原创 判断当前是在ie还是谷歌
1:在utils建个js文件export function BrowserType() {var userAgent = navigator.userAgent // 取得浏览器的userAgent字符串var isOpera = userAgent.indexOf(‘Opera’) > -1 // 判断是否Opera浏览器var isIE = userAgent.indexOf(‘compatible’) > -1 &&userAgent.indexOf(‘MSIE’
2022-02-16 11:15:32 899 1
原创 移除数组某个元素
//自定义移除数组Array.prototype.indexOf = function (val) {for (var i = 0; i < this.length; i++) {if (this[i] == val) return i;}return -1;};Array.prototype.remove = function (val) {var index = this.indexOf(val);if (index > -1) {this.splice(index, 1
2021-08-25 09:28:58 120
原创 获取时间区间[2021-08-02,2021-08-05]所有日期
获取时间区间[2021-08-02,2021-08-05]所有日期getAll(begin, end) {var arr = [];Date.prototype.format = function () {var s = “”;var mouth =this.getMonth() + 1 >= 10? this.getMonth() + 1: “0” + (this.getMonth() + 1);var day = this.getDate() >= 10 ? this.ge
2021-08-10 09:35:56 227
原创 vue cli3 rem适配方案解决
vue cli3 rem适配方案解决vue cli3 rem适配方案解决安装插件npm install postcss-pxtoremnpm install lib-flexible 在main.js引入import ‘lib-flexible/flexible.js’在’lib-flexible/flexible.js’中改写最后在你所写得vue文件转换值就可以了...
2021-02-18 16:44:39 145
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人