Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 879d233c
authored
Feb 17, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
toggle 图标
1 parent
1ea4bfee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
9 deletions
linkwe-pc/src/layout/components/Hamburger/index.vue
linkwe-pc/src/layout/components/Hamburger/index.vue
View file @
879d233
// 显隐侧边栏按钮
<
template
>
<!--
<i
class=
"el-icon-s-fold"
:class=
"
{ '
is-active': $store.state.app.sidebar.opened }" @click="toggleClick
">
</i>
-->
<svg-icon
<!--
<i
class=
"el-icon-s-fold"
:class=
"
{ '
open': $store.state.app.sidebar.opened }" @click="toggle
">
</i>
-->
<
!--
<
svg-icon
iconClass=
"nested"
class=
"el-icon-s-fold"
:class=
"
{ 'is-active': $store.state.app.sidebar.opened }"
@click="toggleClick">
</svg-icon>
:class=
"
{ 'open': $store.state.app.sidebar.opened }"
@click="toggle">
</svg-icon>
-->
<div
class=
"toggle"
:class=
"
{ open: $store.state.app.sidebar.opened }" @click="toggle">
<div
class=
"toggle-line"
></div>
<div
class=
"toggle-line line-middle"
></div>
<div
class=
"toggle-line"
></div>
</div>
</
template
>
<
script
>
...
...
@@ -20,7 +25,7 @@ export default {
// },
// },
methods
:
{
toggle
Click
()
{
toggle
()
{
this
.
$store
.
dispatch
(
'app/toggleSideBar'
)
},
},
...
...
@@ -28,10 +33,37 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.el-icon-s-fold
{
font-size
:
20px
;
&.is-active
{
transform
:
rotate
(
180deg
);
//
.el-icon-s-fold
{
//
font-size
:
20px
;
//
&.open
{
//
transform
:
rotate
(
180deg
);
//
}
//
}
.toggle
{
position
:
relative
;
cursor
:
pointer
;
.toggle-line
{
position
:
relative
;
left
:
0
;
width
:
18px
;
height
:
2px
;
background
:
#4e5969
;
border-radius
:
8px
;
transition
:
all
0.3s
;
}
.line-middle
{
position
:
relative
;
margin
:
4px
0
;
left
:
-5px
;
}
&
.open
{
.toggle-line
{
//
transform
:
rotateY
(
360deg
);
left
:
3px
;
}
.line-middle
{
left
:
8px
;
}
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment