Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
C
country-energy-ecological-construction
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
范加坤
country-energy-ecological-construction
Commits
3315454a
Commit
3315454a
authored
Aug 03, 2021
by
范加坤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图例
parent
169114c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
Lengend.vue
src/components/Lengend/Lengend.vue
+18
-19
No files found.
src/components/Lengend/Lengend.vue
View file @
3315454a
...
...
@@ -11,7 +11,7 @@
<div
class=
"item"
>
<div
class=
"circle"
:style=
"
{ 'background-color': item }">
</div>
<label>
{{
showLabel
(
range
[
index
-
1
],
range
[
index
]
)
}}
{{
showLabel
(
range
,
index
)
}}
</label>
</div>
</div>
...
...
@@ -23,35 +23,34 @@
<
script
>
export
default
{
data
()
{
return
{}
;
return
{}
},
props
:
{
title
:
{
type
:
String
,
type
:
String
},
colors
:
{
type
:
Array
,
type
:
Array
},
range
:
{
type
:
Array
,
}
,
type
:
Array
}
},
computed
:
{
showLabel
()
{
return
function
(
min
,
max
)
{
if
(
max
&&
min
)
{
return
`
${
min
}
-
${
max
}
`
;
}
if
(
max
&&
!
min
)
{
return
`<
${
max
}
`
;
return
function
(
range
,
index
)
{
console
.
log
(
range
,
index
)
if
(
index
==
0
)
{
return
`<
${
range
[
0
]}
`
}
else
if
(
index
===
range
.
length
)
{
return
`>
${
range
[
index
-
1
]}
`
}
else
{
return
`
${
range
[
index
-
1
]}
-
${
range
[
index
]}
`
}
if
(
!
max
&&
min
)
{
return
`
${
min
}
<`
;
}
};
},
},
};
}
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
...
...
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