02 2021 档案

摘要:js.map 文件的意义 source map 文件 source map 文件是 js 文件压缩后,文件的变量名替换对应、变量所在位置等元信息数据文件,一般这种文件和 min.js 主文件放在同一个目录下。 比如压缩后原变量是 map,压缩后通过变量替换规则可能会被替换成 a,这时 source 阅读全文
posted @ 2021-02-10 14:46 [ABing] 阅读(1589) 评论(0) 推荐(1)
摘要:uniapp 模块权限说明 // 允许拍照 "<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>" 阅读全文
posted @ 2021-02-10 14:43 [ABing] 阅读(415) 评论(0) 推荐(0)
摘要:快速生成数组的方法 总结 // 实现方法一:循环赋值 var arr1 = new Array(100); for(var i=0;i<arr1.length;i++){ arr1[i] = i; } console.log(arr1); // 实现方法二:push方法实现 var arr2 = n 阅读全文
posted @ 2021-02-10 14:39 [ABing] 阅读(315) 评论(0) 推荐(0)
摘要:使用 rem.js 快速进行移动端适配 首先在 html 页面中引入 meta 标签 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> 在 阅读全文
posted @ 2021-02-10 14:35 [ABing] 阅读(147) 评论(0) 推荐(0)
摘要:数组分组 最终期望实现 编写一个 chunk 函数,将数组拆分成多个 size 长度的块,并组成一个新数组。 如果数组无法被分割成全部等长的块,那么最后剩余的元素将组成一个块。 参数 array (Array) 需要被处理的数组 [size=0] (number) 每个块的长度 返回值(Array) 阅读全文
posted @ 2021-02-10 14:30 [ABing] 阅读(337) 评论(0) 推荐(0)
摘要:vscode 注释插件 korofileheader 配置 // 此为头部注释 "fileheader.customMade": { "Description": "", "Version": "2.0", "Autor": "ABing", "Date": "Do not edit", "Last 阅读全文
posted @ 2021-02-10 14:23 [ABing] 阅读(401) 评论(0) 推荐(0)
摘要:Vue 轻量级富文本编辑器 Vue-Quill-Editor 下载 Vue-Quill-Editor npm install vue-quill-editor -S 下载 quill(Vue-Quill-Editor 需要依赖) npm install quill -S 组件中使用 <templat 阅读全文
posted @ 2021-02-10 14:16 [ABing] 阅读(197) 评论(0) 推荐(0)
摘要:时分秒与秒数的转换 时间戳 格式化为 时分秒(00:00:00) /** * 时间秒数格式化 * @param s 时间戳(单位:秒) * @returns {*} 格式化后的时分秒 */ let sec_to_time = function (s) { let t if (s > -1) { le 阅读全文
posted @ 2021-02-10 14:06 [ABing] 阅读(216) 评论(0) 推荐(0)
摘要:关于在 sass 中使用 calc 不能包含变量的问题 在 sass 中使用 calc,如果 calc 中包含一个变量,不会产生效果 $sideBarWidth = 200px; .navbar { width: calc(100% - $sideBarWidth); } 如何解决呢? 要想在 ca 阅读全文
posted @ 2021-02-10 14:01 [ABing] 阅读(257) 评论(0) 推荐(0)
摘要:谷歌浏览器设置黑暗模式(不依赖插件) 电脑打开谷歌 Chrome 浏览器,然后在地址栏中输入“chrome://flags”,回车。 此时就会进入一个英文的页面,该页面中有很多关于 Chrome 浏览器的实验性功能,其中就有开启黑暗模式。 在该页面中找到“Force Dark Mode for We 阅读全文
posted @ 2021-02-10 13:55 [ABing] 阅读(142) 评论(0) 推荐(0)
摘要:Vue 中 import from 的来源:省略后缀与加载文件夹 Vue 使用 import ... from ...来导入组件,库,变量等。而 from 后的来源可以是 js,vue,json。这个是在 webpack.base.conf.js 中设置的: module.exports = { r 阅读全文
posted @ 2021-02-10 13:50 [ABing] 阅读(215) 评论(0) 推荐(0)
摘要:CSS 文本省略 在开发过程中,我们经常会用到这种超出三行显示...的要求,使用 css 属性是可以的,但是需要考虑兼容性问题 实现单行文本的溢出显示省略号,我们应该都知道用 text-overflow:ellipsis 属性,同时注意加 width 来兼容部分浏览器 .textOVerFlow { 阅读全文
posted @ 2021-02-10 13:41 [ABing] 阅读(239) 评论(0) 推荐(0)
摘要:Git commit emoji emojiemoji代码commit说明 🎨 (调色板) :art: 改进代码结构/代码格式 ⚡️ (闪电) :zap: 提升性能 🐎 (赛马) :racehorse: 提升性能 🔥 (火焰) :fire: 移除代码或文件 🐛 (bug) :bug: 修复 阅读全文
posted @ 2021-02-10 13:36 [ABing] 阅读(84) 评论(0) 推荐(0)
摘要:gitbash 安装 tree linux 上通过 tree 命令行工具生成树状结构,其实在 windows 平台上的 git 中也可以安装 tree ├── README.md ├── babel.config.js ├── package.json ├── public │ ├── favico 阅读全文
posted @ 2021-02-10 13:29 [ABing] 阅读(356) 评论(0) 推荐(0)
摘要:element-ui cascader 级联选择器获取数据(数据回显)方法 <el-cascader ref="cascaderAddr"></el-cascader> 取值 const checkedNodes = this.$refs['cascaderUnit'].getCheckedNode 阅读全文
posted @ 2021-02-10 13:17 [ABing] 阅读(1069) 评论(0) 推荐(0)
摘要:JavaScript 中 return、return false、return true 三者的区别 返回控制与函数结果 语法:return 表达式 语句结束函数执行,返回调用函数,而且把表达式的值作为函数结果; 返回控制 无函数结果 语法:return 在大多数情况下,为事件处理函数返回 fals 阅读全文
posted @ 2021-02-09 18:23 [ABing] 阅读(151) 评论(0) 推荐(0)
摘要:Vue + Element UI 视频上传及上传进度展示 <div class="album albumvideo"> <div> <p class="type_title"> <span>视频介绍</span> </p> <div class="pic_img"> <div class="pic_ 阅读全文
posted @ 2021-02-09 18:17 [ABing] 阅读(862) 评论(0) 推荐(0)
摘要:vue-amap 定位实现 官方文档:vue-amap 需求:当进入地图页面,定位到当前位置,显示点坐标,搜索框显示当前坐标的具体位置。点击地图,搜索框显示点击坐标的具体位置,搜索后地图中心点为搜索后的位置。 注册并登录高德控制台 创建应用申请 key,切记一定要选择 web 端(JS API) 项 阅读全文
posted @ 2021-02-09 17:54 [ABing] 阅读(874) 评论(0) 推荐(0)
摘要:Vue Cli 解决跨域问题 devServer.proxy 如果你的前端应用和后端 API 服务器没有运行在同一个主机上,你需要在开发环境下将 API 请求代理到 API 服务器。这个问题可以通过 vue.config.js 中的 devServer.proxy 选项来配置。 devServer. 阅读全文
posted @ 2021-02-09 17:31 [ABing] 阅读(190) 评论(0) 推荐(0)
摘要:Vue 路由跳转方式 router-link 不带参 <router-link :to="{name:'home'}"> <router-link :to="{path:'/home'}"> //name,path都可使用, 建议用name // 注意:router-link中链接如果是'/'开始就 阅读全文
posted @ 2021-02-09 17:09 [ABing] 阅读(67) 评论(0) 推荐(0)