소스 검색

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')