Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
8a61b9fe
Commit
8a61b9fe
authored
May 30, 2020
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slidebar eslint报错优化
parent
bb5520a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
element-ui.scss
ruoyi-ui/src/assets/styles/element-ui.scss
+1
-1
Link.vue
ruoyi-ui/src/layout/components/Sidebar/Link.vue
+16
-9
No files found.
ruoyi-ui/src/assets/styles/element-ui.scss
View file @
8a61b9fe
...
...
@@ -31,7 +31,7 @@
.fixed-width
{
.el-button--mini
{
padding
:
7px
10px
;
min-
width
:
60px
;
width
:
60px
;
}
}
...
...
ruoyi-ui/src/layout/components/Sidebar/Link.vue
View file @
8a61b9fe
<
template
>
<!-- eslint-disable vue/require-component-is -->
<component
v-bind=
"linkProps(to)"
>
<component
:is=
"type"
v-bind=
"linkProps(to)"
>
<slot
/>
</component>
</
template
>
...
...
@@ -16,19 +14,28 @@ export default {
required
:
true
}
},
computed
:
{
isExternal
()
{
return
isExternal
(
this
.
to
)
},
type
()
{
if
(
this
.
isExternal
)
{
return
'a'
}
return
'router-link'
}
},
methods
:
{
linkProps
(
url
)
{
if
(
isExternal
(
url
)
)
{
linkProps
(
to
)
{
if
(
this
.
isExternal
)
{
return
{
is
:
'a'
,
href
:
url
,
href
:
to
,
target
:
'_blank'
,
rel
:
'noopener'
}
}
return
{
is
:
'router-link'
,
to
:
url
to
:
to
}
}
}
...
...
Write
Preview
Markdown
is supported
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