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

关于对 edit控件 监听 changing事件 #9

Open
Veng0923 opened this issue Nov 23, 2020 · 4 comments
Open

关于对 edit控件 监听 changing事件 #9

Veng0923 opened this issue Nov 23, 2020 · 4 comments

Comments

@Veng0923
Copy link

如何优雅地使用
edit changing事件的回调,目前只知道有value_changed, 属性跟value_changed_by_ui, 但是没有对changing的属性暴露

@xianjimli
Copy link
Member

好的,谢谢。我们看能不能加上changing事件。

@xianjimli
Copy link
Member

数据绑定时设置Trigger=Changing,能满足你的需求不?

@Veng0923
Copy link
Author

不能,目前希望的是,不仅是当前属性的变化,变化的同时还需要去做其他事情.所以需要一个监听changing的回调

@xianjimli
Copy link
Member

可以提供一个set函数:https://github.com/zlgopen/awtk-mvvm/blob/master/docs/9.model.md

/**
 * @method temperature_set_value
 * 设置温度。
 *
 * @param {temperature_t*} temperature temperature 对象。
 * @param {double} value 温度。
 *
 * @return {ret_t} 返回 RET_OK 表示成功,否则表示失败。
 */
ret_t temperature_set_value(temperature_t* temperature, double value);

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