Table support render local component #775

This commit is contained in:
梁灏 2017-04-27 15:29:05 +08:00
parent 01b8d340c5
commit 64f99c05bb
3 changed files with 47 additions and 64 deletions

View file

@ -63,13 +63,21 @@
});
const res = Vue.compile(cell.outerHTML);
// todo
// 使 component
const components = {};
Object.getOwnPropertyNames($parent.$options.components).forEach(item => {
components[item] = $parent.$options.components[item];
});
const component = new Vue({
render: res.render,
staticRenderFns: res.staticRenderFns,
methods: methods,
data () {
return $parent._data;
}
},
components: components
});
component.row = this.row;
component.column = this.column;