diff --git a/CONTRIBUTING.es.md b/.github/CONTRIBUTING.es.md similarity index 100% rename from CONTRIBUTING.es.md rename to .github/CONTRIBUTING.es.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 52754b56..239cdb19 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@ Please make sure these boxes are checked before submitting your PR, thank you! -* [ ] Make sure you follow Element's contributing guide ([中文](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.zh-CN.md) | [English](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.en-US.md)). +* [ ] Make sure you follow Element's contributing guide ([中文](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.zh-CN.md) | [English](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.en-US.md) | [Español](https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.es.md)). * [ ] Make sure you are merging your commits to `dev` branch. * [ ] Add some descriptions and refer relative issues for you PR. diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index d89f95ae..7a2b01ff 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,5 +1,16 @@ ## Changelog +### 2.0.6 + +*2017-11-29* + +- Fixed style bug of Table's sorting icons, #8405 +- Fixed trigger mechanism for Popover when its `trigger` is manual, #8467 +- Added `prefix-icon` and `suffix-icon` attributes for Autocomplete, #8446 (by @liyanlong) +- Added `separator` attribute for Cascader, #8501 +- Added `clearable` attribute for Input, #8509 (by @lbogdan) +- Added `background` attribute for Pagination, #8553 + ### 2.0.5 *2017-11-17* diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 770e9b92..5e702b95 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -1,5 +1,16 @@ ## 更新日志 +### 2.0.6 + +*2017-11-29* + +- 修复 Table 排序图标的样式问题,#8405 +- 修复 `trigger` 为 manual 的 Popover 的触发问题,#8467 +- 新增 Autocomplete 的 `prefix-icon` 和 `suffix-icon` 属性,#8446(by @liyanlong) +- 新增 Cascader 的 `separator` 属性,#8501 +- 新增 Input 的 `clearable` 属性,#8509(by @lbogdan) +- 新增 Pagination 的 `background` 属性,#8553 + ### 2.0.5 *2017-11-17* diff --git a/FAQ-zh-en-es.md b/FAQ-zh-en-es.md deleted file mode 100644 index e5257e0b..00000000 --- a/FAQ-zh-en-es.md +++ /dev/null @@ -1,218 +0,0 @@ -## 常见问题 - -
-给组件绑定的事件为什么无法触发? - -在 Vue 2.0 中,为**自定义**组件绑定**原生**事件必须使用 `.native` 修饰符: -```html -Click Me -``` - -从易用性的角度出发,我们对 `Button` 组件进行了处理,使它可以监听 `click` 事件: -```html -Click Me -``` - -但是对于其他组件,还是需要添加 `.native` 修饰符。 -
- -
-如何在 Table 组件的每一行添加操作该行数据的按钮? - -使用 [Scoped slot](https://vuejs.org/v2/guide/components.html#Scoped-Slots) 即可: -```html - - - -``` -参数 `row` 即为对应行的数据。 -
- -
-Tree 组件的 `render-content` 和 Table 组件的 `render-header` 怎么用? - -请阅读 Vue 文档 [Render Function](http://vuejs.org/v2/guide/render-function.html) 的相关内容。注意,使用 JSX 来写 Render Function 的话,需要安装 `babel-plugin-transform-vue-jsx`,并参照其[文档](https://github.com/vuejs/babel-plugin-transform-vue-jsx)进行配置。 -
- -
-所有组件的任意属性都支持 `.sync` 修饰符吗? - -不是。对于支持 `.sync` 修饰符的属性,我们会在文档的 API 表格中注明。更多 `.sync` 的用法请查看 [Vue 文档](https://vuejs.org/v2/guide/components.html#sync-Modifier)。 -
- -
-你们的文档怎么偷偷更新了? - -我们只会在 Element 发布新版本时同步更新文档,以体现最新的变化。详细的更新内容可以查看 [changelog](https://github.com/ElemeFE/element/blob/master/CHANGELOG.zh-CN.md)。 -
- -
-在项目中引入 Element,但是 CSS 报错/字体文件报错/组件没有样式是什么原因? - -请参考我们提供的 [starter kit](https://github.com/ElementUI/element-starter),在 webpack 的 loaders 中正确配置 file-loader、css-loader 和 style-loader。此外,我们还提供了基于 [cooking](https://github.com/ElementUI/element-cooking-starter) 和 [laravel](https://github.com/ElementUI/element-in-laravel-starter) 的项目模板。 -
- -
-将 Element 克隆至本地,运行时为何会报错/跑不起来? - -首先,确保克隆的是 master 分支的最新代码,并且文件完整。其次,确保本地的 node 版本在 4.0 以上,npm 版本在 3.0 以上。最后,可以启动开发环境: - -```bash -npm run dev -``` - -或是直接打包: - -```bash -npm run dist -``` -
- -## FAQ - -
-Why are my event listeners not working? - -In Vue 2.0, adding **native** event handlers in **custom** components requires a `.native` modifier: -```html -Click Me -``` - -For the sake of usability, we processed `Button` so it can listen to `click` events: -```html -Click Me -``` - -For other components, the `.native` modifier is still mandatory. -
- -
-How do I add buttons in each row of Table to operate data of that row? - -Just use [Scoped slot](https://vuejs.org/v2/guide/components.html#Scoped-Slots): -```html - - - -``` -The parameter `row` is the data object of corresponding row. -
- -
-How do `render-content` of Tree and `render-header` of Table work? - -Please refer to [Render Function](http://vuejs.org/v2/guide/render-function.html) in Vue's documentation. In addition, if you are writing render functions with JSX, `babel-plugin-transform-vue-jsx` is required. See [here](https://github.com/vuejs/babel-plugin-transform-vue-jsx) for its configurations. -
- -
-Can I use `.sync` modifier on every attribute? - -No, only a few attributes supports the `.sync` modifier, and we have explicitly marked them on the documentation's API table. For more information about `.sync`, please refer to [Vue documentation](https://vuejs.org/v2/guide/components.html#sync-Modifier). -
- -
-When do you update documentations of Element? - -We update documentations only when a new version of Element is published so that it reflects all the changes introduced in that version. Updated changed can be found in the [changelog](https://github.com/ElemeFE/element/blob/master/CHANGELOG.en-US.md)。 -
- -
-I imported Element in my project, but why does it report CSS error/font file error/components have no style? - -Please refer to our [starter kit](https://github.com/ElementUI/element-starter) and correctly configure file-loader, css-loader and style-loader in webpack config file. Besides, we also provide templated based on [cooking](https://github.com/ElementUI/element-cooking-starter) and [laravel](https://github.com/ElementUI/element-in-laravel-starter). -
- -
-I cloned Element's repo, but failed to run it. How do I solve it? - -First, please make sure to clone the latest code in master branch and cloned files are intact. Then, note that the version of Nodejs should be 4.0+ and npm 3.0+. Finally, activate development: - -```bash -npm run dev -``` - -or build it: - -```bash -npm run dist -``` -
- -## Preguntas más frecuentes - -
-¿Porque mis receptores de eventos no funcionan? - -En Vue 2.0, agregando **nativos** receptores de evento **a medida** componentes requiere el modificador `.native`: -``` -html -Haga Clic Aquí -``` - -Para conveniencia, hemos ya procesado eventos para el componente `Button` para que el interfaz sea consistente con `clic` eventos de otros componentes: - -```html -Haga Clic Aquí -``` - -Para otros componentes el uso del modificador `.native` sigue siendo obligatorio. -
- -
-¿Como agrego botones en cada linea de una tabla para que operen en los datos de esa linea? - -Simplemente agregue [“Scoped slot”](https://vuejs.org/v2/guide/components.html#Scoped-Slots): -```html - - - -``` -El parámetro `row` contiene los datos de la linea correspondiente de la tabla. -
- -
-¿Como funcionan `render-content` de `Tree` y `render-header` de `Table`? - -Por favor refiérase a [Función de representación](http://vuejs.org/v2/guide/render-function.html) en la documentación de `Vue`. Adicionalmente, sí usted está escribiendo funciones de representar con JSX, se requiere el componente `babel-plugin-transform-vue-jsx`. Más información [aquí](https://github.com/vuejs/babel-plugin-transform-vue-jsx) para su uso y configuración. -
- -
-¿Puedo usar el modificador `.sync` con cada atributo? - -No, solamente un grupo pequeño de atributos apoyan el modificador `.sync`, y están anotados claramente en la documentación del IPA. Para información adicional sobre `.sync`, por favor refiérase a [documentación de Vue](https://vuejs.org/v2/guide/components.html#sync-Modifier). -
- -
-¿Cuando añaden a la documentación de `Element`? - -Añadamos la documentación con cada versión nueva de `Element` y los cambios reflejan los cambios del software de esa versión. Los cambios actuales y históricos se encuentran [aquí](https://github.com/ElemeFE/element/blob/master/CHANGELOG.en-US.md). -
- -
-¿Importé `Element` a mi proyecto pero tengo errores con `CSS` y/o fuentes y mis componentes no tienen ningún estilo? - -Refiérase a [nuestro ‘kit’ de inicio](https://github.com/ElementUI/element-starter) y configure correctamente `file-loader`, `css-loader` y `style-loader` en el archivo `webpack config`. Además, proveemos un ejemplar para [cooking](https://github.com/ElementUI/element-cooking-starter) y para [laravel](https://github.com/ElementUI/element-in-laravel-starter). -
- -
-Hice un clon del repositorio de `Element` pero no arranca. ¿Como lo resuelvo? - -Primero, pro favor, asegúrese de usar la versión más corriente en la rama `master` y que los archivos están en orden. Después, revise sí la versión de `Nodejs` es 4.0+ y `npm` debe ser 3.0+. Finalmente active el modo desarrollo: - -```bash -npm run dev -``` - -O arme su aplicación así: - -```bash -npm run dist -``` -
- diff --git a/FAQ.md b/FAQ.md index ab54450a..841d7f01 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,143 +1,217 @@ ## 常见问题
-给组件绑定的事件为什么无法触发? - -在 Vue 2.0 中,为**自定义**组件绑定**原生**事件必须使用 `.native` 修饰符: -```html -Click Me -``` - -从易用性的角度出发,我们对 `Button` 组件进行了处理,使它可以监听 `click` 事件: -```html -Click Me -``` - -但是对于其他组件,还是需要添加 `.native` 修饰符。 -
- -
-如何在 Table 组件的每一行添加操作该行数据的按钮? - -使用 [Scoped slot](https://vuejs.org/v2/guide/components.html#Scoped-Slots) 即可: -```html - - - -``` -参数 `row` 即为对应行的数据。 -
- -
-Tree 组件的 `render-content` 和 Table 组件的 `render-header` 怎么用? - -请阅读 Vue 文档 [Render Function](http://vuejs.org/v2/guide/render-function.html) 的相关内容。注意,使用 JSX 来写 Render Function 的话,需要安装 `babel-plugin-transform-vue-jsx`,并参照其[文档](https://github.com/vuejs/babel-plugin-transform-vue-jsx)进行配置。 -
- -
-所有组件的任意属性都支持 `.sync` 修饰符吗? + 给组件绑定的事件为什么无法触发? -不是。对于支持 `.sync` 修饰符的属性,我们会在文档的 API 表格中注明。更多 `.sync` 的用法请查看 [Vue 文档](https://vuejs.org/v2/guide/components.html#sync-Modifier)。 + 在 Vue 2.0 中,为**自定义**组件绑定**原生**事件必须使用 `.native` 修饰符: + ```html + Click Me + ``` + + 从易用性的角度出发,我们对 `Button` 组件进行了处理,使它可以监听 `click` 事件: + ```html + Click Me + ``` + + 但是对于其他组件,还是需要添加 `.native` 修饰符。
-你们的文档怎么偷偷更新了? - -我们只会在 Element 发布新版本时同步更新文档,以体现最新的变化。详细的更新内容可以查看 [changelog](https://github.com/ElemeFE/element/blob/master/CHANGELOG.zh-CN.md)。 + 如何在 Table 组件的每一行添加操作该行数据的按钮? + + 使用 [Scoped slot](https://vuejs.org/v2/guide/components.html#Scoped-Slots) 即可: + ```html + + + + ``` + 参数 `row` 即为对应行的数据。
-在项目中引入 Element,但是 CSS 报错/字体文件报错/组件没有样式是什么原因? - -请参考我们提供的 [starter kit](https://github.com/ElementUI/element-starter),在 webpack 的 loaders 中正确配置 file-loader、css-loader 和 style-loader。此外,我们还提供了基于 [cooking](https://github.com/ElementUI/element-cooking-starter) 和 [laravel](https://github.com/ElementUI/element-in-laravel-starter) 的项目模板。 + Tree 组件的 `render-content` 和 Table 组件的 `render-header` 怎么用? + + 请阅读 Vue 文档 [Render Function](http://vuejs.org/v2/guide/render-function.html) 的相关内容。注意,使用 JSX 来写 Render Function 的话,需要安装 `babel-plugin-transform-vue-jsx`,并参照其[文档](https://github.com/vuejs/babel-plugin-transform-vue-jsx)进行配置。
-将 Element 克隆至本地,运行时为何会报错/跑不起来? + 所有组件的任意属性都支持 `.sync` 修饰符吗? + + 不是。对于支持 `.sync` 修饰符的属性,我们会在文档的 API 表格中注明。更多 `.sync` 的用法请查看 [Vue 文档](https://vuejs.org/v2/guide/components.html#sync-Modifier)。 +
-首先,确保克隆的是 master 分支的最新代码,并且文件完整。其次,确保本地的 node 版本在 4.0 以上,npm 版本在 3.0 以上。最后,可以启动开发环境: +
+ 你们的文档怎么偷偷更新了? + + 我们只会在 Element 发布新版本时同步更新文档,以体现最新的变化。详细的更新内容可以查看 [changelog](https://github.com/ElemeFE/element/blob/master/CHANGELOG.zh-CN.md)。 +
-```bash -npm run dev -``` +
+ 在项目中引入 Element,但是 CSS 报错/字体文件报错/组件没有样式是什么原因? + + 请参考我们提供的 [starter kit](https://github.com/ElementUI/element-starter),在 webpack 的 loaders 中正确配置 file-loader、css-loader 和 style-loader。此外,我们还提供了基于 [cooking](https://github.com/ElementUI/element-cooking-starter) 和 [laravel](https://github.com/ElementUI/element-in-laravel-starter) 的项目模板。 +
-或是直接打包: - -```bash -npm run dist -``` +
+ 将 Element 克隆至本地,运行时为何会报错/跑不起来? + + 首先,确保克隆的是 master 分支的最新代码,并且文件完整。其次,确保本地的 node 版本在 4.0 以上,npm 版本在 3.0 以上。最后,可以启动开发环境: + + ```bash + npm run dev + ``` + + 或是直接打包: + + ```bash + npm run dist + ```
## FAQ
-Why are my event listeners not working? - -In Vue 2.0, adding **native** event handlers in **custom** components requires a `.native` modifier: -```html -Click Me -``` - -For the sake of usability, we processed `Button` so it can listen to `click` events: -```html -Click Me -``` - -For other components, the `.native` modifier is still mandatory. -
- -
-How do I add buttons in each row of Table to operate data of that row? - -Just use [Scoped slot](https://vuejs.org/v2/guide/components.html#Scoped-Slots): -```html - - - -``` -The parameter `row` is the data object of corresponding row. -
- -
-How do `render-content` of Tree and `render-header` of Table work? - -Please refer to [Render Function](http://vuejs.org/v2/guide/render-function.html) in Vue's documentation. In addition, if you are writing render functions with JSX, `babel-plugin-transform-vue-jsx` is required. See [here](https://github.com/vuejs/babel-plugin-transform-vue-jsx) for its configurations. -
- -
-Can I use `.sync` modifier on every attribute? + Why are my event listeners not working? -No, only a few attributes supports the `.sync` modifier, and we have explicitly marked them on the documentation's API table. For more information about `.sync`, please refer to [Vue documentation](https://vuejs.org/v2/guide/components.html#sync-Modifier). + In Vue 2.0, adding **native** event handlers in **custom** components requires a `.native` modifier: + ```html + Click Me + ``` + + For the sake of usability, we processed `Button` so it can listen to `click` events: + ```html + Click Me + ``` + + For other components, the `.native` modifier is still mandatory.
-When do you update documentations of Element? - -We update documentations only when a new version of Element is published so that it reflects all the changes introduced in that version. Updated changed can be found in the [changelog](https://github.com/ElemeFE/element/blob/master/CHANGELOG.en-US.md)。 + How do I add buttons in each row of Table to operate data of that row? + + Just use [Scoped slot](https://vuejs.org/v2/guide/components.html#Scoped-Slots): + ```html + + + + ``` + The parameter `row` is the data object of corresponding row.
-I imported Element in my project, but why does it report CSS error/font file error/components have no style? - -Please refer to our [starter kit](https://github.com/ElementUI/element-starter) and correctly configure file-loader, css-loader and style-loader in webpack config file. Besides, we also provide templated based on [cooking](https://github.com/ElementUI/element-cooking-starter) and [laravel](https://github.com/ElementUI/element-in-laravel-starter). + How do `render-content` of Tree and `render-header` of Table work? + + Please refer to [Render Function](http://vuejs.org/v2/guide/render-function.html) in Vue's documentation. In addition, if you are writing render functions with JSX, `babel-plugin-transform-vue-jsx` is required. See [here](https://github.com/vuejs/babel-plugin-transform-vue-jsx) for its configurations.
-I cloned Element's repo, but failed to run it. How do I solve it? - -First, please make sure to clone the latest code in master branch and cloned files are intact. Then, note that the version of Nodejs should be 4.0+ and npm 3.0+. Finally, activate development: - -```bash -npm run dev -``` - -or build it: - -```bash -npm run dist -``` + Can I use `.sync` modifier on every attribute? + + No, only a few attributes supports the `.sync` modifier, and we have explicitly marked them on the documentation's API table. For more information about `.sync`, please refer to [Vue documentation](https://vuejs.org/v2/guide/components.html#sync-Modifier). +
+ +
+ When do you update documentations of Element? + + We update documentations only when a new version of Element is published so that it reflects all the changes introduced in that version. Updated changed can be found in the [changelog](https://github.com/ElemeFE/element/blob/master/CHANGELOG.en-US.md)。 +
+ +
+ I imported Element in my project, but why does it report CSS error/font file error/components have no style? + + Please refer to our [starter kit](https://github.com/ElementUI/element-starter) and correctly configure file-loader, css-loader and style-loader in webpack config file. Besides, we also provide templated based on [cooking](https://github.com/ElementUI/element-cooking-starter) and [laravel](https://github.com/ElementUI/element-in-laravel-starter). +
+ +
+ I cloned Element's repo, but failed to run it. How do I solve it? + + First, please make sure to clone the latest code in master branch and cloned files are intact. Then, note that the version of Nodejs should be 4.0+ and npm 3.0+. Finally, activate development: + + ```bash + npm run dev + ``` + + or build it: + + ```bash + npm run dist + ``` +
+ +## Preguntas más frecuentes + +
+ ¿Porque mis receptores de eventos no funcionan? + + En Vue 2.0, agregando **nativos** receptores de evento **a medida** componentes requiere el modificador `.native`: + ``` + html + Haga Clic Aquí + ``` + + Para conveniencia, hemos ya procesado eventos para el componente `Button` para que el interfaz sea consistente con `clic` eventos de otros componentes: + + ```html + Haga Clic Aquí + ``` + + Para otros componentes el uso del modificador `.native` sigue siendo obligatorio. +
+ +
+ ¿Como agrego botones en cada linea de una tabla para que operen en los datos de esa linea? + + Simplemente agregue [“Scoped slot”](https://vuejs.org/v2/guide/components.html#Scoped-Slots): + ```html + + + + ``` + El parámetro `row` contiene los datos de la linea correspondiente de la tabla. +
+ +
+ ¿Como funcionan `render-content` de `Tree` y `render-header` de `Table`? + + Por favor refiérase a [Función de representación](http://vuejs.org/v2/guide/render-function.html) en la documentación de `Vue`. Adicionalmente, sí usted está escribiendo funciones de representar con JSX, se requiere el componente `babel-plugin-transform-vue-jsx`. Más información [aquí](https://github.com/vuejs/babel-plugin-transform-vue-jsx) para su uso y configuración. +
+ +
+ ¿Puedo usar el modificador `.sync` con cada atributo? + + No, solamente un grupo pequeño de atributos apoyan el modificador `.sync`, y están anotados claramente en la documentación del IPA. Para información adicional sobre `.sync`, por favor refiérase a [documentación de Vue](https://vuejs.org/v2/guide/components.html#sync-Modifier). +
+ +
+ ¿Cuando añaden a la documentación de `Element`? + + Añadamos la documentación con cada versión nueva de `Element` y los cambios reflejan los cambios del software de esa versión. Los cambios actuales y históricos se encuentran [aquí](https://github.com/ElemeFE/element/blob/master/CHANGELOG.en-US.md). +
+ +
+ ¿Importé `Element` a mi proyecto pero tengo errores con `CSS` y/o fuentes y mis componentes no tienen ningún estilo? + + Refiérase a [nuestro ‘kit’ de inicio](https://github.com/ElementUI/element-starter) y configure correctamente `file-loader`, `css-loader` y `style-loader` en el archivo `webpack config`. Además, proveemos un ejemplar para [cooking](https://github.com/ElementUI/element-cooking-starter) y para [laravel](https://github.com/ElementUI/element-in-laravel-starter). +
+ +
+ Hice un clon del repositorio de `Element` pero no arranca. ¿Como lo resuelvo? + + Primero, pro favor, asegúrese de usar la versión más corriente en la rama `master` y que los archivos están en orden. Después, revise sí la versión de `Nodejs` es 4.0+ y `npm` debe ser 3.0+. Finalmente active el modo desarrollo: + + ```bash + npm run dev + ``` + + O arme su aplicación así: + + ```bash + npm run dist + ```