使用高版本"node-sass": "^6.0.1", "sass-loader": "^10.0.1"使用低版本"node-sass": "^4.14.1", "sass-loader": "^8.0.2"目前的解决办法只要sass和sass-loader"sass": "^1.26.5", "sass-loader": "^8.0.2"命令行如下:npm install sass@1.26.5 sass-loader@8.0.2 -Doryarn add sass@1.26.5 sass-loader@8.0.2 -D
// 第四版 function throttle(func, wait, options) { var timeout, context, args, result; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : new Date().getTime(); timeout = null; func.apply(context, args); if (!timeout) context = args = null; }; var throttled = function() { var now = new Date().getTime(); if (!previous && options.leading === false) previous =
function debounce(func, wait, immediate) { var timeout, result; var debounced = function () { var context = this; var args = arguments; if (timeout) clearTimeout(timeout); if (immediate) { // 如果已经执行过,不再执行 var callNow = !timeout; timeout = setTimeout(function(){ timeout = null; }, wait) if (callNow) result = func.apply(context, args) } else { timeout = setTimeout(function(){ result = func.apply(cont
实现代码:<!-- 滑动条 --> <view class="m-p-40 m-bg-white" style="position: relative;overflow: hidden;"> <!-- 总 --> <view class="slider-box" style="background: #F5F5F5;width: 670rpx;height: 40rpx;"> <!-- 遮盖 --> <view class="m-bg-white" style="position: absolute;z-index: 11;width: 700rpx;height: 40rpx;transform: rotate(178deg);overflow: hidden;top: 12rpx;left: 35rpx;">
computed: { loadSrc(){ let that = this; const { width, height, thumb, imageSrc} = that; // 基础路径 let loadSrc = imageSrc + (imageSrc.indexOf('?') !== -1 ? '|' : '?') // 缩略图处理 if(thumb == true || typeof thumb == 'object'){ // 设定有宽高的 if( typeof thumb == 'object'){ const [width, height] = thumb; loadSrc += 'imageView2/3/w/' + parseInt(width) + '/h/'
lettered
生,亦我所欲也;义,亦我所欲也。