mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-06 21:01:36 +08:00
refactor: 公告类型适配字典数据
1.新增 <dict-tag> 自定义组件,用于回显字典标签 2.重构 useDict 方法,支持查询字典数据 3.优化部分字典相关数据类型
This commit is contained in:
@@ -36,7 +36,7 @@ CREATE TABLE IF NOT EXISTS `sys_announcement` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`title` varchar(255) NOT NULL COMMENT '标题',
|
||||
`content` mediumtext NOT NULL COMMENT '内容',
|
||||
`type` tinyint(1) UNSIGNED DEFAULT 1 COMMENT '类型(1:活动,2:消息,3:通知)',
|
||||
`type` varchar(30) NOT NULL COMMENT '类型',
|
||||
`effective_time` datetime DEFAULT NULL COMMENT '生效时间',
|
||||
`terminate_time` datetime DEFAULT NULL COMMENT '终止时间',
|
||||
`sort` int(11) UNSIGNED DEFAULT 999 COMMENT '排序',
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
CREATE TABLE IF NOT EXISTS `sys_dict` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(50) NOT NULL COMMENT '字典名称',
|
||||
`code` varchar(50) NOT NULL COMMENT '字典编码',
|
||||
`code` varchar(30) NOT NULL COMMENT '字典编码',
|
||||
`description` varchar(512) DEFAULT NULL COMMENT '描述',
|
||||
`create_user` bigint(20) UNSIGNED NOT NULL COMMENT '创建人',
|
||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||
@@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `sys_dict` (
|
||||
CREATE TABLE IF NOT EXISTS `sys_dict_item` (
|
||||
`id` bigint(20) UNSIGNED AUTO_INCREMENT COMMENT 'ID',
|
||||
`label` varchar(50) NOT NULL COMMENT '字典标签',
|
||||
`value` varchar(50) NOT NULL COMMENT '字典值',
|
||||
`value` varchar(30) NOT NULL COMMENT '字典值',
|
||||
`color` varchar(30) DEFAULT NULL COMMENT '背景颜色',
|
||||
`sort` int(11) UNSIGNED DEFAULT 999 COMMENT '字典项排序',
|
||||
`description` varchar(512) DEFAULT NULL COMMENT '描述',
|
||||
|
||||
Reference in New Issue
Block a user