Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
729b3d41
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
333
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
729b3d41
编写于
5月 20, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改配置path灵活度 可增加路由参数
上级
fc82be83
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
3 deletion
+9
-3
server/api/v1/sys_menu.go
server/api/v1/sys_menu.go
+1
-1
web/src/view/superAdmin/menu/menu.vue
web/src/view/superAdmin/menu/menu.vue
+8
-2
未找到文件。
server/api/v1/sys_menu.go
浏览文件 @
729b3d41
...
...
@@ -70,7 +70,7 @@ func AddBaseMenu(c *gin.Context) {
var
menu
model
.
SysBaseMenu
_
=
c
.
ShouldBindJSON
(
&
menu
)
MenuVerify
:=
utils
.
Rules
{
"Path"
:
{
"notEmpty"
},
"Path"
:
{
utils
.
NotEmpty
()
},
"ParentId"
:
{
utils
.
NotEmpty
()},
"Name"
:
{
utils
.
NotEmpty
()},
"Component"
:
{
utils
.
NotEmpty
()},
...
...
web/src/view/superAdmin/menu/menu.vue
浏览文件 @
729b3d41
...
...
@@ -8,6 +8,7 @@
<el-table
:data=
"tableData"
border
row-key=
"ID"
stripe
>
<el-table-column
label=
"ID"
min-width=
"100"
prop=
"ID"
></el-table-column>
<el-table-column
label=
"路由Name"
min-width=
"160"
prop=
"name"
></el-table-column>
<el-table-column
label=
"路由Path"
min-width=
"160"
prop=
"path"
></el-table-column>
<el-table-column
label=
"是否隐藏"
min-width=
"100"
prop=
"hidden"
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
hidden
?
"
隐藏
"
:
"
显示
"
}}
</span>
...
...
@@ -46,7 +47,10 @@
label-position=
"top"
>
<el-form-item
label=
"路由name"
prop=
"path"
style=
"width:30%"
>
<el-input
autocomplete=
"off"
placeholder=
"唯一英文字符串"
v-model=
"form.path"
></el-input>
<el-input
autocomplete=
"off"
placeholder=
"唯一英文字符串"
@
change=
"changeName"
v-model=
"form.name"
></el-input>
</el-form-item>
<el-form-item
label=
"路由path"
prop=
"path"
style=
"width:30%"
>
<el-input
autocomplete=
"off"
placeholder=
"建议只在后方拼接参数"
v-model=
"form.path"
></el-input>
</el-form-item>
<el-form-item
label=
"是否隐藏"
style=
"width:30%"
>
<el-select
placeholder=
"是否在列表隐藏"
v-model=
"form.hidden"
>
...
...
@@ -151,6 +155,9 @@ export default {
icon
},
methods
:
{
changeName
(){
this
.
form
.
path
=
this
.
form
.
name
},
setOptions
()
{
this
.
menuOption
=
[
{
...
...
@@ -259,7 +266,6 @@ export default {
this
.
$refs
.
menuForm
.
validate
(
async
valid
=>
{
if
(
valid
)
{
let
res
;
this
.
form
.
name
=
this
.
form
.
path
;
if
(
this
.
isEdit
)
{
res
=
await
updateBaseMenu
(
this
.
form
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录