update omi-elment-ui
This commit is contained in:
parent
27567d1cee
commit
7547a7d357
|
@ -1,8 +0,0 @@
|
|||
import { render } from 'omi'
|
||||
import './assets/index.css'
|
||||
import './elements/hello'
|
||||
import registerServiceWorker from './assets/register-service-worker'
|
||||
import store from './store/admin-store'
|
||||
|
||||
render(<hello-element />, '#root', store)
|
||||
registerServiceWorker()
|
|
@ -0,0 +1,5 @@
|
|||
import { render } from 'omi'
|
||||
import './assets/index.css'
|
||||
import './elements/button'
|
||||
|
||||
render(<my-app />, '#root')
|
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 236 B |
|
@ -1,10 +0,0 @@
|
|||
.hello{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.omi{
|
||||
width: 143px;
|
||||
height: 59px;
|
||||
margin: 0 auto;
|
||||
background-image: url(./omi.png);
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
import { tag, WeElement } from 'omi'
|
||||
import style from './_index.css'
|
||||
|
||||
@tag('hello-element')
|
||||
class HelloElement extends WeElement{
|
||||
static get data() {
|
||||
return { name: '' }
|
||||
}
|
||||
|
||||
installed(){
|
||||
setTimeout(()=>{
|
||||
this.store.data.name = 'Good Job!'
|
||||
},1000)
|
||||
}
|
||||
css(){
|
||||
return style
|
||||
}
|
||||
|
||||
render(props, data){
|
||||
return(
|
||||
<div class="hello">
|
||||
<h1> {data.name} </h1>
|
||||
<div> I am hello element.</div>
|
||||
<div class="omi"></div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB |
|
@ -1,8 +1,2 @@
|
|||
import { render } from 'omi'
|
||||
import './assets/index.css'
|
||||
import './elements/app'
|
||||
import registerServiceWorker from './assets/register-service-worker'
|
||||
import store from './store/app-store'
|
||||
|
||||
render(<my-app />, '#root', store)
|
||||
registerServiceWorker()
|
||||
//you can change this to debug your elemnts
|
||||
location.href = 'button.html'
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
export default {
|
||||
data: { name: 'I am admin page' },
|
||||
rename: function (name) {
|
||||
this.data.name = name
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue