update FAQ and README

pull/508/head
Leopoldthecoder 2016-10-18 17:05:39 +08:00 committed by cinwell.li
parent 2ec517505b
commit 9d46c428bb
2 changed files with 16 additions and 9 deletions

12
FAQ.md
View File

@ -7,6 +7,16 @@
<el-button @click.native="handleButtonClick">Click Me</el-button>
```
### 如何在 Table 组件的每一行添加操作该行数据的按钮?
使用 inline-template 即可:
```html
<el-table-column label="操作" inline-template>
<el-button @click.native="showDetail(row)">查看详情</el-button>
</el-table-column>
```
参数 `row` 即为对应行的数据。
### 你们的文档怎么偷偷更新了?
我们只会在 Element 发布新版本时同步更新文档,以体现最新的变化。详细的更新内容可以查看 [changelog](https://github.com/ElemeFE/element/blob/master/CHANGELOG.md)。
@ -28,7 +38,7 @@
### 将 Element 克隆至本地,运行时为何会报错/跑不起来?
首先,确保克隆的是 master 分支的最新代码,并且文件完整。其次,确保本地的 node 版本在 4.0 以上npm 版本在 3.0 以上。最后,请按照 README 的方法启动开发环境:
首先,确保克隆的是 master 分支的最新代码,并且文件完整。其次,确保本地的 node 版本在 4.0 以上npm 版本在 3.0 以上。最后,可以启动开发环境:
```bash
npm run dev

View File

@ -73,15 +73,9 @@ Vue.component(Button.name, Button)
Modern browsers and Internet Explorer 9+.
## Development
Recommend: node >= 4 npm >= 3
Skip this part if you just want to use Element.
```shell
# development => install packages -> build icon etc. -> run webpack
$ npm run dev
# build => build all component
$ npm run dist
```
For those who are interested in contributing to Element, please refer to our [contributing guide](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.md) to see how to run this project.
## Other links
- Starter Kit
@ -97,6 +91,9 @@ $ npm run dist
## Changelog
Detailed changes for each release are documented in the [release notes](https://github.com/ElemeFE/element/releases).
## FAQ
We have collected some [frequently asked questions](https://github.com/ElemeFE/element/blob/master/FAQ.md). Before reporting an issue, please search if the FAQ has the answer to your problem.
## Contribution
Please make sure to read the [Contributing Guide](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.md) before making a pull request.