摘要: 参考链接 vue: mounted() { window["closeRightHelpPage"] = () => { this.drawer = false }; }, iframe中的html方法 <img onclick="closeRightHelpPage()" width="16px" 阅读全文
posted @ 2020-09-09 18:18 yx1102 阅读(2426) 评论(0) 推荐(0) 编辑
摘要: 参考链接 如果setTimeOut设置的值100不行,并且编辑器设置在dialog中,可以尝试v-if来试试能否解决v-if="scriptEditorVisible", 改变字体大小可以通过setTimeOut来重新延迟刷新codemirror <template> <div :style="wr 阅读全文
posted @ 2020-08-27 17:34 yx1102 阅读(1404) 评论(0) 推荐(0) 编辑
摘要: 学习于:https://www.bilibili.com/video/BV1vT4y137So?p=33 <script> let comment = [ { comment_id: 1, user_id: 43, comment_date: "04-23", comment_content: "蜡 阅读全文
posted @ 2020-08-27 13:35 yx1102 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 返回的是一维数组[],需要将一维数组转化为二位数组[[],[]] 方式一:slice不会改变原数组,splice会改变原数组 let arr = [1,2,3,4,5,6,7,8] let newArr = [arr.slice(0,4),arr.slice(4,8)] console.log(ne 阅读全文
posted @ 2020-07-18 16:13 yx1102 阅读(500) 评论(0) 推荐(0) 编辑
摘要: 参考文章 阅读全文
posted @ 2020-07-12 11:55 yx1102 阅读(696) 评论(0) 推荐(0) 编辑
摘要: 原生聚焦:autofocus="autofocus" <input type="text" id="username" name="username" autofocus="autofocus"/> vue聚焦:this.$refs.input.focus() <input type="text" 阅读全文
posted @ 2020-07-05 10:25 yx1102 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 效果图 功能 实现bar左右拖拽 左侧:js通过width控制 :style="{width: lwidth}" 右侧:盒子设置定位position,js通过的left来控制,同时样式需要设置 right: 0; bottom: 0; 才会出现width 中间:设置定位position,使用calc 阅读全文
posted @ 2020-06-24 19:00 yx1102 阅读(2860) 评论(0) 推荐(2) 编辑
摘要: 移动端click事件有300ms延时,原因是移动端屏幕双击会缩放页面 解决办法: 在项目中添加下面的代码即可 <!-- 移动端延迟0.3s --> <script src="https://as.alipayobjects.com/g/component/fastclick/1.0.6/fastcl 阅读全文
posted @ 2020-06-24 13:40 yx1102 阅读(187) 评论(0) 推荐(0) 编辑
摘要: pageX、clientX、screenX的区别 offset offsetTop/offsetLeft 返回距离上级盒子(最近的带有定位)左边的位置,如果没有父亲或者父亲没有定位则以 body 为准 图一:父盒子没有开启定位 图二:父盒子开启定位 offsetWidth/offsetHeight 阅读全文
posted @ 2020-06-21 15:41 yx1102 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 参考文章: 移动端调试工具chrome devtools打开空白解决办法 “adb”不是内部或外部命令 adb下载安装及使用 特别注意:如果安装到其他盘,配置完环境变量之后进入adb的文件夹,再通过cmd打开命令窗口,运行adb version看是否安装成功 阅读全文
posted @ 2020-06-21 00:48 yx1102 阅读(320) 评论(0) 推荐(0) 编辑