[Bug Report]canEditTable.vue中v-model如果绑定的值是对象的值,而非对象本身,则v-model无法watch到,从而无法实现双向绑定
- Dominant language
- Vue
- Stars
- 16.3k
- Forks
- 4.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Environment
mac10.12.6 vue2.5.13 iview 2.8.0
### Reproduction link
[http://sorry.ihaveno.com](http://sorry.ihaveno.com)
### Steps to reproduce
views/tables/components/canEditTables.vue结尾watch的代码
watch: {
value (data) {
this.init();
}
}
当引用
此处可以监听
当引用
此处将无法监听改变,暂时用下面代码实现v-model刷新
let _ = my.table
my.table = [];
setTimeOut(()=>{
my.table = _
},1)
备注:canEditTables直接用table组件,以上问题不出现。
### What is expected?
监听失效
### What is actually happening?
监听有效
---
感谢作者,框架开发效率有很大帮助,希望官方提供打赏的二维码,聊表心意:)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with views/tables/components/canEditTables.vue and inspect the value watcher near the end of the component. Reproduce the difference between v-model="table" and v-model="my.table" using the linked example or a local Vue 2.5.13 setup. Done means nested object-property bindings update the component as expected, with coverage or a verified reproduction for both binding forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100