You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
4.4 KiB
111 lines
4.4 KiB
<?php |
|
|
|
|
|
|
|
return [ |
|
|
|
// layui文件夹位置,加载辅助页面 |
|
'layui_dir' => strtr(strtr(dirname($_SERVER['SCRIPT_NAME']) . '/admin_static/layui/', ['\\' => '']), ['//' => '/']), |
|
// 获取表详情的地址,默认当前页面 |
|
'get_table_info_url' => '', |
|
// 提交数据地址,默认当前页面 |
|
'submit_url' => '', |
|
|
|
//========================================================================== |
|
// 数据库相关配置,用于获取表信息 |
|
//========================================================================== |
|
// 数据库连接类 |
|
'database_connect' => \think\facade\Db::class, |
|
// 数据库名称 |
|
'database_name' => \think\facade\Config::get("database.connections.mysql.database"), |
|
// 数据库表前缀 |
|
'database_prefix' => \think\facade\Config::get("database.connections.mysql.prefix"), |
|
|
|
//========================================================================== |
|
// 生成文件配置 |
|
//========================================================================== |
|
|
|
// 列表数据路径 |
|
'list_url' => "{:url('index')}", |
|
// 搜索Label |
|
'search_label' => true, |
|
// 软删除 |
|
'soft_deletion' => [ |
|
'field' => "delete_time", |
|
'default' => 0 |
|
], |
|
|
|
// 表主键。请统一格式 |
|
'primary_key' => "id", // {table} 会自动替换为表名 如: {table}_id |
|
|
|
// html表单模块加载 |
|
'form_module' => [ |
|
'text' => [\sdModule\makeAdminBasics\htmlUnit\FormText::class, '文本框'], |
|
'password' => [\sdModule\makeAdminBasics\htmlUnit\FormPassword::class, '密码框'], |
|
'select' => [\sdModule\makeAdminBasics\htmlUnit\FormSelect::class, '下拉选择'], |
|
'radio' => [\sdModule\makeAdminBasics\htmlUnit\FormRadio::class, '单选'], |
|
'checkbox' => [\sdModule\makeAdminBasics\htmlUnit\FormCheckbox::class, '多选'], |
|
'image' => [\sdModule\makeAdminBasics\htmlUnit\FormImage::class, '单图'], |
|
'images' => [\sdModule\makeAdminBasics\htmlUnit\FormImages::class, '多图'], |
|
'editor' => [\sdModule\makeAdminBasics\htmlUnit\FormEditor::class, '富文本'], |
|
'textarea' => [\sdModule\makeAdminBasics\htmlUnit\FormTextarea::class, '文本域'], |
|
'time' => [\sdModule\makeAdminBasics\htmlUnit\FormTime::class, '时间选择'], |
|
'month' => [\sdModule\makeAdminBasics\htmlUnit\FormMonth::class, '月份选择'], |
|
'date' => [\sdModule\makeAdminBasics\htmlUnit\FormDate::class, '日期选择'], |
|
'range' => [\sdModule\makeAdminBasics\htmlUnit\FormRange::class, '日期范围选择'], |
|
], |
|
|
|
// 注册创建类 |
|
'make_class' => [ |
|
\sdModule\makeAdminBasics\makeItem\Controller::class => [ |
|
'tag' => 1, |
|
'title' => 'Controller', |
|
], |
|
\sdModule\makeAdminBasics\makeItem\Model::class => [ |
|
'tag' => 2, |
|
'title' => 'Model', |
|
], |
|
\sdModule\makeAdminBasics\makeItem\Validate::class => [ |
|
'tag' => 4, |
|
'title' => 'Validate', |
|
], |
|
\sdModule\makeAdminBasics\makeItem\View::class => [ |
|
'tag' => 8, |
|
'title' => 'View', |
|
], |
|
], |
|
|
|
// 文件路径 |
|
'file_url' => [ |
|
// 创建 html 页面路径 |
|
'html' => \think\facade\App::getRootPath() . '/view/admin/', |
|
// controller 文件路径 |
|
'controller' => \think\facade\App::getRootPath() . '/app/admin/controller/', |
|
// model 文件路径 |
|
'model' => \think\facade\App::getRootPath() . '/app/admin/model/', |
|
// common/model 文件路径 |
|
'common_model' => \think\facade\App::getRootPath() . '/app/common/model/', |
|
// validate 文件路径 |
|
'validate' => \think\facade\App::getRootPath() . '/app/common/validate/', |
|
// 'controller' => __DIR__ . '/cache/', |
|
// 'common_model' => __DIR__ . '/cache/com/', |
|
// 'html' => __DIR__ . '/cache/', |
|
// 'validate' => __DIR__ . '/cache/validate/', |
|
// 'model' => __DIR__ . '/cache/model/', |
|
], |
|
|
|
// 类的命名空间 |
|
'namespace' => [ |
|
// controller 命名空间 |
|
'controller' => 'app\\admin\\controller', |
|
// model 命名空间 |
|
'model' => 'app\\admin\\model', |
|
// common/model 命名空间 |
|
'common_model' => 'app\\common\\model', |
|
// validate 命名空间 |
|
'validate' => 'app\\common\\validate', |
|
], |
|
|
|
]; |
|
|
|
|
|
|