Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_vue
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
葛齐林
energyai_vue
Commits
ff418995
Commit
ff418995
authored
May 24, 2021
by
高超凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
列表组件支持行点击事件
parent
a6e685a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
tableList.vue
src/pages/components/tableList.vue
+9
-0
index.vue
src/pages/kb/indoor/index.vue
+4
-4
No files found.
src/pages/components/tableList.vue
View file @
ff418995
...
...
@@ -9,6 +9,7 @@
background: 'rgba(0, 151, 255, 0.08)',
color: '#333333'
}"
@current-change='handleCurrentChange'
>
<el-table-column
align=
"center"
label=
"序号"
width=
"100"
>
<template
slot-scope=
"scope"
>
...
...
@@ -85,6 +86,10 @@ export default {
currentMode
:
{
type
:
Number
,
default
:
null
},
// 行点击事件
currentChange
:{
type
:
Function
}
},
data
()
{
...
...
@@ -107,6 +112,10 @@ export default {
// 自然通风
return
'table-row-natural'
}
},
// 行点击事件
handleCurrentChange
(
data
){
this
.
currentChange
(
data
)
}
}
}
...
...
src/pages/kb/indoor/index.vue
View file @
ff418995
...
...
@@ -39,10 +39,10 @@ el-container(style="padding:0px;height:77.6vh;")
span.num(v-if="activeName == 1")
{{
hcdtSnqx
.
carbon_dioxide
}}
span.num(v-else)
{{
currentRow
.
carbon_dioxide
?
currentRow
.
carbon_dioxide
:
'-- '
}}
span.unit PPM
table-list(:tableColums='tableHeader' :tableData='dataList' :isShowOp="true" :opNum='4')
template(#operation=
'data'
)
el-button(type='text' size='small' @click="showParams(
scope.row
, 1)") 历史数据
el-button(type='text' size='small' @click="showParams(
scope.row
, 2)") 统计图表
table-list(:tableColums='tableHeader' :tableData='dataList' :isShowOp="true" :opNum='4'
:currentChange='handleCurrentChange'
)
template(#operation=
"data"
)
el-button(type='text' size='small' @click="showParams(
data.scope
, 1)") 历史数据
el-button(type='text' size='small' @click="showParams(
data.scope
, 2)") 统计图表
//- el-table(
//- size="mini",
//- :data="dataList",
...
...
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