/images/avatar.png

The content published by the Dilys.Lyu does not guarantee absolute correctness, and the risks associated with using the content of this site have nothing to do with this site. If there is any infringement in this website, please contact the author and delete it.

监听页面路由变化刷新页面

需求背景 当页面列表跳转详情页需要携带多个参数,当再返回列表页重新进入详情页时,任何一个参数发生变化都要刷新页面请求数据 实现方式 通过监听路由变

滚动翻页发请求

需求描述 查询列表数据较多,通过滚动分页请求数据优化页面加载数据性能。 每次页面滚动到底部出发查询请求,所有数据请求完毕,鼠标再次向下滚动时,提

全量操作以及批量操作

1 2 3 4 5 6 <el-button type="primary" class="lock" @click="lockAll"> 全部锁 </el-button> <el-button type="text" class="btn" icon="el-icon-lock" @click="batchAll"> 批量锁 </el-button> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 async lockAll(){//

自定义删除弹框

基于 Popover 的属性实现弹框 Popover 的嵌套操作,这相比 Dialog 更为轻量 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <el-popover placement="top" width="160" v-model="visible"> <p>是否确定删除?<

vue 基础模版

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 <template> <div id = "app"> <input type="text" id="ipt"> </div> </template> <script type = "text/javascript"> export default{ name:'app', components:{}, props:{}, data(){ return{ } }, computed:{},

怎么让一个 div 水平垂直居中

1 2 3 <div class = "parent"> <div class= child></div> </div> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 div.parent{ display:flex; justify-content:center; align-items:center; } div.parent{ position:relative; } div.child{ position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); } /*或者*/ div.child{ width:50px; height:10px;

ES6之数组扁平化 arr.flat(Infinity)

ES6 之数组的flat(Infinity)扁平化,可以实现多维数组转成一维数组 1 2 3 4 5 6 7 8 9 10 11 12 13 14 let arr1 = [1,2,[3,4]] arr1.flat()//[1, 2, 3, 4] var arr2 = [1, 2, [3, 4, [5, 6]]]; arr2.flat(); //

javascript 中 Set Map

Set 定义: Set 对象允许你存储任何类型的唯一值,无论是原始值或者是对象引用, Set 对象是值的集合,你可以按照插入的顺序迭代它的元素。 Set 中的元素只会出现

v-if 多条件使用按钮闪烁

问题描述 由于项目需求多次变动,由原来的一个控制条件变为两个控制条件,使用“&&”连接,最终正确实现了按钮显隐控制,但切换控制