您的位置:首页 > 产品设计 > UI/UE

开发Vue组件报错

2017-08-08 00:00 399 查看
[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 )

<el-input placeholder="搜索注释信息" v-model="innerKeyword">

props: {
// 查询字段
keyword: {
type: String,
default: ''
},

data () {
return {
innerKeyword: this.keyword
}
},
watch: {
innerKeyword (val) {
this.$emit('update:keyword', val)
}
},
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: