We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
现在的控件生成方式是生成式,若要接受用户变量,需要这样编写:
value = None def callback(data): nonlocal value value=data def submit(): nonlocal value print(value) a.input(callback) a.b('确认', submit)
这样不会太麻烦了一点吗?
通过引入响应式控件,同样的操作可以用这样的代码实现:
el = a.input() def submit(): nonlocal el print(el['data']) a.b('确认', submit)
更进一步,如果我们需要在生成input控件3秒后更改用户看到的input界面的内容,还可以这样:
input
el = a.input() time.sleep(3) el.set({'text': 'new value'})
如何呢?
The text was updated successfully, but these errors were encountered:
计划暂停并合并至 #20
Sorry, something went wrong.
miswanting
No branches or pull requests
现在的控件生成方式是生成式,若要接受用户变量,需要这样编写:
这样不会太麻烦了一点吗?
通过引入响应式控件,同样的操作可以用这样的代码实现:
更进一步,如果我们需要在生成
input
控件3秒后更改用户看到的input界面的内容,还可以这样:如何呢?
The text was updated successfully, but these errors were encountered: