开发Vue组件报错

为什么80%的码农都做不了架构师?>>>   hot3.png

[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: "result" (found in component )

props: {// 查询字段keyword: {type: String,default: ''},
data () {return {innerKeyword: this.keyword}
},
watch: {innerKeyword (val) {this.$emit('update:keyword', val)}
},

转载于:https://my.oschina.net/dawd/blog/1504294

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-BlogPHP 1.7.3

Copyright www.122dh.com Rights Reserved.