update readme

This commit is contained in:
张磊 2018-11-08 15:56:34 +08:00
parent 0a1b21ae64
commit 2a37a73738
1 changed files with 7 additions and 0 deletions

View File

@ -94,6 +94,13 @@ define('my-first-element', class extends WeElement {
render(<my-first-element name="world"></my-first-element>, 'body')
```
通过 props ,你可以透传 style 或者 class 给根节点,比如 [→ 这里] 透传 style:(https://github.com/Tencent/omi/commit/cdea37ca7a15d109718fcc3731d6fe6d1548ffab)
```jsx
<el-button onClick={this.onClick} style="color:red;">默认按钮1</el-button>
<el-button type="primary" style={{color:'red'}}>主要按钮</el-button>
```
### Event
```js