omi-transform v0.2.0
This commit is contained in:
parent
9b2543f10d
commit
8bbff50f51
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -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");
|
Loading…
Reference in New Issue