fix:更新项目说明文档
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from nicegui import ui, app, run
|
||||
from nicegui import ui, app, run, native
|
||||
from loguru import logger
|
||||
|
||||
# 导入我们的模块
|
||||
@@ -9,12 +9,15 @@ from config.config import load_config
|
||||
from ui.core.logger import setup_logger
|
||||
from utils.font_utils import install_fonts_from_directory
|
||||
from ui.views.home_page import create_page
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
sys.stderr.reconfigure(encoding='utf-8')
|
||||
# 1. 初始化配置
|
||||
config = load_config("config.toml")
|
||||
setup_logger()
|
||||
|
||||
|
||||
|
||||
|
||||
# === 关键修改:定义一个获取路径的通用函数 ===
|
||||
def get_path(relative_path):
|
||||
"""
|
||||
@@ -60,5 +63,6 @@ if __name__ in {"__main__", "__mp_main__"}:
|
||||
title="尚城幼儿园成长报告助手",
|
||||
native=True,
|
||||
window_size=(900, 900),
|
||||
port=native.find_open_port(), # 自动寻找端口
|
||||
reload=False
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user