An open API service indexing awesome lists of open source software.

https://github.com/jimouchen/chat-flet-gui


https://github.com/jimouchen/chat-flet-gui

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# chat-flet-GUI

- 一个简易的配置管理UI工具

## Demo

image

image

image

## Requirements

- `flet`

## Your Code

- demo,你的业务逻辑代码写成接口在这里调用即可;

```python
def handle_params(e):
filename = filename_show.value
index = index_input.value
is_restart = is_restart_input.value
talk_type = params[type_dropdown.value]
if not filename:
page.snack_bar = ft.SnackBar(ft.Text('文件名不能为空'))
page.snack_bar.open = True
page.update()
return
# 拿到有效值后去调相关逻辑即可
print(f'选择类型:{talk_type}')
print(filename)
print(index)
print(is_restart)
if is_restart == 'yes':
GUIHandler.restart_status(talk_type)
else:
GUIHandler.update_index(index, talk_type)
GUIHandler.update_filepath2cfg(filename, talk_type)
```