Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

双向数据绑定是否能支持值的双向绑定? #23

Closed
xbestwiz opened this issue Aug 11, 2018 · 1 comment
Closed

双向数据绑定是否能支持值的双向绑定? #23

xbestwiz opened this issue Aug 11, 2018 · 1 comment

Comments

@xbestwiz
Copy link

xbestwiz commented Aug 11, 2018

new Vue({
data:{
formData:{}
},
mounted:function(){
...
//绑定表单数据到formData
$f.model(this.formData);
}
})

目前的双向绑定,formData的数据格式为{field: {rule: object, value: xxx}}
而实际使用过程中,form的定义和数据是分开的,实际的值并不是放在form定义里的value,所以,希望能支持value双向绑定,实现类似以下的效果:
new Vue({
data:{
formData:{
field1: value1,
field2: value2,
...
}
},
mounted:function(){
...
//绑定表单数据到formData,替换form里默认的value值
$f.model(this.formData);
}
})

@xaboy
Copy link
Owner

xaboy commented Sep 8, 2018

下个版本将会支持键值对的双向数据绑定

@xaboy xaboy closed this as completed Sep 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants