omi-transform v0.2.0

This commit is contained in:
dntzhang 2017-04-05 10:08:58 +08:00
parent 9b2543f10d
commit 8bbff50f51
3 changed files with 2442 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,44 @@
import Omi from 'omi';
import OmiTransform from '../../omi-transform.js';
OmiTransform.init();
class App extends Omi.Component {
constructor(data) {
super(data);
this.rotateZ = 45;
}
installed(){
setInterval(() =>{
//sync for update
this.rotateZ = this.refs.test.rotateZ += 0.1;
});
}
render() {
return `
<div omi-transform class="test" ref="test" rotateZ="${this.rotateZ}" translateX="100" perspective="400" >
omi-transform
</div>
`;
}
style(){
return `
.test{
font-size: 20px;
border: 1px solid red;
width: 150px;
font-size
min-height: 150px;
text-align: center;
line-height:150px;
}
`;
}
}
Omi.render(new App(),"#container");