前言
hello大家好,我是喜欢完基金的小秀哥,恭喜大家又遇到我,今天给大家带来我工作中经常遇到的一些莫名其妙报错以及工作小技巧
1、校验问题
- 点击编辑时候字段命名没有超过长度范围,但是就是提醒报错问题
1、去掉:rules 规则中的 trigger 属性
2、在校验规则里限定type,如果是验证数字格式的,就设为type: 'number’
2、VUE报错: Avoid mutating a prop directly since the value will be overwritten whenever the parent
VUE报错:[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "topActive"
- 这个时候其实是porp哪里出问题了,意思是父子传的值,然后你进行了修改,这个时候就会报错
1、不要修改
2、改成date里面的值,然后通过方法进行修改
3、Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘deep’)
4、下来依赖失败
试试加这个命令
- –force就是强制安装,比如你装过这个rpm的版本1,如果你想装这个rpm的版本2,就需要用–force强制安装。
npm i 模块名 --force
- –nodeps就是安装时不检查依赖关系,比如你这个rpm需要A,但是你没装A,这样你的包就装不上,用了–nodeps你就能装上了。
npm i 模块名 --nodeps
– 强制更新
npm install --legacy-peer-deps