- 博客(5)
- 收藏
- 关注
原创 vue+elementUI文件上传和图片上传
第一种 使用它的action方法 <el-upload class="upload-demo" :headers="token" action="http://120.53.31.103:84/api/public/img" :on-preview="handlePreview" :on-remove="handleRemove" :file-list="sizeForm.fi
2022-04-04 22:20:23 2189
原创 Vue+element table 实现横向拖动
有时候表格内容会很多,需要横向滚动查看右边的内容,又不想到底部拖动滚动条,如果能直接在内容中拖动就好了,这个时候就可以用 Vue 的自定义指令来实现了。效果上代码//自定义指令表格横向拖动import Vue from 'vue';Vue.directive('tableDrag', { inserted: function(el) { el = el.getElementsByClassName('el-table__body-wrapper')[0]; ...
2022-03-30 16:08:39 2707 1
原创 ES5新增的数组的几个方法(every,forEach, map,filter,some)
共性:对数组进行循环,循环要做的事情都在回调函数里写了 一、forEach: 功能:遍历数组中每个元素, 参数:回调函数(回调函数的参数:数组的当前元素,下标,数组本身) 解释:回调函数的代码就是循环体里要执行的代码。 返回值:无。 var scores = [98,82,75,88,96,51,90]; scores.forEach((item,index,arr)=>{ item = item+1; arr[index...
2022-03-09 22:01:21 386
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人