Commit 8f69e63c776e1bb583b775078c3dd13b4c1dd8d4
Committed by
GitHub

1 parent
13a940ee
修正table render的组件中无法获取this.$store的问题
在table的render中生成的组件,组件内部无法通过this.$store来获取vuex对象
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
src/components/table/cell.vue
@@ -96,6 +96,9 @@ | @@ -96,6 +96,9 @@ | ||
96 | }, | 96 | }, |
97 | components: components | 97 | components: components |
98 | }); | 98 | }); |
99 | + if ($parent.$store != undefined) { | ||
100 | + component.$store = $parent.$store; | ||
101 | + } | ||
99 | component.row = this.row; | 102 | component.row = this.row; |
100 | component.column = this.column; | 103 | component.column = this.column; |
101 | 104 |