Navigation Menu

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

增加input[r-model] lazy throttle支持 #109

Closed
leeluolee opened this issue Aug 25, 2016 · 0 comments
Closed

增加input[r-model] lazy throttle支持 #109

leeluolee opened this issue Aug 25, 2016 · 0 comments

Comments

@leeluolee
Copy link
Member

由于 #100 的实现,得以获得 input lazy 和 throttle 的支持

  1. lazy : 延迟到change修改模型
    例如<input r-model='name' lazy > 原来绑定的input事件 将会 退化到change事件(即 blur之后才会触发).
  2. throttle={throttle} : 限制[throttle]毫秒内只能触发一次模型修改
    • 比如 <input r-model='name' throttle=100 > (引号与否html都是支持的): 100 ms最多一次,即字符串会被转换为数字
    • 比如 <input r-model='name' throttle > (引号与否html都是支持的): 默认400ms
    • <input r-model='name' throttle={500} > : 传入数字500,当然代表的是500ms
    • <input r-model='name' throttle={throttle} >: throttle代表的毫秒数字,但是要注意,这个版本并没有做参数的watch监控,throttle的后续变化,将不被接受
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants