Open hhstore opened 1 year ago
ui.link('Back to main page', '/documentation#page')
from nicegui import ui
ui.button('Default', on_click=lambda: ui.colors())
ui.button('Gray', on_click=lambda: ui.colors(primary='#555'))
ui.run()
from nicegui import ui
dark = ui.dark_mode()
ui.label('Switch mode:')
ui.button('Dark', on_click=dark.enable)
ui.button('Light', on_click=dark.disable)
ui.run()
grid:
ag grid:
@ui.refreshable
import random
from nicegui import ui
numbers = []
@ui.refreshable
def number_ui() -> None:
ui.label(', '.join(str(n) for n in sorted(numbers)))
def add_number() -> None:
numbers.append(random.randint(0, 100))
number_ui.refresh()
number_ui()
ui.button('Add random number', on_click=add_number)
ui.run()
on
事件监听(vue), 可以给各种组件, 注册事件.
docker run -p 80:8080 -v $(pwd)/:/app/ \
-d --restart always zauberzeug/nicegui:latest
1
related: