Skip to content

Commit 8cfea61

Browse files
author
黄书伟
committed
deep watch
1 parent d50cab3 commit 8cfea61

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

libs/v-table/src/table.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -797,14 +797,20 @@
797797
watch: {
798798
799799
// 重新跟新列信息
800-
'columns': function (newVal) {
800+
'columns': {
801+
handler:function (newVal) {
801802
802-
this.initColumns();
803+
this.initColumns();
804+
},
805+
deep: true
803806
},
804807
// 重新覆盖复杂表头信息
805-
'titleRows': function (newVal) {
808+
'titleRows': {
809+
handler:function (newVal) {
806810
807-
this.initColumns();
811+
this.initColumns();
812+
},
813+
deep: true
808814
},
809815
810816
// deep watch

packages/v-table/src/table.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -797,14 +797,20 @@
797797
watch: {
798798
799799
// 重新跟新列信息
800-
'columns': function (newVal) {
800+
'columns': {
801+
handler:function (newVal) {
801802
802-
this.initColumns();
803+
this.initColumns();
804+
},
805+
deep: true
803806
},
804807
// 重新覆盖复杂表头信息
805-
'titleRows': function (newVal) {
808+
'titleRows': {
809+
handler:function (newVal) {
806810
807-
this.initColumns();
811+
this.initColumns();
812+
},
813+
deep: true
808814
},
809815
810816
// deep watch

0 commit comments

Comments
 (0)