浏览代码

tiny fixes

Falko Schindler 1 年之前
父节点
当前提交
5268edec21

+ 1 - 1
nicegui/elements/scroll_area.py

@@ -1,4 +1,4 @@
-from typing import Any, Callable, Dict, Optional
+from typing import Any, Callable, Optional
 
 from typing_extensions import Literal
 

+ 1 - 1
website/more_documentation/generic_events_documentation.py

@@ -98,7 +98,7 @@ def more() -> None:
     ''')
     async def custom_events() -> None:
         tabwatch = ui.checkbox('Watch browser tab re-entering') \
-            .on('tabvisible', lambda: ui.notify('welcome back') if tabwatch.value else None)
+            .on('tabvisible', lambda: ui.notify('Welcome back!') if tabwatch.value else None, args=[])
         ui.add_head_html(f'''
             <script>
             document.addEventListener('visibilitychange', () => {{

+ 1 - 1
website/more_documentation/line_plot_documentation.py

@@ -27,4 +27,4 @@ def main_demo() -> None:
         line_checkbox.value = e.args
         if line_checkbox.value:
             ui.timer(10.0, turn_off, once=True)
-    line_checkbox.on('update:model-value', handle_change)
+    line_checkbox.on('update:model-value', handle_change, args=[None])

+ 1 - 1
website/more_documentation/page_documentation.py

@@ -30,7 +30,7 @@ def more() -> None:
         def page(word: str, count: int):
             ui.label(word * count)
 
-        ui.link('Say hi to Santa!', 'repeat/Ho! /3')
+        ui.link('Say hi to Santa!', '/repeat/Ho! /3')
 
     @text_demo('Wait for Client Connection', '''
         To wait for a client connection, you can add a `client` argument to the decorated page function

+ 2 - 2
website/more_documentation/select_documentation.py

@@ -31,7 +31,7 @@ def more() -> None:
     ''')
     def multi_select():
         names = ['Alice', 'Bob', 'Carol']
-        ui.select(names, multiple=True, value=names[:2],  label='comma-separated') \
+        ui.select(names, multiple=True, value=names[:2], label='comma-separated') \
             .classes('w-64')
         ui.select(names, multiple=True, value=names[:2], label='with chips') \
-            .props('use-chips').classes('w-64')
+            .classes('w-64').props('use-chips')