refactoring, fix reverse breadcrumb

This commit is contained in:
2018-05-16 17:35:27 +02:00
parent 1acf235179
commit 0884c61123
7 changed files with 12228 additions and 80 deletions
+12 -1
View File
@@ -249,6 +249,7 @@ var _Child = {
// dottype:null,
// // nested:false,
// text:'',
childs:[],
oninit(vn){
// // console.log('vn.attrs', vn.attrs);
// this.id = vn.attrs.id;
@@ -265,7 +266,17 @@ var _Child = {
},
view(vn){
// return m(_Dot, {"id":this.id, 'text':this.text, 'type':this.type, 'dottype':this.dottype});
return m(_Dot, vn.attrs);
// if (typeof vn.attrs.childs === 'undefined'){
// debugger;
// }
return [
m(_Dot, vn.attrs),
// add children
typeof vn.attrs.childs !== 'undefined'
? vn.attrs.childs.map(c => { return m(_Child, c); })
: null
];
}
};