From 8495dae004330b63c5a2fc91551eab6836516fd3 Mon Sep 17 00:00:00 2001 From: cinfree <78203731@qq.com> Date: Wed, 27 Jan 2021 14:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E7=BA=A7=E8=8F=9C=E5=8D=95=E8=AF=B4=E6=98=8E=EF=BC=8C=E5=92=8C?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- docs/QUICK.md | 17 ++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 62c8935..f32e31a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea/ \ No newline at end of file +.idea/ +.DS_Store diff --git a/docs/QUICK.md b/docs/QUICK.md index 4c5b7f7..5e9544c 100644 --- a/docs/QUICK.md +++ b/docs/QUICK.md @@ -432,16 +432,17 @@ SIMPLEUI_ICON = { 开启为True,开启后,每次用户登陆都会刷新左侧菜单配置。
需要注意的是:开启后每次访问admin都会重读配置文件,所以会带来额外的消耗。 -### menus说明 +### menus说明 (2021.2已加入3级菜单) |字段|说明| |---|---| |name|菜单名| |icon|图标,参考element-ui和fontawesome图标| |url|链接地址,绝对或者相对,如果存在models字段,将忽略url| -|models|子菜单,自2021.02.01+版本 支持最多3级菜单| +|models|子菜单,自2021.02.01+版本 支持最多3级菜单,使用方法可以看下方例子| ### 例子 + ```python import time SIMPLEUI_CONFIG = { @@ -465,22 +466,16 @@ SIMPLEUI_CONFIG = { # 自2021.02.01+ 支持多级菜单,models 为子菜单名 'name': '多级菜单测试', 'icon': 'fa fa-file', + # 二级菜单 'models': [{ 'name': 'Baidu', 'icon': 'far fa-surprise', + # 第三级菜单 , 'models': [ { 'name': '爱奇艺', + 'url': 'https://www.iqiyi.com/dianshiju/' # 第四级就不支持了,element只支持了3级 - 'models': [ - { - 'name': '电影', - 'url': 'https://www.iqiyi.com/dianying/' - }, { - 'name': '电视剧', - 'url': 'https://www.iqiyi.com/dianshiju/' - }, - ] }, { 'name': '百度问答', 'icon': 'far fa-surprise', -- Gitee