refactoring, fix reverse breadcrumb
This commit is contained in:
@@ -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
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user