rabin 6 years ago
parent
commit
a13d602621
1 changed files with 56 additions and 3 deletions
  1. 56 3
      database/info.php

+ 56 - 3
database/info.php

@@ -11,6 +11,12 @@ $column = function()
 	return $array;
 };
 
+$status = array
+(
+	1 => '启用',
+	2 => '不启用',
+);
+
 return array
 (
 	# 表名
@@ -19,6 +25,7 @@ return array
 	'lang' => '分类列表',
 	# 是否显示在后台菜单
 	'order' => 10,
+	'check' => 'key',
 
 	'end' => array
 	(
@@ -53,6 +60,19 @@ return array
 			'edit'		=> true,
 		),
 
+		'key'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '分类标识-请输入英文,分类标识为唯一项,用来区分前端展示,选填项',
+			'default' 	=> '',
+			'desc' 		=> '分类标识',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			'list'		=> true,
+			//'edit'		=> true,
+		),
+
 		'icon'		=> array
 		(
 			'type' 		=> 'varchar-150',
@@ -64,6 +84,26 @@ return array
 			'key'		=> 1,
 		),
 
+		'color'		=> array
+		(
+			'type' 		=> 'varchar-10',
+			'name' 		=> '字体颜色-请填写颜色代码',
+			'default' 	=> '',
+			'desc' 		=> '字体颜色',
+			'match' 	=> 'option',
+			'update'	=> 'color',
+		),
+
+		'bgcolor'		=> array
+		(
+			'type' 		=> 'varchar-10',
+			'name' 		=> '背景颜色-请填写颜色代码',
+			'default' 	=> '',
+			'desc' 		=> '背景颜色',
+			'match' 	=> 'option',
+			'update'	=> 'color',
+		),
+
 		'info_id'		=> array
 		(
 			'type' 		=> 'int-11',
@@ -115,7 +155,20 @@ return array
 			'match' 	=> 'is_numeric',
 			'update'	=> 'select',
 			'option'	=> $column,
-			'list'		=> '{column_id} > 0 ? Dever::load("category/column-one#name", {column_id}) : "未选择"',
+			//'list'		=> '{column_id} > 0 ? Dever::load("category/column-one#name", {column_id}) : "未选择"',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '是否启用',
+			'default' 	=> '1',
+			'desc' 		=> '是否启用',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'list'		=> true,
+			'edit'		=> true,
 		),
 
 		'reorder'		=> array
@@ -150,8 +203,8 @@ return array
 			'desc' 		=> '',
 			# 只有insert时才生效
 			'insert'	=> true,
-			'search'	=> 'date',
-			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+			//'search'	=> 'date',
+			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 		),
 	),