随笔分类 - 前端
摘要:console.log(JSON.stringify(new Error('错误信息'), ['name', 'message', 'stack']))
阅读全文
摘要:var Crypto = {}; Crypto.sha1_hmac = function (msg, key) { "use strict"; var oKeyPad, iKeyPad, iPadRes, bytes, i, len; if (key.length > 64) { // keys l
阅读全文
摘要:邮箱:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,
阅读全文
摘要:URLSearchParams 接口定义了一些实用的方法来处理 URL 的查询字符串。 获取 URL 参数 const url = 'http://xxx.com?id=123&name=hello&age=18'; const search = window.location.search; //
阅读全文
摘要:例: 主项目地址为: http://xxx.com, 想配置 xxx.com/newproject 为另一个项目 1. 修改 vue.config.js 中的publicPath (publicPath: '/newproject') // 新项目的静态资源打包路径, 如访问 xxx.com/new
阅读全文
摘要:overflow : hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
阅读全文
摘要:<template> <div :style="styleText" class="div1"> <button @click="handleClick">修改颜色</button></div> </template> <script> export default { data () { retu
阅读全文
摘要:封装 IndexedDB 初始化数据库 dbInit () { return new Promise((resolve, reject) => { const connection = window.indexedDB.open('dbname', 2) connection.onsuccess =
阅读全文
摘要:Red = 255 × ( 1 - Cyan / 100 ) × ( 1 - Black / 100 ) Green = 255 × ( 1 - Magenta / 100 ) × ( 1 - Black / 100 ) Blue = 255 × ( 1 - Yellow / 100 ) × ( 1
阅读全文
摘要:1 function strToRGB (str = '', opacity = 1) { 2 const resultOpacity = isNaN(Number(opacity)) ? 1 : (opacity > 1 ? 1 : Number(opacity)) 3 const arr = A
阅读全文
摘要:版本1: function process(arr, ...rest) { const cache = []; let t; function check(item) { let trueList = []; let args; for(args of rest) { trueList.push(i
阅读全文
摘要:创建注册表文件: openFiddler.reg 存放在E:\test\openFiddler.reg Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\protocolName]@="protocolName Protocol""URL
阅读全文
摘要:Blob 格式 Excel 文件下载
阅读全文
摘要:Vue 指定 DIV 导出 PDF
阅读全文
摘要:vue 项目使用 tracking.js 进行人脸侦测
阅读全文