随笔分类 - vue
摘要:https://github.com/tim-kos/node-retry (npm install retry) const retry = require('retry') const delay = require('delay') const isItGood = [false, false
阅读全文
摘要:<div class="container"> <img src="loading.gif" data-src="pic.png"> <img src="loading.gif" data-src="pic.png"> <img src="loading.gif" data-src="pic.png
阅读全文
摘要:播放器播放条 斗鱼、Youtobe等 https://web-streaming.github.io/ppbar/ 使用 使用 ppbar,需要导入 ProgressBar 类和 ppbar 的样式。 import ProgressBar from 'ppbar'; import 'ppbar/di
阅读全文
摘要:<template> <div class="list-wrapper" ref="allListRef"> <div v-if="showArrow && listSource.length > minArrowItemsCount" @click="scrollLeft" class="arro
阅读全文
摘要:import { groupBy } from 'lodash'computed: { groupRecords() { const records = this.dataRecords .map( data => { const date = moment(this.tabActive 1 ? d
阅读全文
摘要:<template> <div class="count-to-wrapper"> <slot name="left"/> <p class="content-outer"><span :class="['count-to-count-text', countClass]" :id="counter
阅读全文
摘要:需求: 从接口动态获取子菜单数据 动态加载 要求只有展开才加载子菜单数据 支持刷新,页面显示正常 思路: 一开始比较乱,思路很多。想了很多 首先路由和菜单共用一个全局route, 数据的传递也是通过store的route, 然后要考虑的俩个点就是一个就是渲染菜单和加载路由,可以在导航首位里处理路由,
阅读全文
摘要:<template> <div :id="`drawer_container_${id}`"> <el-drawer :id="id+'_drawer'" :wrapperClosable="false" @close="onClose" v-if="isShowDraw" :visible.syn
阅读全文
摘要:1.普通滚动 <div class="info"> <transition name="slide" mode="out-in"> <div class="con" v-if="number == 0" key="money"> <div>发射心心得奖金</div> <div class="mone
阅读全文
摘要:原因:es6 不兼容 1. object.assign babel不会处理默认 npm install babel-plugin-transform-object-assign npm install babel-plugin-transform-object-rest-spread 2.项目第三方
阅读全文
摘要:const path = require('path'); const cwd = process.cwd(); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const { getHtmlWebpackPlugins, getE
阅读全文
摘要:手机共通问题 问题一:用同等比例的图片在PC机上很清楚,但是手机上很模糊,原因是什么呢? 经研究发现是devicePixelRatio作怪,因为手机分辨率太小,如果按照分辨率来显示网页字会非常小,所以苹果就把iPhone 4的960640分辨率在网页里只显示了480320,这样devicePixel
阅读全文
摘要:<template> <div id="infiniteScroll" class="infinite-scroll"> <slot></slot> </div> </template> <script> /** * 用法: * 将该组件放在列表最下方,其直接父级元素为滚动的包含块 * window
阅读全文
摘要:<template> <div id="root"> <nav-con id="nav" ref="nav" :title="'他们送上了祝福'"></nav-con> <div class="container" :class="{'container-ipx': ipx,'container-i
阅读全文
摘要:兼容问题: 如果元素定位在加了-webkit-overflow-scrolling:touch的容器上方时,如果上下滚动容器内容,定位的元素会跟着容器内容一起往上或往下滚动 iScroll是什么 很多场景,如果使用body的滚动会很不方便,这时候,就会使用某个元素的局部滚动,恶心的事情就会发生了。
阅读全文
摘要:// referenced: https://github.com/bedlate/vue-data-loading <template> <div class="vue-data-loading"> <div class="loading-header" :style="{height: pull
阅读全文
摘要:<template> <div class="sec-alert"> <div :class="{ animated: isAnimating }"> <div class="line" v-text="tips[0]"></div> <div class="line" v-text="tips[1]"></div> </div> </div> </templat
阅读全文
摘要:Vue 组件通讯 ——常见使用场景可以分为三类: 父子通信: 父向子传递数据是通过 props,子向父是通过 events($emit);通过父链 / 子链也可以通信($parent / $children);ref 也可以访问组件实例;provide / inject API;$attrs/$li
阅读全文