add exp playground demo
This commit is contained in:
parent
a0a8ae5d62
commit
de45d067e7
|
@ -48,7 +48,7 @@
|
|||
}else if(type==='exp'){
|
||||
goto('http://alloyteam.github.io/omi/example/playground/index.html?code=class%20Hello%20extends%20Omi.Component%20%7B%0A%0A%20%20%20%20style%20()%20%7B%0A%20%20%20%20%20%20return%20%20%60%0A%20%20%20%20%20%20%20%20%20%20h1%7B%0A%20%20%20%20%20%20%20%20%20%20%09cursor%3Apointer%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%60%3B%0A%20%20%20%20%7D%0A%20%20%0A%20%20%20%20handleClick(evt)%7B%0A%20%20%20%20%20%20alert(evt.target.innerHTML)%3B%0A%20%20%20%20%7D%0A%20%20%0A%20%20%20%20render()%20%7B%0A%20%20%20%20%20%20return%20%20%60%0A%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%09%3Ch1%20onclick%3D%22handleClick%22%3E%7B%7Buser.name%7D%7D%20love%20%7B%7Buser.favorite%7D%7D.%3C%2Fh1%3E%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%09%09%60%3B%0A%0A%20%20%20%20%7D%0A%7D%0A%0AOmi.makeHTML(%27Hello%27%2C%20Hello)%3B%0A%0Aclass%20App%20extends%20Omi.Component%20%7B%0A%20%20%0A%20%20%20%20render()%20%7B%0A%20%20%20%20%20%20%20%20return%20%20%60%0A%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CHello%20%3Adata-user%3D%22%7B%20name%20%3A%20%27Dntzhang%27%2C%20favorite%20%3A%20%27Omi%27%20%7D%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%60%3B%0A%0A%20%20%20%20%7D%0A%7D%0A%0AOmi.render(new%20App()%2C%22%23container%22)%3B')
|
||||
}else if(type==='exp_arr'){
|
||||
goto('http://alloyteam.github.io/omi/example/playground/index.html?code=class%20Hello%20extends%20Omi.Component%20%7B%0A%20%20%0A%20%20%20%20handleClick(evt)%7B%0A%20%20%20%20%20%20alert(%20this.data.arrayTest%5B0%5D.name)%0A%20%20%20%20%7D%0A%20%20%0A%20%20%20%20render()%20%7B%0A%20%20%20%20%20%20return%20%20%60%0A%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%7B%7B%23arrayTest%7D%7D%0A%09%09%09%09%3Ch1%20onclick%3D%22handleClick%22%3E%7B%7Bname%7D%7D%3C%2Fh1%3E%0A%20%20%20%20%20%20%7B%7B%2FarrayTest%7D%7D%0A%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%09%09%60%3B%0A%0A%20%20%20%20%7D%0A%7D%0A%0AOmi.makeHTML(%27Hello%27%2C%20Hello)%3B%0A%0Aclass%20App%20extends%20Omi.Component%20%7B%0A%20%20%0A%20%20%20%20render()%20%7B%0A%20%20%20%20%20%20%20%20return%20%20%60%0A%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CHello%20%3Adata-array-test%3D%22%5B%7Bname%3A%27dntzhang%27%7D%2C%7Bname%3A%27omi%27%7D%2C%7Bname%3A%27AlloyTeam%27%7D%5D%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%60%3B%0A%0A%20%20%20%20%7D%0A%7D%0A%0AOmi.render(new%20App()%2C%22%23container%22)%3B')
|
||||
goto('http://alloyteam.github.io/omi/example/playground/index.html?code=class%20Hello%20extends%20Omi.Component%20%7B%0A%20%20%0A%20%20%20%20handleClick(evt)%7B%0A%20%20%20%20%20%20alert(%20this.data.arrayTest%5B0%5D.name)%0A%20%20%20%20%7D%0A%20%20%0A%20%20%20%20render()%20%7B%0A%20%20%20%20%20%20return%20%20%60%0A%20%20%20%20%20%20%3Cul%3E%0A%20%20%20%20%20%20%7B%7B%23arrayTest%7D%7D%0A%09%09%09%09%3Cli%20onclick%3D%22handleClick%22%3E%7B%7Bname%7D%7D%3C%2Fli%3E%0A%20%20%20%20%20%20%7B%7B%2FarrayTest%7D%7D%0A%20%20%20%20%20%20%3C%2Ful%3E%0A%20%20%09%09%60%3B%0A%0A%20%20%20%20%7D%0A%7D%0A%0AOmi.makeHTML(%27Hello%27%2C%20Hello)%3B%0A%0Aclass%20App%20extends%20Omi.Component%20%7B%0A%20%20%0A%20%20%20%20render()%20%7B%0A%20%20%20%20%20%20%20%20return%20%20%60%0A%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CHello%20%3Adata-array-test%3D%22%5B%7Bname%3A%27dntzhang%27%7D%2C%7Bname%3A%27omi%27%7D%2C%7Bname%3A%27AlloyTeam%27%7D%5D%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2Fdiv%3E%0A%20%20%20%20%20%20%20%20%60%3B%0A%0A%20%20%20%20%7D%0A%7D%0A%0AOmi.render(new%20App()%2C%22%23container%22)%3B%20')
|
||||
}else{
|
||||
goto('http://alloyteam.github.io/omi/example/playground/index.html');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue