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
8adb96a3
Commit
8adb96a3
authored
Jul 29, 2021
by
吕超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:状态修改组件
parent
b37f335d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
0 deletions
+79
-0
index.vue
src/components/statusControl/index.vue
+64
-0
index.vue
src/pages/methaneUpgrade/index.vue
+15
-0
No files found.
src/components/statusControl/index.vue
0 → 100644
View file @
8adb96a3
<
template
>
<div
class=
"statusControl"
:style=
"statusStyle"
>
<ul>
<li
v-for=
"(item, index) in list"
:key=
"index"
:class=
"
{ acitive: value === item.key }"
@click="onStatusChange(item.key)"
>
{{
item
.
value
}}
</li>
</ul>
</div>
</
template
>
<
script
>
// #144683
export
default
{
name
:
"statusControl"
,
props
:
{
list
:
{
type
:
Array
,
default
:
function
()
{
return
[];
},
},
statusStyle
:
{
type
:
[
Object
,
String
],
default
:
""
,
},
value
:
{
type
:
String
,
default
:
""
,
},
},
data
()
{
return
{};
},
methods
:
{
onStatusChange
(
key
)
{
this
.
$emit
(
"input"
,
key
);
},
},
};
</
script
>
<
style
scoped
lang=
"less"
>
.statusControl {
ul li {
margin-bottom: 10px;
border-radius: 5px;
padding: 5px 10px;
width: 150px;
background-color: #fff;
box-shadow: 0 0 5px #fff9;
text-align: center;
cursor: pointer;
&.acitive {
color: #fff;
background-color: #144683;
}
}
}
</
style
>
src/pages/methaneUpgrade/index.vue
View file @
8adb96a3
...
@@ -2,10 +2,16 @@
...
@@ -2,10 +2,16 @@
<!-- 农村沼气转型升级 -->
<!-- 农村沼气转型升级 -->
<div
class=
"methaneUpgrade"
>
<div
class=
"methaneUpgrade"
>
<MethaneMap></MethaneMap>
<MethaneMap></MethaneMap>
<StatusControl
:statusStyle=
"
{ position: 'absolute', right: 0, top: '100px' }"
:list="statusControlList"
v-model="statusValue"
>
</StatusControl>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
StatusControl
from
"@/components/statusControl/index.vue"
;
import
MethaneMap
from
"./components/methaneMap"
;
import
MethaneMap
from
"./components/methaneMap"
;
export
default
{
export
default
{
name
:
"MethaneUpgrade"
,
name
:
"MethaneUpgrade"
,
...
@@ -14,10 +20,18 @@ export default {
...
@@ -14,10 +20,18 @@ export default {
dateLevel
:
"year"
,
dateLevel
:
"year"
,
curTime
:
""
,
curTime
:
""
,
play
:
false
,
play
:
false
,
statusControlList
:
[
{
key
:
"small"
,
value
:
"小型沼气工程"
},
{
key
:
"middle"
,
value
:
"中型沼气工程"
},
{
key
:
"big"
,
value
:
"大型沼气工程"
},
{
key
:
"ExtraLarge"
,
value
:
"特大型沼气工程"
},
],
statusValue
:
"small"
,
};
};
},
},
components
:
{
components
:
{
MethaneMap
,
MethaneMap
,
StatusControl
,
},
},
methods
:
{
methods
:
{
showDatePicker
()
{
showDatePicker
()
{
...
@@ -36,6 +50,7 @@ export default {
...
@@ -36,6 +50,7 @@ export default {
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.methaneUpgrade {
.methaneUpgrade {
position: relative;
height: 100vh;
height: 100vh;
}
}
</
style
>
</
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