Files
2025-11-05 18:35:17 +08:00

39 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 菜单配置
系统的菜单配置全部放到数据库中_menu 表中
``` sql
-- auto-generated definition
create table lucky_menu
(
id int(11) unsigned auto_increment comment '菜单ID'
primary key,
app_module varchar(255) default 'admin' not null comment '应用模块',
addon varchar(255) default '' not null comment '所属插件',
title varchar(50) default '' not null comment '菜单标题',
name varchar(50) default '' not null comment '菜单关键字',
parent varchar(255) default '' not null comment '上级菜单',
level int default 1 not null comment '深度等级',
url varchar(255) default '' not null comment '链接地址',
is_show tinyint default 0 not null comment '是否展示',
sort int default 0 not null comment '排序(同级有效)',
`desc` varchar(255) default '' not null comment '描述',
is_icon tinyint default 0 not null comment '是否是矢量菜单图',
picture varchar(255) default '' not null comment '图片(矢量图)',
picture_select varchar(255) default '' not null comment '图片(矢量图)(选中)',
is_control tinyint default 1 not null comment '是否控制权限'
)
comment '菜单表' charset = utf8
row_format = DYNAMIC;
```
以 AI 配置菜单为例
```
INSERT INTO shop_mallnew.lucky_menu (id, app_module, addon, title, name, parent, level, url, is_show, sort, `desc`, is_icon, picture, picture_select, is_control) VALUES (2481, 'shop', '', 'AI智能', 'CONFIG_AI_PLATFORM', 'CONFIG_BASE', 3, 'shop/config/ai', 1, 99, '', 0, '', '', 1);
```
| id | app\_module | addon | title | name | parent | level | url | is\_show | sort | desc | is\_icon | picture | picture\_select | is\_control |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| 2481 | shop | | AI智能 | CONFIG\_AI\_PLATFORM | CONFIG\_BASE | 3 | shop/config/ai | 1 | 99 | | 0 | | | 1 |