- 博客(11)
- 收藏
- 关注
转载 将变量做为一个对象的key,push新增进一个数组
varorgnIdListValue=["0","2"];functionarrayField(a,b){ let arrayMes=[]; for(var i=0;i<a.length;i++){ arrayMes.push({[b]:a[i]}); } return arrayMes;}var addform.orgnI...
2018-06-11 17:56:00 193
转载 iview-cli 项目、iView admin 代理与跨域问题解决方案
iview-cli 项目、iView admin 跨域、代理问题解决方案在webpack.dev.config.js文件中: 添加:devServer: { historyApiFallback: true, hot: true, inline: true, stats: { colors: true }, proxy: { ...
2018-06-04 17:38:00 461
转载 页面加载速度优化的建议
许多研究发现,页面速度和访客的滞留时间,跳出率以及收入都有直接的关系。另外,谷歌的排名算法中也把页面加载速度作为其中一项考虑因素。因此,你网站的页面加载时间是至关重要的。从访问者的角度看,测试你的浏览器速度的一个很好的方法是清除你的浏览器缓存,然后加载页面。如下就有16种优化你页面的方法:1、合并Js文件和CSS将JS代码和CSS样式分别合并到一个共享的文件,这...
2018-05-23 14:47:00 87
转载 vue中渲染页面,动态设置颜色
for循环中动态设置页面的图标或者字体颜色与循环中且套循环:style="{'color':items.color}"案例代码: html中<div class="allFunction" v-for="(item,index ) in checksMes"> <div class="titMes" data-index="dictio...
2018-05-18 14:41:00 1073
转载 e.currentTarget与e.target
e.currentTarget指的是注册了事件监听器的对象,而e.target指的是该对象里的子对象html中<div id="addBtn" v-on:click="checksBtn($event)" class="everyMes curs checkeds" title="查询"> <Icon class="iconCommon" style...
2018-05-17 11:05:00 354
转载 iview中tree的事件运用
iview中的事件和方法如下:案例说明:html代码 <Tree :data="data4" @on-check-change="choiceAll" ref="tree4" show-checkbox multiple></Tree>-------------------------------------------------...
2018-05-16 15:57:00 678
转载 HTML DOM classList 属性
实例为 <div> 元素添加 class:document.getElementById("myDIV").classList.add("mystyle");定义和用法classList 属性返回元素的类名,作为 DOMTokenList 对象。该属性用于在元素中添加,移除及切换 CSS 类。classList 属性是...
2018-05-14 17:06:00 188
转载 节点的运用和方法
JQUERY的父,子,兄弟节点查找方法jQuery.parent(expr) 找父亲节点,可以传入expr进行过滤,比如$("span").parent()或者$("span").parent(".class")jQuery.parents(expr),类似于jQuery.parents(expr),但是是查找所有祖先元素,不限于父元素jQuery.children(expr...
2018-05-14 16:58:00 79
转载 vue中点击添加class,双击去掉class
VUE中html 中<ul id="shoppingList" v-on:click="addClass($event)" class="iview-admin-draggable-list"> <li></li></ul>点击li时js如下addClass:function(e){ cons...
2018-05-14 16:57:00 543
转载 a、button、input点击获取焦点时出现蓝色边框,如何去掉
a,button,input{-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-user-modify: read-write-plaintext-only;}可根据实际情况添加outline: none;或box-shadow: none;有时候<img />图片放在a标签里也会出...
2018-05-03 18:14:00 142
转载 javascript 时间倒计时效果
<div id="divdown1"></div><script language="javascript" type="text/javascript"> var interval = 1000; //倒计时间隔时间 function ShowCountDown(year,month,day,divname) { var no...
2018-04-24 16:24:00 108
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人