delete template demo
This commit is contained in:
parent
d2d96b6f77
commit
27c624d7fa
|
@ -69,6 +69,10 @@ if using 'omi.lite.js' (without [mustache.js](https://github.com/janl/mustache.j
|
|||
* [https://unpkg.com/omi@1.0.3/dist/omi.lite.min.js](https://unpkg.com/omi@1.0.3/dist/omi.lite.min.js)
|
||||
* [https://unpkg.com/omi@1.0.3/dist/omi.lite.js](https://unpkg.com/omi@1.0.3/dist/omi.lite.js)
|
||||
|
||||
## Thanks
|
||||
|
||||
* [morphdom](https://github.com/patrick-steele-idem/morphdom)-Fast and lightweight DOM diffing/patching (no virtual DOM needed)
|
||||
|
||||
## 中文 | [English](https://github.com/AlloyTeam/omi#english--中文)
|
||||
|
||||
* 如果想体验一下Omi框架,可以访问 [Omi Playground](https://alloyteam.github.io/omi/example/playground/)
|
||||
|
@ -129,6 +133,10 @@ $ npm install omi
|
|||
* [https://unpkg.com/omi@1.0.3/dist/omi.lite.min.js](https://unpkg.com/omi@1.0.3/dist/omi.lite.min.js)
|
||||
* [https://unpkg.com/omi@1.0.3/dist/omi.lite.js](https://unpkg.com/omi@1.0.3/dist/omi.lite.js)
|
||||
|
||||
## 感谢
|
||||
|
||||
* [morphdom](https://github.com/patrick-steele-idem/morphdom)-Fast and lightweight DOM diffing/patching (no virtual DOM needed)
|
||||
|
||||
## Contributors
|
||||
|
||||
|name |avatars |company |
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,36 +0,0 @@
|
|||
import Omi from '../../src/index.js';
|
||||
|
||||
class Hello extends Omi.Component {
|
||||
constructor(data) {
|
||||
super(data);
|
||||
}
|
||||
style () {
|
||||
return `
|
||||
h1{
|
||||
cursor:pointer;
|
||||
}
|
||||
`;
|
||||
}
|
||||
handleClick(target, evt){
|
||||
alert(target.innerHTML);
|
||||
this.data.onXX();
|
||||
}
|
||||
render() {
|
||||
return `
|
||||
<div>
|
||||
{{{img}}}
|
||||
<h1 onclick={function(e){
|
||||
console.log(this)
|
||||
console.log(e)
|
||||
console.log('test \\' test "double quote"')
|
||||
console.log("test \\"")
|
||||
alert(e.type)
|
||||
}}>Hello, {{name}}!</h1>
|
||||
</div>
|
||||
`;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default Hello;
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head lang="en">
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lt IE 9]>
|
||||
<script type="text/javascript" crossorigin="anonymous" src="//s.url.cn/qqun/xiaoqu/buluo/p/js/es5-sham-es5-sham.min.77c4325f.js"></script><![endif]-->
|
||||
<div id="container"></div>
|
||||
<a href="https://github.com/AlloyTeam/omi" target="_blank" style="position: absolute; right: 0; top: 0;">
|
||||
<img src="../../asset/github.png" alt="" />
|
||||
</a>
|
||||
<script src="bundler.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,29 +0,0 @@
|
|||
import Hello from './hello.js';
|
||||
|
||||
|
||||
Omi.makeHTML('Hello', Hello);
|
||||
|
||||
class App extends Omi.Component {
|
||||
constructor(data) {
|
||||
super(data);
|
||||
}
|
||||
|
||||
SFDSF(){
|
||||
alert(3)
|
||||
}
|
||||
|
||||
render() {
|
||||
return `
|
||||
<div>
|
||||
<Hello data-name="Omi"
|
||||
data-img="<img src='http://images2015.cnblogs.com/blog/105416/201701/105416-20170120114244046-622856943.png' />"
|
||||
onXX="SFDSF"
|
||||
onXXX="SFDSdF"
|
||||
omi-id="aa" />
|
||||
</div>
|
||||
`;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Omi.render(new App(),"#container");
|
Loading…
Reference in New Issue