v0.19
This commit is contained in:
19
testDocumentGeneratorV0.01/test.py
Normal file
19
testDocumentGeneratorV0.01/test.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from nicegui import ui
|
||||
|
||||
class DataModel:
|
||||
content1 = ''
|
||||
content2 = ''
|
||||
count = 0
|
||||
|
||||
@property
|
||||
def result(self):
|
||||
print('运行了该函数', self.count)
|
||||
return self.content1 + self.content2
|
||||
|
||||
dm = DataModel()
|
||||
|
||||
label = ui.label('').bind_text_from(dm, 'result')
|
||||
input = ui.input('演示').bind_value_to(dm, 'content1')
|
||||
input = ui.input('演示').bind_value_to(dm, 'content2')
|
||||
|
||||
ui.run()
|
||||
Reference in New Issue
Block a user