Commit 06f16f78 authored by qingwei.li's avatar qingwei.li

Table: render asynchronous data

parent 2d05bdea
...@@ -312,7 +312,6 @@ ...@@ -312,7 +312,6 @@
}, },
created() { created() {
this.tableData = this.data;
this.gridId = 'grid_' + gridIdSeed + '_'; this.gridId = 'grid_' + gridIdSeed + '_';
if (GUTTER_WIDTH === undefined) { if (GUTTER_WIDTH === undefined) {
...@@ -370,6 +369,10 @@ ...@@ -370,6 +369,10 @@
this.$calcHeight(value); this.$calcHeight(value);
}, },
data(val) {
this.tableData = val;
},
tableData(newVal) { tableData(newVal) {
this.doOnDataChange(newVal); this.doOnDataChange(newVal);
this.updateScrollInfo(); this.updateScrollInfo();
...@@ -408,14 +411,16 @@ ...@@ -408,14 +411,16 @@
this.updateScrollInfo(); this.updateScrollInfo();
if (this.fixedColumnCount > 0) { if (this.fixedColumnCount > 0) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.fixed.style.height = this.$el.clientHeight + 'px'; const style = this.$refs.fixed.style;
if (!style) return;
style.height = this.$el.clientHeight + 'px';
}); });
} }
}, },
data() { data() {
return { return {
tableData: [], tableData: this.data,
showHScrollBar: false, showHScrollBar: false,
showVScrollBar: false, showVScrollBar: false,
hoverRowIndex: null, hoverRowIndex: null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment