摘要: // 声明类型 export interface Iform{ Input: { text: string; }, Select: { options: any[]; }, Radio: { checkd: boolean; }, Switch: { checked: boolean; }, } / 阅读全文
posted @ 2023-12-11 17:35 程序員劝退师 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 利用Object.defineProperty进行数据劫持 代码如下 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, i 阅读全文
posted @ 2022-10-18 14:21 程序員劝退师 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1 阅读全文
posted @ 2022-07-13 09:42 程序員劝退师 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1、箭头 width: 25px; height: 25px; border-bottom: 8px solid #888; border-right: 8px solid #888; border-radius: 8px; transform: rotate( 45deg); 阅读全文
posted @ 2022-06-16 14:50 程序員劝退师 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 1、slice 用法 slice(start,end),返回值是一个新的数组 start 提取起始处的索引(从 0 开始),从该索引开始提取原数组元素。如果该参数为负数,则表示从原数组中的倒数第几个元素开始提取,slice(-2) 表示提取原数组中的倒数第二个元素到最后一个元素(包含最后一个元素)。 阅读全文
posted @ 2022-05-18 12:01 程序員劝退师 阅读(247) 评论(0) 推荐(0) 编辑
摘要: margin标记可以带一个、二个、三个、四个参数,各有不同的含义。 margin: 20px;(上、下、左、右各20px。) margin: 20px 40px;(上、下20px;左、右40px。) margin: 20px 40px 60px;(上20px;左、右40px;下60px。) marg 阅读全文
posted @ 2022-05-16 19:35 程序員劝退师 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1、问题由来,vue项目需要迁移history路由模式,但是涉及到多入口时,vue-router的总会把入口指向/下,导致其他入口无法访问,代码如下 // index入口 const router = new VueRouter({ base: '/', routes, mode: 'history 阅读全文
posted @ 2022-05-10 11:28 程序員劝退师 阅读(1342) 评论(0) 推荐(0) 编辑
摘要: 一、npm使用nrm管理 registry 1、全局安装nrm: npm install -g nrm 2、查看nrm版本: nrm --version 3、查看可选择的npm源 nrm ls 4、切换使用的源: nrm use npm 5、添加一个源,reigstry为源名,url为源的路径 nr 阅读全文
posted @ 2022-03-30 13:51 程序員劝退师 阅读(404) 评论(0) 推荐(1) 编辑
摘要: Vue中遇到Identifier 'aa_bb' is not in camel case 有时候写vue会遇到如下错误, error Identifier 'aa_bb' is not in camel case 这是因为ESLint代码规范检测的要求,必须要求用骆驼式变量名,当我们写成下划线形式 阅读全文
posted @ 2022-03-29 10:54 程序員劝退师 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 1、发送普通的get请求,缺点是请求频繁可能会阻塞正常接口 const get = request({method:'get',eventId:'report-sdk-eventId'}); 2、通过new Image(),通过给src赋值,缺点是实时上报,不能延迟上报 const image = 阅读全文
posted @ 2022-03-19 12:57 程序員劝退师 阅读(393) 评论(0) 推荐(0) 编辑