Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
project_progress
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 61420317
authored
Nov 11, 2024
by
liangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂存
1 parent
35d548fd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
3 deletions
src/components/TagsView/ScrollPane.vue
src/components/TagsView/index.vue
src/components/event-bus.js
src/views/layout/continerView.vue
src/views/layout/mainLayout.vue
src/components/TagsView/ScrollPane.vue
View file @
6142031
<
template
>
<
template
>
<el-scrollbar
ref=
"scrollContainer"
:vertical=
"false"
class=
"scroll-container"
@
wheel
.
native
.
prevent=
"handleScroll"
>
<el-scrollbar
ref=
"scrollContainer"
:vertical=
"false"
class=
"scroll-container"
@
wheel
.
native
.
prevent=
"handleScroll"
>
<div
:class=
"openBar?'icon':'iconLeft'"
class=
"iconfont"
@
click=
"modifyStyle()"
>

</div>
<slot
/>
<slot
/>
</el-scrollbar>
</el-scrollbar>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
EventBus
}
from
"../event-bus.js"
;
const
tagAndTagSpacing
=
4
// tagAndTagSpacing
const
tagAndTagSpacing
=
4
// tagAndTagSpacing
export
default
{
export
default
{
name
:
'ScrollPane'
,
name
:
'ScrollPane'
,
data
()
{
data
()
{
return
{
return
{
left
:
0
left
:
0
,
openBar
:
true
,
}
}
},
},
computed
:
{
computed
:
{
...
@@ -20,6 +25,15 @@ export default {
...
@@ -20,6 +25,15 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
modifyStyle
()
{
this
.
openBar
=!
this
.
openBar
if
(
!
this
.
openBar
){
EventBus
.
$emit
(
'modifyStyleEvent'
,
'new-style'
);
}
else
{
EventBus
.
$emit
(
'modifyStyleEvent'
,
'old-style'
);
}
},
handleScroll
(
e
)
{
handleScroll
(
e
)
{
const
eventDelta
=
e
.
wheelDelta
||
-
e
.
deltaY
*
40
const
eventDelta
=
e
.
wheelDelta
||
-
e
.
deltaY
*
40
const
$scrollWrapper
=
this
.
scrollWrapper
const
$scrollWrapper
=
this
.
scrollWrapper
...
@@ -72,7 +86,37 @@ export default {
...
@@ -72,7 +86,37 @@ export default {
white-space
:
nowrap
;
white-space
:
nowrap
;
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
padding-left
:
100px
;
width
:
100%
;
width
:
100%
;
.icon{
top
:
6px
;
width
:
48px
;
height
:
27px
;
line-height
:
27px
;
text-align
:
center
;
color
:
#edeaff
;
background-color
:
#63a4a6
;
border
:
1px
solid
#edf0f6
;
border-radius
:
5px
;
font-size
:
24px
;
position
:
absolute
;
left
:
0
;
transform
:
rotate
(
180deg
);
}
.iconLeft
{
top
:
6px
;
width
:
48px
;
height
:
27px
;
line-height
:
27px
;
text-align
:
center
;
color
:
#edeaff
;
background-color
:
#63a4a6
;
border
:
1px
solid
#edf0f6
;
border-radius
:
5px
;
font-size
:
24px
;
position
:
absolute
;
left
:
0
;
}
/
deep
/
{
/
deep
/
{
.el-scrollbar__bar
{
.el-scrollbar__bar
{
bottom
:
0px
;
bottom
:
0px
;
...
@@ -82,4 +126,13 @@ export default {
...
@@ -82,4 +126,13 @@ export default {
}
}
}
}
}
}
.fold-button
{
//
width
:
25px
;
//
height
:
20px
;
//
line-height
:
28px
;
//
text-align
:
center
;
//
font-size
:
14px
;
//
font-weight
:
600
;
}
</
style
>
</
style
>
src/components/TagsView/index.vue
View file @
6142031
...
@@ -235,6 +235,7 @@ export default {
...
@@ -235,6 +235,7 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
'@/styles/common.scss'
;
@import
'@/styles/common.scss'
;
/
deep
/
.scroll-container
.el-scrollbar__wrap
{
/
deep
/
.scroll-container
.el-scrollbar__wrap
{
//
padding-left
:
50px
;
scrollbar-width
:
none
;
scrollbar-width
:
none
;
}
}
.hamburger-container
{
.hamburger-container
{
...
...
src/components/event-bus.js
0 → 100644
View file @
6142031
import
Vue
from
'vue'
export
const
EventBus
=
new
Vue
()
\ No newline at end of file
src/views/layout/continerView.vue
View file @
6142031
...
@@ -40,6 +40,8 @@ export default {
...
@@ -40,6 +40,8 @@ export default {
height
:
calc
(
100%
-
55px
);
height
:
calc
(
100%
-
55px
);
position
:
relative
;
position
:
relative
;
padding
:
15px
;
padding
:
15px
;
display
:
flex
;
flex-direction
:
column
;
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/layout/mainLayout.vue
View file @
6142031
<
template
>
<
template
>
<div
class=
"layout"
>
<div
class=
"layout"
>
<LeftBar
class=
"bar
"
:authority=
"authority"
:autho=
"autho"
ref=
"child"
></LeftBar>
<LeftBar
:class=
"openBar?'bar':'barClose'
"
:authority=
"authority"
:autho=
"autho"
ref=
"child"
></LeftBar>
<ContinerView
class=
"continer"
id=
"myElement"
>
<ContinerView
class=
"continer"
id=
"myElement"
>
<router-view></router-view>
<router-view></router-view>
</ContinerView>
</ContinerView>
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
EventBus
}
from
"../../components/event-bus.js"
;
import
ContinerView
from
"./continerView"
;
import
ContinerView
from
"./continerView"
;
import
LeftBar
from
"./leftBar"
;
import
LeftBar
from
"./leftBar"
;
...
@@ -58,6 +59,7 @@ export default {
...
@@ -58,6 +59,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
openBar
:
true
,
title
:
"确认更改"
,
title
:
"确认更改"
,
submenu
:
[
submenu
:
[
{
{
...
@@ -154,9 +156,16 @@ export default {
...
@@ -154,9 +156,16 @@ export default {
},
},
mounted
()
{
mounted
()
{
EventBus
.
$on
(
'modifyStyleEvent'
,
this
.
updateStyle
)
},
},
methods
:
{
methods
:
{
updateStyle
(
style
)
{
console
.
log
(
'9999999'
)
this
.
openBar
=!
this
.
openBar
},
handleResize
()
{
handleResize
()
{
// 处理窗口大小变化的逻辑
// 处理窗口大小变化的逻辑
console
.
log
(
"Window was resized!"
);
console
.
log
(
"Window was resized!"
);
...
@@ -195,6 +204,9 @@ export default {
...
@@ -195,6 +204,9 @@ export default {
}
}
},
},
beforeDestroy
()
{
EventBus
.
$off
(
'modifyStyleEvent'
,
this
.
updateStyle
);
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -208,7 +220,12 @@ export default {
...
@@ -208,7 +220,12 @@ export default {
position
:
relative
;
position
:
relative
;
overflow
:
hidden
;
overflow
:
hidden
;
.bar
{
.bar
{
width
:
235px
!important
;
width
:
235px
;
height
:
100%
;
flex-shrink
:
0
;
}
.barClose
{
width
:
0
;
height
:
100%
;
height
:
100%
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
...
...
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