Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyoung committed Jun 24, 2019
1 parent 90d0208 commit 5d23553
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
9 changes: 6 additions & 3 deletions packages/table/src/table-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,12 @@ export default {
},

mounted() {
const { prop, order } = this.defaultSort;
const init = true;
this.store.commit('sort', { prop, order, init });
// nextTick 是有必要的 https://github.com/ElemeFE/element/pull/11311
this.$nextTick(() => {
const { prop, order } = this.defaultSort;
const init = true;
this.store.commit('sort', { prop, order, init });
});
},

beforeDestroy() {
Expand Down
5 changes: 0 additions & 5 deletions packages/table/src/table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -599,11 +599,6 @@
immediate: true,
handler(value) {
this.store.commit('setData', value);
// if (this.$ready) {
// this.$nextTick(() => {
// this.doLayout();
// });
// }
}
},
Expand Down

0 comments on commit 5d23553

Please sign in to comment.