随笔 - 193
文章 - 0
评论 - 8
阅读 -
32万
06 2022 档案
-webkit-box-orient: vertical 打包后不生效
摘要:多行超出隐藏使用-webkit-box-orient: vertical; 本地开发环境正常,项目打包后-webkit-box-orient: vertical丢失,原因是optimize-css-assets-webpack-plugin包的问题 //在scss中 /*! autoprefixer
阅读全文
清除string中的所有标签,返回纯文字
摘要:delHtmlTag (str) { return str.replace(/<[^>]+>/g, '')},toSubTit(tit){ let newTit = this.delHtmlTag(tit) return newTit.substring(0,20)+'...'},
阅读全文
css 滚动穿透 记录滚动的位置
摘要:// 滚动穿透 true为背景滚动禁用StopBodyScroll (isFixed) { try { const bodyEl = document.body; if (isFixed) { this.top = window.scrollY bodyEl.style.position = 'fi
阅读全文
Node 复制文件夹
摘要:let fs = require('fs');let path = require("path");//工具模块,处理文件路径的小工具/** 主要版本 */let major = process.version.match(/v([0-9]*).([0-9]*)/)[1]/** 特性版本 */let
阅读全文
拼接对象为含有?&的string
摘要:class Url{ /** * * @param path * @param filter * @returns {string} */ static getPath(path, filter){ path = path + '?' for(let k in filter){ if(filter[
阅读全文