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

@ -31,7 +31,7 @@
return {
renderType: '',
uid: -1,
content: this.$parent.$parent.currentContent
context: this.$parent.$parent.currentContext
};
},
computed: {
@ -48,7 +48,7 @@
methods: {
compile () {
if (this.column.render) {
const $parent = this.content;
const $parent = this.context;
const template = this.column.render(this.row, this.column, this.index);
const cell = document.createElement('div');
cell.innerHTML = template;