app
UI App
Example:
const app = new mdw.App({
element: document.body,
template: [{
layout: 4,
module: mdw.Tree,
opts: {
templatekey: 'name',
template: {
Bob: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
},
Marley: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
},
John: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
}
},
data: [{
id: 1,
name: 'Bob'
}, {
id: 2,
name: 'Marley',
parent: 1
}, {
id: 3,
name: 'John',
parent: 2
}]
}
}, {
layout: 4,
module: mdw.Tree,
opts: {
templatekey: 'name',
template: {
Bob: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
},
Marley: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
},
John: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
}
},
data: [{
id: 1,
name: 'Bob'
}, {
id: 2,
name: 'Marley',
parent: 1
}, {
id: 3,
name: 'John',
parent: 2
}]
}
}, {
layout: 4,
module: mdw.Tree,
opts: {
templatekey: 'name',
template: {
Bob: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
},
Marley: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
},
John: {
module: mdw.Checkbox,
opts: {
text: 'Name'
}
}
},
data: [{
id: 1,
name: 'Bob'
}, {
id: 2,
name: 'Marley',
parent: 1
}, {
id: 3,
name: 'John',
parent: 2
}]
}
}]
})
Constructor Summary
Public Constructor | ||
public |
constructor(options: object): void constructor |
Member Summary
Public Members | ||
public |
body: {} |
|
public set |
set data |
|
public get |
data: * |
|
public set |
set data |