update omi-elment-ui

This commit is contained in:
dntzhang 2018-10-23 06:56:40 +08:00
parent 27567d1cee
commit 7547a7d357
10 changed files with 7 additions and 61 deletions

View File

@ -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()

View File

@ -0,0 +1,5 @@
import { render } from 'omi'
import './assets/index.css'
import './elements/button'
render(<my-app />, '#root')

View File

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

View File

@ -1,10 +0,0 @@
.hello{
text-align: center;
}
.omi{
width: 143px;
height: 59px;
margin: 0 auto;
background-image: url(./omi.png);
}

View File

@ -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

View File

@ -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'

View File

@ -1,7 +0,0 @@
export default {
data: { name: 'I am admin page' },
rename: function (name) {
this.data.name = name
}
}