Skip to content

Commit 8c5c998

Browse files
committed
增加table事件版本兼容处理(freesaber)
1 parent 32fced0 commit 8c5c998

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Vol.Vue/src/components/basic/VolTable.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<div class="vol-table" :class="[textInline ? 'text-inline':'']">
3+
<div class="vol-table" :class="[textInline ? 'text-inline' : '']">
44
<div class="mask" v-show="loading"></div>
55
<div class="message" v-show="loading">加载中.....</div>
66
<el-table
@@ -572,7 +572,9 @@ export default {
572572
//2020.10.12修复结束编辑时,element table高版本属性获取不到的问题
573573
if (
574574
!this.columns.some(
575-
(x) => x.field == (event.property || column.property) && x.edit
575+
(x) =>
576+
x.field == ((event && event.property) || column.property) &&
577+
x.edit
576578
)
577579
) {
578580
if (this.rowEndEdit(row, event)) {
@@ -581,7 +583,7 @@ export default {
581583
}
582584
return;
583585
}
584-
if (this.rowEndEdit(row, event.propert ? event : column)) {
586+
if (this.rowEndEdit(row, event && event.property ? event : column)) {
585587
this.edit.rowIndex = -1;
586588
}
587589
}
@@ -1281,7 +1283,7 @@ export default {
12811283
padding: 5px 0 !important;
12821284
}
12831285
/* 2021.01.30修复火狐checkbox错位问题 */
1284-
.vol-table >>> .el-table-column--selection .cell{
1286+
.vol-table >>> .el-table-column--selection .cell {
12851287
display: inline;
12861288
}
12871289
.vol-table.text-inline >>> .el-table th > .cell {

开发版dev/Vue.NetCore/Vol.Vue/src/components/basic/VolTable.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<div class="vol-table" :class="[textInline ? 'text-inline':'']">
3+
<div class="vol-table" :class="[textInline ? 'text-inline' : '']">
44
<div class="mask" v-show="loading"></div>
55
<div class="message" v-show="loading">加载中.....</div>
66
<el-table
@@ -572,7 +572,9 @@ export default {
572572
//2020.10.12修复结束编辑时,element table高版本属性获取不到的问题
573573
if (
574574
!this.columns.some(
575-
(x) => x.field == (event.property || column.property) && x.edit
575+
(x) =>
576+
x.field == ((event && event.property) || column.property) &&
577+
x.edit
576578
)
577579
) {
578580
if (this.rowEndEdit(row, event)) {
@@ -581,7 +583,7 @@ export default {
581583
}
582584
return;
583585
}
584-
if (this.rowEndEdit(row, event.propert ? event : column)) {
586+
if (this.rowEndEdit(row, event && event.property ? event : column)) {
585587
this.edit.rowIndex = -1;
586588
}
587589
}
@@ -1281,7 +1283,7 @@ export default {
12811283
padding: 5px 0 !important;
12821284
}
12831285
/* 2021.01.30修复火狐checkbox错位问题 */
1284-
.vol-table >>> .el-table-column--selection .cell{
1286+
.vol-table >>> .el-table-column--selection .cell {
12851287
display: inline;
12861288
}
12871289
.vol-table.text-inline >>> .el-table th > .cell {

0 commit comments

Comments
 (0)