Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- load: (vnode) => {
- m.request({method: "GET", url: apiHost+"game/"+vnode.attrs.game+"/"+vnode.attrs.catagory+"/"+vnode.attrs.func}).then( (res) => {
- vnode.state.doc = res
- console.log(vnode.state.doc)
- });
- },
- view: (vnode) => {
- return [
- m("div", {class: "list"}, vnode.state.functions.length ? vnode.state.functions.map((func) => {
- return m("ul", func.pretty, func.children.map(function( child ) {
- return m("li", m("a", {href: "#!/"+vnode.attrs.game+"/"+func.name+"/"+child.name}, child.name))
- }))
- }) : null),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement