Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
memberTag-web
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
memberTag
memberTag-web
Commits
48f2f100
Commit
48f2f100
authored
Apr 12, 2019
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实现展示标签组详情的组件
parent
5a75a082
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
7 deletions
+57
-7
selected-tags-list.vue
src/components/selected-tags-list.vue
+57
-7
No files found.
src/components/selected-tags-list.vue
View file @
48f2f100
<
template
>
<div
class=
"flex"
>
<div
v-for=
"(tags, index) in tagsList"
:key=
"tags"
>
<ul>
<li
v-for=
"tag in tags"
:key=
"tag.tagId"
></li>
<div
class=
"flex
m-t-20 tags
"
>
<div
v-for=
"(tags, index) in tagsList"
:key=
"tags"
:style=
"`width: $
{100 / tagsList.length}%`" class="tag-group"
>
<ul
class=
"tag-list"
>
<li
v-for=
"tag in tags"
:key=
"tag.tagId"
>
{{
tag
.
tagName
}}
</li>
</ul>
<div
v-if=
"(index === 0 && tagsList.length > 1) || (index === 1 && tagsList.length > 2)"
>
{{
tagsList
[
index
][
0
].
levelType
===
'or'
?
'或者'
:
tagsList
[
index
][
0
].
levelType
===
'andNot'
?
'剔除'
:
''
}}
<div
v-if=
"(index === 0 && tagsList.length > 1) || (index === 1 && tagsList.length > 2)"
class=
"tag-relation"
>
<span
class=
"tag-relation__wrap"
>
<i
class=
"tag-relation__cont"
>
{{
tagsList
[
index
][
0
].
levelType
===
'or'
?
'或者'
:
tagsList
[
index
][
0
].
levelType
===
'andNot'
?
'剔除'
:
''
}}
</i>
</span>
</div>
</div>
</div>
...
...
@@ -23,4 +27,50 @@ export default {
};
</
script
>
<
style
lang=
"less"
scoped
></
style
>
<
style
lang=
"less"
scoped
>
.tags
{
width
:
100%
;
border-right
:
2px
solid
#aaa
;
border-left
:
2px
solid
#aaa
;
.tag-group
{
position
:
relative
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
stretch
;
.tag-list
{
display
:
flex
;
flex-direction
:
column
;
flex-wrap
:
wrap
;
justify-content
:
center
;
padding
:
0
35px
;
width
:
100%
;
font-size
:
16px
;
min-height
:
120px
;
}
.tag-relation
{
position
:
relative
;
border-left
:
2px
solid
#aaa
;
.tag-relation__wrap
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
z-index
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
40px
;
height
:
40px
;
color
:
#333
;
cursor
:
default
;
background
:
#cfcfcf
;
border-radius
:
15px
;
box-shadow
:
0
0
0
8px
#fff
;
transform
:
translate
(
-50%
,
-50%
)
rotateZ
(
45deg
);
.tag-relation__cont
{
transform
:
rotateZ
(
-45deg
);
}
}
}
}
}
</
style
>
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