New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Web UI: NiceGUI #401
Comments
Python Web UI 方案: NiceGUI官方资源:依赖项目:
FastAPI
Vue.js 3.x:Vue UI 框架: QuasarCSS 样式: Tailwind |
NiceGUI 踩坑系列:页面路由:页面跳转方式:ui.open()ui.link()ui.link('Back to main page', '/documentation#page') i18n 多语言:
页面移动元素:
|
NiceGUI 常用组件:配色: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() Row:Column:Grid / AG Grid:
Chart: |
🔥️ NiceGUI 高级功能:Run JavaScript
Parameter injection
UI Updates
Refreshable UI functions
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() Bindings
Keyboard
Query Selector |
NiceGUI 魔法部分:
Auto-context
Generic Events
|
NiceGUI 部署:打包成 app:Server + Docker:docker run -p 80:8080 -v $(pwd)/:/app/ \
-d --restart always zauberzeug/nicegui:latest |
FastAPI 相关: |
Vue + Quasar 相关:Tailwind CSS 相关: |
1 |
This was referenced Jun 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
related:
The text was updated successfully, but these errors were encountered: