优化表单控件

This commit is contained in:
2020-04-07 18:35:59 +08:00
parent 8c440e75e8
commit 0bb97cd9a9
140 changed files with 12921 additions and 3683 deletions

View File

@@ -165,13 +165,14 @@ class Attribute extends \think\Model {
}
public static function getfieldList(){
$config = \think\facade\Cache::get('system_config_data');
return [
'基础' => [
['name' => 'id', 'title' => 'id', 'help' => '', 'type' => 'hidden'],
['name' => 'model_id', 'title' => 'model_id', 'help' => '', 'type' => 'hidden'],
['name' => 'name', 'title' => '字段名', 'help' => '英文字母开头长度不超过30', 'type' => 'text'],
['name' => 'title', 'title' => '字段标题', 'help' => '请输入字段标题,用于表单显示', 'type' => 'text'],
['name' => 'type', 'title' => '字段类型', 'help' => '用于表单中的展示方式', 'type' => 'select', 'option' => Config::get('config.config_type_list'), 'help' => ''],
['name' => 'type', 'title' => '字段类型', 'help' => '用于表单中的展示方式', 'type' => 'select', 'option' => $config['config_type_list'], 'help' => ''],
['name' => 'length', 'title' => '字段长度', 'help' => '字段的长度值', 'type' => 'text'],
['name' => 'extra', 'title' => '参数', 'help' => '布尔、枚举、多选字段类型的定义数据', 'type' => 'textarea'],
['name' => 'value', 'title' => '默认值', 'help' => '字段的默认值', 'type' => 'text'],