Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
beyond-clouds-front
Commits
4e513036
Commit
4e513036
authored
Apr 10, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
展开子分类滚动
parent
09453039
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
components/pc/select/selectCard.vue
+9
-2
components/pc/select/selectContent.vue
+12
-9
No files found.
components/pc/select/selectCard.vue
View file @
4e513036
...
...
@@ -49,11 +49,12 @@
<yun-icon
name=
"down_arrow"
size=
"10px"
color=
"#999"
></yun-icon>
</div>
</div>
<div
class=
"class-list-box"
v-if
=
"isShow && isShow2"
@
mouseleave=
"isShow=false"
>
<div
class=
"class-list-box"
ref=
"tagsBox"
v-show
=
"isShow && isShow2"
@
mouseleave=
"isShow=false"
>
<select-content
v-for=
"(item, index) in classList"
:item=
"item"
:key=
"`$
{item}${index}`"
@scrollTop="handleScroll"
@select="handleChange2"
>
</select-content>
</div>
...
...
@@ -174,6 +175,12 @@ export default {
this
.
isShow2
=
false
;
this
.
$emit
(
'handleClass'
,
this
.
value
);
},
handleScroll
(
num
){
setTimeout
(()
=>
{
this
.
$refs
.
tagsBox
.
scrollTop
=
this
.
$refs
.
tagsBox
.
scrollTop
+
40
*
(
num
>
4
?
5
:
num
)
})
},
createTag
()
{
this
.
$popupbox
({
title
:
'创建标签'
,
...
...
@@ -317,7 +324,7 @@ export default {
.class-list-box
{
position
:
absolute
;
width
:
196
*$
length
;
height
:
250
*$
length
;
max-
height
:
250
*$
length
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
z-index
:
999
;
...
...
components/pc/select/selectContent.vue
View file @
4e513036
<
template
>
<div>
<div
class=
"tag-box"
>
<p
v-if=
"!isHot"
@
click=
"handleClick"
>
{{
item
.
tag
}}
</p>
<div
v-if=
"isHot"
@
click=
"handleClick"
>
{{
item
.
tag
}}
(
{{
item
.
referenceCount
}}
)
</div>
<yun-icon
v-if=
"item.childList"
@
click=
"handleClick"
:style=
"
{paddingRight:'5px',transform:showChildList?'rotate(180deg)':'rotate(0)'}" name="down_arrow" size="8px" :color="showChildList?'#00AAE6':'#999'">
</yun-icon>
<div
class=
"tag-box"
@
click=
"handleClick"
>
<p
v-if=
"!isHot"
>
{{
item
.
tag
}}
</p>
<div
v-if=
"isHot"
>
{{
item
.
tag
}}
(
{{
item
.
referenceCount
}}
)
</div>
<yun-icon
v-if=
"item.childList"
:style=
"
{paddingRight:'5px',transform:showChildList?'rotate(180deg)':'rotate(0)'}" name="down_arrow" size="8px" :color="showChildList?'#00AAE6':'#999'">
</yun-icon>
</div>
<div
v-if=
"item.childList&&showChildList"
>
<p
class=
"tag-child"
@
click=
"handleChildClick(val.tag,val
,
tagId)"
v-for=
"(val,index) in item.childList"
>
{{
val
.
tag
}}
</p>
<p
class=
"tag-child"
@
click=
"handleChildClick(val.tag,val
.
tagId)"
v-for=
"(val,index) in item.childList"
>
{{
val
.
tag
}}
</p>
</div>
</div>
...
...
@@ -24,6 +23,9 @@ export default {
default
:
false
}
},
watch
:{
},
data
(){
return
{
showChildList
:
false
...
...
@@ -33,14 +35,14 @@ export default {
handleClick
(){
if
(
this
.
item
.
childList
){
this
.
showChildList
=
!
this
.
showChildList
;
this
.
$emit
(
'scrollTop'
,
this
.
item
.
childList
.
length
)
}
else
{
this
.
$emit
(
'select'
,
this
.
item
.
tag
,
this
.
item
.
tagId
);
}
},
handleChildClick
(
tag
,
id
){
this
.
$emit
(
'select'
,
tag
,
id
);
this
.
$emit
(
'select'
,
this
.
item
.
tag
+
'>'
+
tag
,
id
);
}
}
...
...
@@ -51,6 +53,8 @@ export default {
.tag-box
{
@extend
%flex-row-spb;
border-bottom
:
1px
solid
#F4F8FA
;
box-sizing
:
border-box
;
padding-right
:
10px
;
>
div
{
display
:
inline-block
;
...
...
@@ -80,7 +84,6 @@ export default {
.tag-child
{
@include
fontStyle(12,
40,
500,
#999,
center);
padding-left
:
20
*$
length
;
@extend
%cursorPointer;
box-sizing
:
border-box
;
&:hover
{
...
...
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