Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
d4fec7b6
Commit
d4fec7b6
authored
3 years ago
by
chenjianxing
Committed by
jianxing
3 years ago
Browse files
Options
Download
Email Patches
Plain Diff
refactor: 更多操作按钮权限样式
parent
d6c99740
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue
+2
-1
.../components/api/automation/scenario/ApiScenarioModule.vue
frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue
+2
-1
...ents/api/definition/components/module/ApiModuleHeader.vue
frontend/src/business/components/common/components/search/MsSearchBar.vue
+5
-1
...iness/components/common/components/search/MsSearchBar.vue
with
9 additions
and
3 deletions
+9
-3
frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue
+
2
-
1
View file @
d4fec7b6
...
...
@@ -114,16 +114,17 @@
},
{
label
:
this
.
$t
(
'
report.export
'
),
permissions
:
[
'
PROJECT_API_SCENARIO:READ+EXPORT_SCENARIO
'
],
children
:
[
{
label
:
this
.
$t
(
'
report.export_to_ms_format
'
),
permissions
:
[
'
PROJECT_API_SCENARIO:READ+EXPORT_SCENARIO
'
],
callback
:
()
=>
{
this
.
$emit
(
'
exportAPI
'
);
}
},
{
label
:
this
.
$t
(
'
report.export
'
)
+
'
JMETER 格式
'
,
permissions
:
[
'
PROJECT_API_SCENARIO:READ+EXPORT_SCENARIO
'
],
callback
:
()
=>
{
this
.
$emit
(
'
exportJmx
'
);
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/business/components/api/definition/components/module/ApiModuleHeader.vue
+
2
-
1
View file @
d4fec7b6
...
...
@@ -74,10 +74,10 @@ export default {
},
{
label
:
this
.
$t
(
'
report.export
'
),
permissions
:
[
'
PROJECT_API_DEFINITION:READ+EXPORT_API
'
],
children
:
[
{
label
:
this
.
$t
(
'
report.export_to_ms_format
'
),
permissions
:
[
'
PROJECT_API_DEFINITION:READ+EXPORT_API
'
],
callback
:
()
=>
{
if
(
!
this
.
projectId
)
{
this
.
$warning
(
this
.
$t
(
'
commons.check_project_tip
'
));
...
...
@@ -88,6 +88,7 @@ export default {
},
{
label
:
this
.
$t
(
'
report.export_to_swagger3_format
'
),
permissions
:
[
'
PROJECT_API_DEFINITION:READ+EXPORT_API
'
],
callback
:
()
=>
{
if
(
!
this
.
projectId
)
{
this
.
$warning
(
this
.
$t
(
'
commons.check_project_tip
'
));
...
...
This diff is collapsed.
Click to expand it.
frontend/src/business/components/common/components/search/MsSearchBar.vue
+
5
-
1
View file @
d4fec7b6
...
...
@@ -20,7 +20,8 @@
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<template>
<el-dropdown-item
v-for=
"(child, index) in item.children"
:key=
"index"
@
click.native.stop=
"click(child)"
>
<el-dropdown-item
v-for=
"(child, index) in item.children"
:key=
"index"
@
click.native.stop=
"click(child)"
:disabled=
"disabled(child.permissions)"
>
<span
class=
"tip-font"
>
{{
child
.
label
}}
</span>
...
...
@@ -68,6 +69,9 @@ export default {
}
},
disabled
(
permissions
)
{
if
(
!
permissions
)
{
return
false
;
}
return
!
hasPermissions
(...
permissions
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help