Table prop: content modify to context

Table prop: content modify to context
This commit is contained in:
梁灏 2017-03-17 09:50:11 +08:00
parent 02ece5df26
commit d8892603f7
2 changed files with 5 additions and 5 deletions

View file

@ -142,7 +142,7 @@
return '';
}
},
content: {
context: {
type: Object
},
noDataText: {
@ -173,7 +173,7 @@
bodyHeight: 0,
bodyRealHeight: 0,
scrollBarWidth: getScrollBarSize(),
currentContent: this.content,
currentContext: this.context,
cloneData: deepCopy(this.data) // when Cell has a button to delete row data, clickCurrentRow will throw an error, so clone a data
};
},
@ -644,7 +644,7 @@
}
},
created () {
if (!this.content) this.currentContent = this.$parent;
if (!this.context) this.currentContext = this.$parent;
this.showSlotHeader = this.$refs.title !== undefined;
this.showSlotFooter = this.$refs.footer !== undefined;
this.rebuildData = this.makeDataWithSortAndFilter();