![](https://img-blog.csdnimg.cn/2019091813595558.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
踩雷合集
一些踩雷
狂暴草鱼卷
这个作者很懒,什么都没留下…
展开
-
父相子绝 巧用auto
在我脑海里 父相子绝的定位 top100% 跟 bottom0% 是一个位置。我不想要top100 ,但是不写top就会被下面覆盖。同时有 top 跟 bottom 定位不生效。父元素相对定位 子元素绝对定位 子相对父。这是 bottom0% 的效果 在里头。今天遇见一个css的坑 让我改了好久。一时间进退两难 写也不行 不写也不行。这是top100% 的效果 出去了。因为我想要的是相对下0%组件自带样式是下面那个。最后有大佬提醒才想起来。但 左右是 上下不是。原创 2022-09-14 15:44:35 · 155 阅读 · 0 评论 -
vue.runtime.esm.js?2b0e:619 [Vue warn]: Error in mounted hook: “TypeError: handler.call is not a fun
查看页面相关 生命周期钩子函数 是否有 声明了未定义方法 或是 只声名了钩子函数。从报错的handlers[i].call 入手查找原因。这个错误是 调用相关的生命周期钩子函数引起来的错误。提示报错了 但是页面可以正常显示 不影响功能。把钩子删除,或是把定义的方法写完全了就可以了。...原创 2022-08-13 11:12:35 · 2124 阅读 · 0 评论 -
处理一些 Vue warn 和 sonar 扫描报错
1. [Vue warn]: Invalid prop: type check failed for prop "router". Expected Boolean, got String with val2. Uncaught (in promise) cancel3. Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (93)原创 2021-08-05 19:48:43 · 3813 阅读 · 0 评论 -
如何清除 mac chrome 的 dnc缓存
How to Clear DNS Cache on Google ChromeURL:chrome://net-internals/#dns点击 Clear host cache 使用的是 macOS 版本 10.11 或更高版本终端命令 sudo killall -HUP mDNSResponder原创 2022-04-19 14:12:03 · 738 阅读 · 0 评论 -
vue的子组件在created/mounted里获取不到prop的值
props: { instance: { type: String, required: true } },instanceID的值明明传过来了 但是在created里却获取不到推荐写法 使用watch监听 instance: function(newVal, _oldVal) { this.instanceId = newVal; //在这里调用 created 里面的函数 }...原创 2022-04-11 15:26:45 · 5120 阅读 · 0 评论 -
Web 富文本编辑器 +Vue Dialog
wangEditor富文本使用起来还是很方便的npm 安装 npm i wangeditor --saveimport E from 'wangeditor'const editor = new E('#div1')editor.create()正常项目来说 一个富文本已经出来了 然后再配置其他就可以但是 ! ! ! 接手老项目 难免遇见几个旧雷 记录一下俺的冤种经历~你可能会遇见这样的报错Uncaught Error in Vue (Component: "unnamed"): moun原创 2022-03-14 21:21:59 · 1571 阅读 · 5 评论 -
this.$prompt必填+回车不关闭 换行
this.$prompt 怎么不触发回车关闭事件原创 2022-03-03 21:06:30 · 2962 阅读 · 0 评论 -
vue开发规范总结
Type of the default value for ‘data’ prop must be a function.vs一开始提示报错 Prop 'data' requires default value to be set.写入必填项props: { data: { type: Array, require: true, default: [] } },还是报错 Type of the default value for 'data'原创 2022-01-21 15:05:52 · 2765 阅读 · 0 评论 -
编辑的时候 表格数据跟着变动
最简单的深拷贝解决watch: { editformData: function (newVal) { this.formData = JSON.parse(JSON.stringify(newVal)); } },原创 2022-02-16 17:23:13 · 286 阅读 · 0 评论 -
vue2+ts 踩坑路 (这玩意组合我就不看好)
TS引入element 静态资源有问题 + message 多次重复点击原创 2022-01-26 16:40:57 · 1880 阅读 · 0 评论 -
Echarts各类图例的一些常见api用法以及踩坑
通过接口获取渲染Echarts的数据但是由于同异步的问题可能接口还没渲染出来 就已经给子组件传值了给父组件加一个判断 确认有值了 再给子组件传值 <lineChart v-if="flag" :lineoption="lineoption"></lineChart>在子组件上加一个监听 确认有值之后再调用我们的方法 props: { lineoption: { typeof: Object, default: () => {原创 2021-08-31 17:14:47 · 1897 阅读 · 0 评论 -
vue实现抽屉功能 点击其他地方不消失 动画实现
<div class="drawer"> <div class="setbox" :class="{show: isshow}"> <div class="header"> <p class="fl">标题</p> <button class="off" @click="close">关闭</button> </div> .原创 2021-08-17 16:07:14 · 863 阅读 · 0 评论