From 8e32f3c348edc45ef2cc8fc0385ecd6f758710c4 Mon Sep 17 00:00:00 2001 From: cinfree <78203731@qq.com> Date: Wed, 27 Jan 2021 00:13:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=99=E6=80=81=E6=96=87=E4=BB=B6=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1=E8=AF=B4=E6=98=8E=E5=92=8C=E4=B8=89=E7=BA=A7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/QUICK.md | 29 ++++++++++++++++++++++++----- docs/doc.md | 15 +++++++++++---- docs/en/README.md | 2 +- docs/en/doc.md | 4 +++- docs/en/quick.md | 26 ++++++++++++++++++-------- 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/docs/QUICK.md b/docs/QUICK.md index cda7644..4c5b7f7 100644 --- a/docs/QUICK.md +++ b/docs/QUICK.md @@ -439,7 +439,7 @@ SIMPLEUI_ICON = { |name|菜单名| |icon|图标,参考element-ui和fontawesome图标| |url|链接地址,绝对或者相对,如果存在models字段,将忽略url| -|models|子菜单| +|models|子菜单,自2021.02.01+版本 支持最多3级菜单| ### 例子 ```python @@ -462,12 +462,31 @@ SIMPLEUI_CONFIG = { 'url': 'auth/user/' }] }, { - 'name': '测试', + # 自2021.02.01+ 支持多级菜单,models 为子菜单名 + 'name': '多级菜单测试', 'icon': 'fa fa-file', 'models': [{ 'name': 'Baidu', - 'url': 'http://baidu.com', - 'icon': 'far fa-surprise' + 'icon': 'far fa-surprise', + 'models': [ + { + 'name': '爱奇艺', + # 第四级就不支持了,element只支持了3级 + 'models': [ + { + 'name': '电影', + 'url': 'https://www.iqiyi.com/dianying/' + }, { + 'name': '电视剧', + 'url': 'https://www.iqiyi.com/dianshiju/' + }, + ] + }, { + 'name': '百度问答', + 'icon': 'far fa-surprise', + 'url': 'https://zhidao.baidu.com/' + } + ] }, { 'name': '内网穿透', 'url': 'https://www.wezoz.com', @@ -1012,7 +1031,7 @@ simpleui 国际化采用js前端国际化,因为没有涉及到后端,所以 + 使用源码安装时如果出错,请指定python版本,python3 和 pip3 ### 无法启动 可能由于某些未知的问题,导致项目无法启动,请不要放弃simpleui,你可以提[issue](https://github.com/newpanjing/simpleui/issues),或者直接加入QQ群:873469913,我们将协助解决。 - + ### 样式正常加载显示不正常 在win8 系统中 可能会遇到,css以及其他文件全部正常加载,但是显示不正常。这是因为响应头为application/x-css,而不是text/css,造成浏览器不正常解析。 #### 解决办法: diff --git a/docs/doc.md b/docs/doc.md index 898353e..7d68e0f 100644 --- a/docs/doc.md +++ b/docs/doc.md @@ -49,7 +49,7 @@ Django admin theme the simpleui ## 文档&教程 文档详细的描述了安装使用方法,以及各种配置项的说明,请点击以下链接查阅。 - + + 重要的事情说3遍: 👇👇👇👇👇👇👇👇👇👇👇 @@ -80,7 +80,7 @@ Django Admin默认界面设计语言存在着的一些不足,比如色彩单 ## 在线Demo > 权限受限,只能查看模块的相关数据,不能操作。如果要体验全部功能,请在自己的系统安装simpleui查看效果。 -+ 地址:[https://www.88cto.com/admin/](https://www.88cto.com/admin/) ++ 地址:[](https://www.88cto.com/admin/) + 用户名:demo + 密码:demo123456 @@ -131,14 +131,21 @@ python setup.py sdist install ```shell python3 manage.py collectstatic ``` + 2. 克隆静态文件出错 请在settings.py文件中加入: + ```shell STATIC_ROOT = os.path.join(BASE_DIR, "static") ``` -3. 其他问题请参考[django官方文档](https://docs.djangoproject.com/zh-hans/2.2/)。 + +3. 静态文件丢失的问题请参考:[管理静态文件](https://docs.djangoproject.com/zh-hans/3.0/howto/static-files/) + +4. 其他问题请参考[django官方文档](https://docs.djangoproject.com/zh-hans/2.2/) 、[django-admin配置](https://docs.djangoproject.com/zh-hans/2.2/ref/contrib/admin/)。 + +5. i18n 国际化 采用js国际化,默认为英文和中文两种语言,随系统切换。具体请看[国际化配置](/i18n.md) -4. i18n 国际化 采用js国际化,默认为英文和中文两种语言,随系统切换。具体请看[国际化配置](/i18n.md) + 其他问题请查看[快速上手指南](./QUICK.md) diff --git a/docs/en/README.md b/docs/en/README.md index ac0b2ac..eef0360 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -14,7 +14,7 @@ footer: Copyright © 2019-present Simple Forum --- ## Website -[https://simpleui.88cto.com/simpleui](https://simpleui.88cto.com/simpleui) +[https://simpleui.88cto.com/simpleui/en/](https://simpleui.88cto.com/simpleui/en/) ## Forum [https://simpleui.88cto.com](https://simpleui.88cto.com) diff --git a/docs/en/doc.md b/docs/en/doc.md index 0c45879..4b295fd 100644 --- a/docs/en/doc.md +++ b/docs/en/doc.md @@ -47,7 +47,7 @@ simpleui Characteristics ## Document The document describes in detail how to use the installation, as well as a description of the various configuration items, please click on the link below. - + + [simpleui Document](./quick.md) @@ -113,11 +113,13 @@ python setup.py sdist install ```shell python3 manage.py collectstatic ``` + 2. Clone static file error Please add in the `settings.py` file: ```shell STATIC_ROOT = os.path.join(BASE_DIR, "static") ``` + 3. Please refer to other questions [django Documentation](https://docs.djangoproject.com/en/2.2/intro/tutorial01/). 4. i18n internationalization adopt js internationalization, the default is English and Chinese, switch with the system. Please see [International configuration](/i18n.md) diff --git a/docs/en/quick.md b/docs/en/quick.md index 261b734..978db0b 100644 --- a/docs/en/quick.md +++ b/docs/en/quick.md @@ -437,7 +437,7 @@ If changed to True,custom and system menus will coexist. |name|Menu name| |icon|Icon,refer element-ui和fontawesome| |url|link address,absolute or relative, if there is a models field, the url will be ignored| -|models|submenu| +|models|submenu, Since 2021.02.01+ version supports up to 3 levels of menus| #### Example ```python @@ -457,13 +457,23 @@ SIMPLEUI_CONFIG = { 'url': 'auth/user/' }] }, { - 'name': 'Test', + # Since 2021.02.01+ supports multi-level menus, models is the submenu name + 'name': 'Multi-level menu test', 'icon': 'fa fa-file', - 'models': [{ - 'name': 'Baidu', - 'url': 'http://baidu.com', - 'icon': 'far fa-surprise' - }, { + 'models': [ + { + 'name': 'IQiyi', + # The fourth level is not supported, the element only supports level 3 + 'models': [ + { + 'name': 'Movie', + 'url': 'https://www.iqiyi.com/dianying/' + }, { + 'name': 'TV series', + 'url': 'https://www.iqiyi.com/dianshiju/' + }, + ] + }, { 'name': 'Network', 'url': 'https://www.wezoz.com', 'icon': 'fab fa-github' @@ -911,7 +921,7 @@ Admindoc must be the simpleui3.3+ version + If you make a mistake when using source installation, please specify the python version, python3 and pip3 ### Unable to Start May be unable to start due to some unknown problem, please don't give up **simpleui**, you can commit [issue](https://github.com/newpanjing/simpleui/issues),or join QQ group directly:786576510,we will assist in solving. - + ### Style Normal Loading But Display Abnormal in the **Windows8** system, you may encounter that **css** and other files are all loaded normally, but the display is not normal.this is because the response header is **application/x-css**, not **text/css**, causing the browser to not parse properly. #### Solution: -- Gitee