Преглед на файлове

improve the await button clicked demo in docs

Rodja Trappe преди 2 години
родител
ревизия
aacf7d9dc2
променени са 1 файла, в които са добавени 7 реда и са изтрити 2 реда
  1. 7 2
      website/more_documentation/button_documentation.py

+ 7 - 2
website/more_documentation/button_documentation.py

@@ -14,5 +14,10 @@ def more() -> None:
     async def await_button_click() -> None:
         # @ui.page('/')
         # async def index():
-            await ui.button('What comes next?').clicked()
-            ui.label('Bam! This is the future!')
+            b = ui.button('Step')
+            await b.clicked()
+            ui.label('One')
+            await b.clicked()
+            ui.label('Two')
+            await b.clicked()
+            ui.label('Three')