weexteam / article

This repos is a third party collection, and is not developed nor maintained by Apache Weex.
1.22k stars 141 forks source link

iOS 自定义扩展input component 怎么绑v-model? #225

Open shawn-tangsc opened 6 years ago

shawn-tangsc commented 6 years ago

我自己写了一个input标签的自定义component。

`

import "WXEditComponent.h"

@interface HMMagicInputComponent : WXEditComponent

@end ` 继承自WXEditComponent , 注册完后,只能通过

:value="registerForm.name" @input="onInput" 这两个属性来和我的字端绑定。

我想问一下,weex 的input 标签的v-model 是怎么绑定的,我找了半天源码都没有找到。

非常感谢!!!

shawn-tangsc commented 6 years ago

已经解决了,在引用后重新封装一个组件,通过call 子组件的input事件来就可以绑v-model了