
vue
文章平均质量分 85
夜惊如水
这个作者很懒,什么都没留下…
展开
-
vue 动画效果
<template><divclass="notice-box"@mousemove="mousemove"@mouseleave="mouseleave"style="height:50px;background:#ccc;color:#fff;position:relative;"><divclass="notice":style="{'animation-duration':len,'animation-play-stat...原创 2021-12-06 10:39:27 · 261 阅读 · 0 评论 -
vant tab选项卡 左右滑动 且保留数据
onClick() { this.$nextTick(() => { document.documentElement.scrollTop = document.body.scrollTop = this.list[this.active].scrollTop }) if (this.list[this.active].products.length > 0) return this.list[this.active].l...原创 2020-12-30 14:01:02 · 3003 阅读 · 0 评论 -
vue 二进制流 转成 json数据 new Blob
tradeDownloadExcel(data).then(async res => { if (res.data.type === 'application/json') { // const text = await res.data.text() // const jsonText = await JSON.parse(text) // this.downloadExcelShow = true .原创 2020-11-23 17:05:33 · 2355 阅读 · 0 评论 -
vue 定时器清除
beforeDestroy() { this.$once('hook:beforeDestroy', () => { clearInterval(this.timer) }) },原创 2020-07-27 17:46:58 · 402 阅读 · 0 评论 -
利用swiper 实现上拉下拉回弹效果
<template> <div> <swiper :options="swiperOption" class="swiper"> <swiper-slide class="text"> <div>写入大量内容</div> ...转载 2019-05-30 17:51:26 · 1680 阅读 · 0 评论 -
vue中使用 anmite.css 方法
1. 安装cnpm install --save animate.css2. 在 main.js使用import animate from 'animate.css'Vue.use(animate)3. 页面中使用方法很多种 <button @click='fade' ref='animate'>点击</button>fade() { ...原创 2019-01-05 15:39:12 · 420 阅读 · 0 评论 -
vue 滚动事件
// html部分 <transition name="slide-fade"> <div class="head" v-if="show"></div> </transition>// js部分 mounted(){ windo原创 2019-01-05 14:07:24 · 1257 阅读 · 0 评论