上一页 1 2 3 4 5 6 ··· 10 下一页

2023年9月4日

列表滚动保存当前位置,跳转详情页面返回后继续当前位置

摘要: 思路如下: // 1. 监听页面的滚动(onPageScroll 生命周期) // scrollTop是data中定义的变量,可以将页面的滚动值赋值保存下来。 onPageScroll(e) { this.scrollTop = e.scrollTop; } // 2.离开当前页面时,保存到缓存中 阅读全文

posted @ 2023-09-04 17:25 一名小学生呀 阅读(129) 评论(0) 推荐(0) 编辑

2023年8月31日

数组的处理

摘要: push(向数组结尾添加元素) unshift(向数组的头部添加元素) splice(向数组中间添加元素) 数组参数位置调换 $set更新 concat数组拼接 sort排序 reverse颠倒数组中元素的顺序 数组转字符串 fill 替换数组内元素,用新元素替换掉数组内的元素 数组的查找 pop 阅读全文

posted @ 2023-08-31 10:28 一名小学生呀 阅读(11) 评论(0) 推荐(0) 编辑

2023年8月28日

animate.css动画库

摘要: 使用CSS3的animation制作的动画效果的CSS集合,里面预设了很多种常用的动画(官网:https://animate.style/) // 安装 npm install animate.css (npm安装) https://unpkg.com/animate.css@3.5.2/anima 阅读全文

posted @ 2023-08-28 09:56 一名小学生呀 阅读(269) 评论(0) 推荐(0) 编辑

鼠标任意拖动元素排列顺序(vue)

摘要: 参考地址:https://codesandbox.io/s/condescending-butterfly-enjqpr?file=/src/App.vue <template> <div> <transition-group name="drag" class="list" tag="ul"> < 阅读全文

posted @ 2023-08-28 09:40 一名小学生呀 阅读(57) 评论(0) 推荐(0) 编辑

异步动态引入组件

摘要: // vue3 写法 <component :is="componentParam[active] " /> // 引入api import { defineAsyncComponent } from 'vue' const active = ref('b') const componentPara 阅读全文

posted @ 2023-08-28 09:20 一名小学生呀 阅读(18) 评论(0) 推荐(0) 编辑

vue-颜色选择器(vColorPicker)

摘要: // 安装插件 // 官网:http://vue-color-picker.rxshc.com/ npm install vcolorpicker -S // main.js 中全局引入 import vcolorpicker from 'vcolorpicker' Vue.use(vcolorpi 阅读全文

posted @ 2023-08-28 09:14 一名小学生呀 阅读(46) 评论(0) 推荐(0) 编辑

2023年8月23日

点击实现文字复制

摘要: // 1. 创建一个方法文件 fun.js export const copyToClipboard = (text, callback) => { if (navigator.clipboard) { // clipboard api 复制 navigator.clipboard.writeTex 阅读全文

posted @ 2023-08-23 09:51 一名小学生呀 阅读(16) 评论(0) 推荐(0) 编辑

vue中$event的元素属性

摘要: <template> <div> <button @click="clickFun($event)">点击</button> </div> </template> <script> export default { data(){ return{} }, methods:{ check(event) 阅读全文

posted @ 2023-08-23 09:04 一名小学生呀 阅读(68) 评论(0) 推荐(0) 编辑

2023年7月6日

*gitcode中删除已有的项目

摘要: 阅读全文

posted @ 2023-07-06 09:45 一名小学生呀 阅读(76) 评论(0) 推荐(0) 编辑

2023年6月28日

vue-element table表格排序推拽功能

摘要: // 1.安装sortablejs npm install sortablejs --save // 2.功能页面中引入 import Sortable from ‘sortablejs’ 具体使用(注意:element table务必指定row-key,且row-key必须是唯一的,如 id,不然 阅读全文

posted @ 2023-06-28 16:10 一名小学生呀 阅读(28) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 10 下一页

导航