08 2020 档案
摘要:/* 发送效果 */ .icon { width: 1em; height: 1em; vertical-align: -0.15em; fill: currentColor; overflow: hidden; } #send_btn button { background: #5f55af; b
阅读全文
摘要:function type(target){ var ret=typeof(target); //引用值类型可以判断是数组,对象还是包装类 var template={ "[object Array]":"array", "[object Object]":"object", "[object Nu
阅读全文
摘要:1、新建utils文件夹,在文件夹里面新建reques.js import axios from 'axios'; import { Message, Loading } from 'element-ui' import qs from 'qs'; //参数序列化,把数据格式转为 x-www-for
阅读全文
摘要:// 封装一个方法能够在元素后面插入dom元素 (在原型链上编程) <div> <span></span> <p></p> <strong></strong> <i></i> <address></address> </div> Element.prototype.insertAfter=funct
阅读全文
摘要:function getStyle(ele,prop){ if(window.getComputedStyle){ //w3c标准 return window.getComputedStyle(ele,null)[prop]; }else{//ie低版本 return ele.currentStyl
阅读全文
摘要:对给定的内容进行小驼峰式转换 var reg=/-(\w)/g; var str="the-first-name"; str=str.replace(reg,function($,$1){ return $1.toUpperCase(); }) console.log(str) // theFirs
阅读全文
摘要:function retSibling(e,n){ while(e && n){ if(n>0){ if(0 && e.nextElementSibling){ e=e.nextElementSibling; }else{ for(e=e.nextSibling;e && e.nodeType!=1
阅读全文