摘要: WebStorm 中自定义文档注释模板 前提 使用WebStrom写HTML,JavaScript,进行头部注释。 减少重复劳动 养成良好的代码习惯,规范化代码,规范的注释便于后续维护。 头部注释内容 文档描述 版本 作者 创建日期 最后修改人 最后修改日期 编辑注释 一、 在菜单栏 >文档中 > 阅读全文
posted @ 2022-03-15 11:21 影的记忆 阅读(754) 评论(0) 推荐(0) 编辑
摘要: html 适配iphone X 底部导航 适配手机底部有横线的手机,以免被横线遮挡 padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */ padding-bottom: env(safe-area-inset-bo 阅读全文
posted @ 2022-03-15 10:59 影的记忆 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Vue 打包相关 vue-cli-service build# 用法:vue-cli-service build [options] [entry|pattern] 选项: --mode 指定环境模式 (默认值:production) --dest 指定输出目录 (默认值:dist) --moder 阅读全文
posted @ 2022-03-15 10:58 影的记忆 阅读(223) 评论(0) 推荐(0) 编辑
摘要: npm 发布自己组件包 发布到 npm 上 首先创建自己的npm账号 npm init npm install npm uninstall npm config edit // 编辑 npm config ls -l // 查看 .npmrc 配置文件 npm config get cache // 阅读全文
posted @ 2022-02-21 11:00 影的记忆 阅读(720) 评论(0) 推荐(0) 编辑
摘要: Mac 上切换 node 版本总结 背景 在做项目的时候,往往会遇到老项目没有升级的问题,node环境版本比较低,自己电脑安装或者新项目安装了最新版本的 node 环境,那么既要支持老版本的使用也要支持新版本那么怎么办呢? Mac 提供了切换node版本的办法 nvm n 首先介绍 nvm nvm 阅读全文
posted @ 2021-12-29 17:40 影的记忆 阅读(3291) 评论(0) 推荐(0) 编辑
摘要: hasOwnProperty 判断对象是否为空 在使用 hasOwnProperty 判断对象是否为空时遇到了一下问题,总结一下 // Do not access Object.prototype method 'hasOwnProperty' from target object option.h 阅读全文
posted @ 2021-12-28 09:29 影的记忆 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Javascript 中判断空对象 简介:在 JavaScript 判断字符串是否是一个空字符串 可以 !"" 返回 true 来判断, 要是判断 {} 是否是空对象,也用 !{} 来判断的 得到的结果是 false, !{name: ''} 的返回结果也是 false。那么这肯定是无法判断了。那么 阅读全文
posted @ 2021-12-15 17:36 影的记忆 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 在使用react 中报错原因总结 01 // Warning: Can't call setState on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your appli 阅读全文
posted @ 2021-12-10 10:24 影的记忆 阅读(391) 评论(0) 推荐(0) 编辑
摘要: vue的 $on,$emit,$off,$once Api 中的解释: $on(eventName:string|Array, callback) 监听事件 监听当前实例上的自定义事件。事件可以由 vm.$emit 触发。回调函数会接收所有传入事件触发函数的额外参数。 $once(eventName 阅读全文
posted @ 2021-12-02 20:21 影的记忆 阅读(3183) 评论(0) 推荐(0) 编辑
摘要: 数组常用方法总结 concat filter map some every reduce sort includes join some every 语法:array.every(function(currentValue, index, arr){}, thisValue); function i 阅读全文
posted @ 2021-12-02 16:29 影的记忆 阅读(34) 评论(0) 推荐(0) 编辑