File tree 2 files changed +37
-7
lines changed
2 files changed +37
-7
lines changed Original file line number Diff line number Diff line change 6
6
<el-breadcrumb-item >基础表格</el-breadcrumb-item >
7
7
</el-breadcrumb >
8
8
</div >
9
-
10
- <el-table :data =" tableData" border style =" width : 100% " >
9
+ <div class =" handle-box" >
10
+ <el-button class =" handle-del mr10" >批量删除</el-button >
11
+ <el-select v-model =" select_cate" placeholder =" 筛选省份" class =" handle-select mr10" >
12
+ <el-option key =" 1" label =" 广东省" value =" 1" ></el-option >
13
+ <el-option key =" 2" label =" 湖南省" value =" 2" ></el-option >
14
+ </el-select >
15
+ <el-input v-model =" select_word" placeholder =" 筛选关键词" class =" handle-input mr10" ></el-input >
16
+ <el-button type =" primary" icon =" search" >搜索</el-button >
17
+ </div >
18
+ <el-table :data =" tableData" border style =" width : 100% " ref =" multipleTable" @selection-change =" handleSelectionChange" >
19
+ <el-table-column type =" selection" width =" 55" ></el-table-column >
11
20
<el-table-column prop =" date" label =" 日期" sortable width =" 150" >
12
21
</el-table-column >
13
22
<el-table-column prop =" name" label =" 姓名" width =" 120" >
39
48
return {
40
49
url: ' ../../../static/vuetable.json' ,
41
50
tableData: [],
42
- cur_page: 1
51
+ cur_page: 1 ,
52
+ multipleSelection: [],
53
+ select_cate: ' ' ,
54
+ select_word: ' '
43
55
}
44
56
},
45
57
created (){
70
82
},
71
83
handleDelete (index , row ) {
72
84
this .$message .error (' 删除第' + (index+ 1 )+ ' 行' );
85
+ },
86
+ handleSelectionChange : function (val ) {
87
+ this .multipleSelection = val;
73
88
}
74
89
}
75
90
}
76
- </script >
91
+ </script >
92
+
93
+ <style scoped>
94
+ .handle-box {
95
+ margin-bottom : 20px ;
96
+ }
97
+ .handle-del {
98
+ border-color : #bfcbd9 ;
99
+ color : #999 ;
100
+ }
101
+ .handle-select {
102
+ width : 120px ;
103
+ }
104
+ .handle-input {
105
+ width : 300px ;
106
+ display : inline-block ;
107
+ }
108
+ </style >
Original file line number Diff line number Diff line change @@ -34,9 +34,7 @@ a{text-decoration: none}
34
34
.el-button + .el-tooltip {
35
35
margin-left : 10px ;
36
36
}
37
- .el-table td , .el-table th {
38
- padding : 5px 18px ;
39
- }
37
+
40
38
.el-table tr : hover {
41
39
background : # f6faff ;
42
40
}
You can’t perform that action at this time.
0 commit comments