阅读时间:1 分钟
0 字
配置参考
本页汇总最常用配置项(以当前项目代码为准)。
use.toml(运行配置)
toml
[app]
name = "我的 DuxLite 应用"
debug = true
timezone = "Asia/Shanghai"
secret = "your-app-secret-key"
domain = "http://localhost:8000"
[vite]
dev = false
port = 5173常见 UI 配置(由后台输出到前端基座):
toml
[theme]
logo = "/static/logo.png"
darkLogo = "/static/logo-dark.png"
appLogo = "/static/app-logo.png"
appDarkLogo = "/static/app-logo-dark.png"
banner = "/static/banner.png"
darkBanner = "/static/banner-dark.png"
layout = "app"说明:
theme.*会在后台入口中输出给前端基座(参见app/System/Web/Manage.php)。- 实际展示优先级以系统配置里的
system.*为主(如logo_light/logo_dark)。 - 所有可通过浏览器直接访问的资源路径,都应放在
public/目录下。
可选配置(按需使用):
toml
[cache]
type = "file" # file / redis
prefix = "dux_"
[lock]
type = "semaphore"database.toml(数据库)
toml
[db.drivers.default]
driver = "mysql"
host = "localhost"
database = "dux_admin"
username = "root"
password = "root"
port = 3306
prefix = "app_"app.toml(模块注册)
toml
registers = [ "App\\System\\App", "App\\Data\\App" ]