update readme

This commit is contained in:
dntzhang 2019-01-07 18:49:59 +08:00
parent 5430d0c288
commit c3bd24981c
1 changed files with 38 additions and 1 deletions

View File

@ -2,11 +2,48 @@
> Omi ui.
Simple UI framework, compatible with omi and omio.
Simple UI framework, compatible with omi and omio(IE8+), using the design style of Wechat 7.0.
* [English Docs](https://tencent.github.io/omi/packages/omiu/examples/build/index.html)
* [中文文档](https://tencent.github.io/omi/packages/omiu/examples/build/zh-cn.html)
## Use it immediately
```
npm i omi-cli -g
omi init my-app
cd my-app
npm start
npm run build
```
> `npx omi-cli init my-app` is also supported(npm v5.2.0+).
## Use it in existing project
```js
npm i omiu
```
```js
import { WeElement, define, render } from 'omi'
import 'omiu/button'
define('my-app', class extends WeElement {
onClick = () => {
console.log('Hello omiu!');
}
render() {
return (
<o-button onClick={this.onClick}>I am button.</o-button>
)
}
})
render(<my-app />, 'body')
```
## Development
```bash