From 839dda529e205c35db741a22a64fd092a6d7688f Mon Sep 17 00:00:00 2001 From: Mathieu TUDISCO Date: Mon, 6 Nov 2017 14:39:38 +0100 Subject: [PATCH 01/48] =?UTF-8?q?Complete=20french=20translation=20?= =?UTF-8?q?=F0=9F=87=AB=F0=9F=87=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locale/lang/fr.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/locale/lang/fr.js b/src/locale/lang/fr.js index af6e4c56c..808c557b4 100644 --- a/src/locale/lang/fr.js +++ b/src/locale/lang/fr.js @@ -16,11 +16,11 @@ export default { startTime: 'Horaire début', endDate: 'Date fin', endTime: 'Horaire fin', - prevYear: 'Previous Year', // to be translated - nextYear: 'Next Year', // to be translated - prevMonth: 'Previous Month', // to be translated - nextMonth: 'Next Month', // to be translated - year: '', + prevYear: 'Année précédente', + nextYear: 'Année suivante', + prevMonth: 'Mois précédent', + nextMonth: 'Mois suivant', + year: 'Année', month1: 'Janvier', month2: 'Février', month3: 'Mars', @@ -81,7 +81,7 @@ export default { error: 'Erreur' }, upload: { - deleteTip: 'press delete to remove', // to be translated + deleteTip: 'Cliquer sur supprimer pour retirer le fichier', delete: 'Supprimer', preview: 'Aperçu', continue: 'Continuer' @@ -91,7 +91,7 @@ export default { confirmFilter: 'Confirmer', resetFilter: 'Réinitialiser', clearFilter: 'Tous', - sumText: 'Sum' // to be translated + sumText: 'Somme' }, tree: { emptyText: 'Aucune donnée' @@ -99,10 +99,10 @@ export default { transfer: { noMatch: 'Aucune correspondance', noData: 'Aucune donnée', - titles: ['List 1', 'List 2'], // to be translated - filterPlaceholder: 'Enter keyword', // to be translated - noCheckedFormat: '{total} items', // to be translated - hasCheckedFormat: '{checked}/{total} checked' // to be translated + titles: ['Liste 1', 'Liste 2'], + filterPlaceholder: 'Entrer un mot clef', + noCheckedFormat: '{total} elements', + hasCheckedFormat: '{checked}/{total} coché(s)' } } }; From 651b517fd09d03538a78e5780e5ef03912269cb7 Mon Sep 17 00:00:00 2001 From: alexdee2007 Date: Wed, 8 Nov 2017 06:20:52 +0200 Subject: [PATCH 02/48] Core: Add plugin eslint-plugin-json (#7869) * Add plugin eslint-plugin-json Add plugin eslint-plugin-json for parse build/salad.config.json * Add plugin eslint-plugin-json Add plugin eslint-plugin-json for parse build/salad.config.json --- .eslintrc | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index ba8a1b188..efb7c4f79 100644 --- a/.eslintrc +++ b/.eslintrc @@ -6,7 +6,7 @@ "expect": true, "sinon": true }, - "plugins": ['vue'], + "plugins": ['vue','json'], "extends": 'elemefe', "parserOptions": { "ecmaFeatures": { diff --git a/package.json b/package.json index 33bbfd39b..d6fae6758 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "css-loader": "^0.28.7", "es6-promise": "^4.0.5", "eslint": "^3.10.2", + "eslint-plugin-json": "^1.2.0", "extract-text-webpack-plugin": "^3.0.1", "file-loader": "^1.1.5", "file-save": "^0.2.0", From 4ea53ab89608e376cad3ac71e2977ae517aeffd1 Mon Sep 17 00:00:00 2001 From: Joe Wong Date: Wed, 8 Nov 2017 12:24:29 +0800 Subject: [PATCH 03/48] Cascader: optimize hover to expand experience (#8010) * Cascader: optimize hover to expand experience pass eslint * Cascader: hoverThreshold configuable --- packages/cascader/src/main.vue | 5 +++ packages/cascader/src/menu.vue | 78 +++++++++++++++++++++++++++++++++- 2 files changed, 81 insertions(+), 2 deletions(-) diff --git a/packages/cascader/src/main.vue b/packages/cascader/src/main.vue index 8165be79a..a5bdc4ffa 100644 --- a/packages/cascader/src/main.vue +++ b/packages/cascader/src/main.vue @@ -149,6 +149,10 @@ export default { beforeFilter: { type: Function, default: () => (() => {}) + }, + hoverThreshold: { + type: Number, + default: 500 } }, @@ -224,6 +228,7 @@ export default { this.menu.expandTrigger = this.expandTrigger; this.menu.changeOnSelect = this.changeOnSelect; this.menu.popperClass = this.popperClass; + this.menu.hoverThreshold = this.hoverThreshold; this.popperElm = this.menu.$el; this.menu.$on('pick', this.handlePick); this.menu.$on('activeItemChange', this.handleActiveItemChange); diff --git a/packages/cascader/src/menu.vue b/packages/cascader/src/menu.vue index 6785b78ae..07dff214a 100644 --- a/packages/cascader/src/menu.vue +++ b/packages/cascader/src/menu.vue @@ -39,7 +39,8 @@ value: [], expandTrigger: 'click', changeOnSelect: false, - popperClass: '' + popperClass: '', + hoverTimer: 0 }; }, @@ -135,9 +136,35 @@ activeOptions, visible, expandTrigger, - popperClass + popperClass, + hoverThreshold } = this; + let hoverMenuRefs = {}; + const hoverMenuHandler = e => { + const offsetX = e.offsetX; + const width = hoverMenuRefs.activeMenu.offsetWidth; + const height = hoverMenuRefs.activeMenu.offsetHeight; + + if (e.target === hoverMenuRefs.activeItem) { + clearTimeout(this.hoverTimer); + const {activeItem} = hoverMenuRefs; + const offsetY_top = activeItem.offsetTop; + const offsetY_Bottom = offsetY_top + activeItem.offsetHeight; + + hoverMenuRefs.hoverZone.innerHTML = ` + + + `; + } else { + if (!this.hoverTimer) { + this.hoverTimer = setTimeout(() => { + hoverMenuRefs.hoverZone.innerHTML = ''; + }, hoverThreshold); + } + } + }; + const menus = this._l(activeOptions, (menu, menuIndex) => { let isFlat = false; const items = this._l(menu, item => { @@ -177,6 +204,7 @@ 'is-active': item.value === activeValue[menuIndex], 'is-disabled': item.disabled }} + ref={item.value === activeValue[menuIndex] ? 'activeItem' : null} {...events} > {item.label} @@ -188,19 +216,65 @@ menuStyle.minWidth = this.inputWidth + 'px'; } + const isHoveredMenu = expandTrigger === 'hover' && activeValue.length - 1 === menuIndex; + const hoverMenuEvent = { + on: { + } + }; + + if (isHoveredMenu) { + hoverMenuEvent.on.mousemove = hoverMenuHandler; + menuStyle.position = 'relative'; + } + return (
    {items} + { + isHoveredMenu + ? () : null + }
); }); + + if (expandTrigger === 'hover') { + this.$nextTick(() => { + const activeItem = this.$refs.activeItem; + + if (activeItem) { + const activeMenu = activeItem.parentElement; + const hoverZone = this.$refs.hoverZone; + + hoverMenuRefs = { + activeMenu, + activeItem, + hoverZone + }; + } else { + hoverMenuRefs = {}; + } + }); + } + return (
Date: Wed, 8 Nov 2017 20:21:27 -0600 Subject: [PATCH 04/48] Accessibility for Cascader & Dropdown (#7973) --- packages/cascader/src/main.vue | 32 +++++++ packages/cascader/src/menu.vue | 66 +++++++++++++- packages/dropdown/src/dropdown-item.vue | 2 + packages/dropdown/src/dropdown.vue | 111 ++++++++++++++++++++++-- packages/theme-chalk/src/cascader.scss | 4 +- packages/theme-chalk/src/dropdown.scss | 10 ++- 6 files changed, 213 insertions(+), 12 deletions(-) diff --git a/packages/cascader/src/main.vue b/packages/cascader/src/main.vue index a5bdc4ffa..c02b70799 100644 --- a/packages/cascader/src/main.vue +++ b/packages/cascader/src/main.vue @@ -10,9 +10,12 @@ ]" @click="handleClick" @mouseenter="inputHover = true" + @focus="inputHover = true" @mouseleave="inputHover = false" + @blur="inputHover = false" ref="reference" v-clickoutside="handleClickoutside" + @keydown="handleKeydown" > { @@ -257,6 +272,23 @@ export default { }); this.$emit('active-item-change', value); }, + handleKeydown(e) { + const keyCode = e.keyCode; + if (keyCode === 13) { + this.handleClick(); + } else if (keyCode === 40) { // down + this.menuVisible = true; // 打开 + setTimeout(() => { + const firstMenu = this.popperElm.querySelectorAll('.el-cascader-menu')[0]; + firstMenu.querySelectorAll("[tabindex='-1']")[0].focus(); + }); + e.stopPropagation(); + e.preventDefault(); + } else if (keyCode === 27 || keyCode === 9) { // esc tab + this.inputValue = ''; + if (this.menu) this.menu.visible = false; + } + }, handlePick(value, close = true) { this.currentValue = value; this.$emit('input', value); diff --git a/packages/cascader/src/menu.vue b/packages/cascader/src/menu.vue index 07dff214a..09aeb0076 100644 --- a/packages/cascader/src/menu.vue +++ b/packages/cascader/src/menu.vue @@ -1,6 +1,7 @@ From 363a80b18430aed6ce02b696d984ae9e2305b2ed Mon Sep 17 00:00:00 2001 From: maranran Date: Wed, 8 Nov 2017 21:21:20 -0600 Subject: [PATCH 06/48] Accessibility for Popover, Tooltip, Message & Notification (#8009) * Accessibility for Tooltip & Popover * Accessibility for message & notification * fixbug for popover with nodeType --- examples/docs/zh-CN/popover.md | 2 +- examples/docs/zh-CN/tooltip.md | 2 +- packages/message/src/main.vue | 47 ++++++++++---------------- packages/notification/src/main.vue | 21 ++++++++++-- packages/popover/src/main.vue | 45 +++++++++++++++++++++++-- packages/theme-chalk/src/tooltip.scss | 3 ++ packages/tooltip/src/main.js | 48 ++++++++++++++++++++++----- 7 files changed, 123 insertions(+), 45 deletions(-) diff --git a/examples/docs/zh-CN/popover.md b/examples/docs/zh-CN/popover.md index 449874882..b3c52c3fa 100644 --- a/examples/docs/zh-CN/popover.md +++ b/examples/docs/zh-CN/popover.md @@ -146,7 +146,7 @@ Popover 的属性与 Tooltip 很类似,它们都是基于`Vue-popper`开发的 width="200" trigger="focus" content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"> - focus 激活 + focus 激活 ``` ::: diff --git a/examples/docs/zh-CN/tooltip.md b/examples/docs/zh-CN/tooltip.md index 07eb8d03f..83aeeba5b 100644 --- a/examples/docs/zh-CN/tooltip.md +++ b/examples/docs/zh-CN/tooltip.md @@ -63,7 +63,7 @@
- 上左 + 上左 上边 diff --git a/packages/message/src/main.vue b/packages/message/src/main.vue index 882b76f4d..c6f9956d8 100644 --- a/packages/message/src/main.vue +++ b/packages/message/src/main.vue @@ -9,15 +9,15 @@ v-show="visible" @mouseenter="clearTimer" @mouseleave="startTimer" - role="alertdialog" + role="alert" > -

{{ message }}

-

+

{{ message }}

+

- +
@@ -44,9 +44,7 @@ closed: false, timer: null, dangerouslyUseHTMLString: false, - center: false, - initFocus: null, - originFocus: null + center: false }; }, @@ -87,18 +85,18 @@ if (typeof this.onClose === 'function') { this.onClose(this); } - if (!this.originFocus || !this.originFocus.getBoundingClientRect) return; - - // restore keyboard focus - const { top, left, bottom, right } = this.originFocus.getBoundingClientRect(); - const viewportHeight = window.innerHeight || document.documentElement.clientHeight; - const viewportWidth = window.innerWidth || document.documentElement.clientWidth; - if (top >= 0 && - left >= 0 && - bottom <= viewportHeight && - right <= viewportWidth) { - this.originFocus.focus(); - } +// if (!this.originFocus || !this.originFocus.getBoundingClientRect) return; +// +// // restore keyboard focus +// const { top, left, bottom, right } = this.originFocus.getBoundingClientRect(); +// const viewportHeight = window.innerHeight || document.documentElement.clientHeight; +// const viewportWidth = window.innerWidth || document.documentElement.clientWidth; +// if (top >= 0 && +// left >= 0 && +// bottom <= viewportHeight && +// right <= viewportWidth) { +// this.originFocus.focus(); +// } }, clearTimer() { @@ -115,24 +113,15 @@ } }, keydown(e) { - if (e.keyCode === 46 || e.keyCode === 8) { - this.clearTimer(); // detele 取消倒计时 - } else if (e.keyCode === 27) { // esc关闭消息 + if (e.keyCode === 27) { // esc关闭消息 if (!this.closed) { this.close(); } - } else { - this.startTimer(); // 恢复倒计时 } } }, mounted() { this.startTimer(); - this.originFocus = document.activeElement; - this.initFocus = this.showClose ? this.$el.querySelector('.el-icon-close') : this.$el.querySelector('.el-message__content'); - setTimeout(() => { - this.initFocus && this.initFocus.focus(); - }); document.addEventListener('keydown', this.keydown); }, beforeDestroy() { diff --git a/packages/notification/src/main.vue b/packages/notification/src/main.vue index 4b98c1244..ee47e46be 100644 --- a/packages/notification/src/main.vue +++ b/packages/notification/src/main.vue @@ -6,7 +6,9 @@ :style="positionStyle" @mouseenter="clearTimer()" @mouseleave="startTimer()" - @click="click"> + @click="click" + role="alert" + > 0) { this.timer = setTimeout(() => { @@ -130,6 +142,11 @@ } }, this.duration); } + document.addEventListener('keydown', this.keydown); + }, + beforeDestroy() { + document.removeEventListener('keydown', this.keydown); } }; + diff --git a/packages/popover/src/main.vue b/packages/popover/src/main.vue index 88ff571a3..3e498336d 100644 --- a/packages/popover/src/main.vue +++ b/packages/popover/src/main.vue @@ -6,7 +6,11 @@ :class="[popperClass, content && 'el-popover--plain']" ref="popper" v-show="!disabled && showPopper" - :style="{ width: width + 'px' }"> + :style="{ width: width + 'px' }" + role="tooltip" + :id="tooltipId" + :aria-hidden="(disabled || !showPopper) ? 'true' : 'false'" + >
{{ content }}
@@ -14,10 +18,10 @@ - -## Container -Container components for scaffolding basic structure of the page: +## Contenedor +Componentes contenedores para iniciar una estructura básica de un sitio: -``: wrapper container. When nested with a `` or ``, all its child elements will be vertically arranged. Otherwise horizontally. +``: Contenedor. Cuando este elemento se anida con un `` o ``, todos los elementos secundarios se organizan verticalmente. +De lo contrario, de forma horizontal. -``: container for headers. +``: Contenedor para cabeceras. -``: container for side sections (usually a side nav). +``: Contenedor para secciones laterales (generalmente, una barra lateral). -``: container for main sections. +``: Contenedor para sección principal. -``: container for footers. +``: Contenedor para pie de página. :::tip -These components use flex for layout, so please make sure your browser supports it. Besides, ``'s direct child elements have to be one or more of the latter four components. And father element of the latter four components must be a ``. +Estos componentes utilizan flex para el diseño, así que asegúrate que el navegador lo soporte. Además, los elementos directos de `` tienen que +ser uno o más de los últimos cuatro componentes. Y el elemento padre de los últimos cuatro componentes debe ser un ``. ::: -### Common layouts +### Diseños comunes ::: demo ```html - Header - Main + Cabecera + Principal - Header - Main - Footer + Cabecera + Principal + Pie de página - Aside - Main + Barra lateral + Principal - Header + Cabecera - Aside - Main + Barra lateral + Principal - Header + Cabecera - Aside + Barra lateral - Main - Footer + Principal + Pie de página - Aside + Barra lateral - Header - Main + Cabecera + Principal - Aside + Barra lateral - Header - Main - Footer + Cabecera + Principal + Pie de página @@ -168,7 +170,7 @@ These components use flex for layout, so please make sure your browser supports ``` ::: -### Example +### Ejemplo ::: demo ```html @@ -278,22 +280,22 @@ These components use flex for layout, so please make sure your browser supports ``` ::: -### Container Attributes -| Attribute | Description | Type | Accepted Values | Default | +### Atributos de contenedor +| Atributo | Descripción | Tipo | Valores aceptados | Por defecto | |---------- |-------------- |---------- |-------------------------------- |-------- | -| direction | layout direction for child elements | string | horizontal / vertical | vertical when nested with `el-header` or `el-footer`; horizontal otherwise | +| direction | dirección de diseño para elementos secundarios | string | horizontal / vertical | vertical cuando el elemento está anidado con `el-header`, de lo contrario, horizontal | -### Header Attributes -| Attribute | Description | Type | Accepted Values | Default | +### Atributos de cabecera +| Atributo | Descripción | Tipo | Valores aceptados | Por defecto | |---------- |-------------- |---------- |-------------------------------- |-------- | -| height | height of the header | string | — | 60px | +| height | altura de la cabecera | string | — | 60px | -### Aside Attributes -| Attribute | Description | Type | Accepted Values | Default | +### Atributos de barra lateral +| Atributo | Descripción | Tipo | Valores aceptados | Por defecto | |---------- |-------------- |---------- |-------------------------------- |-------- | -| width | width of the side section | string | — | 300px | +| width | ancho de la barra lateral | string | — | 300px | -### Footer Attributes -| Attribute | Description | Type | Accepted Values | Default | +### Atributos de pie de página +| Atributo | Descripción | Tipo | Valores aceptados | Por defecto | |---------- |-------------- |---------- |-------------------------------- |-------- | -| height | height of the footer | string | — | 60px | \ No newline at end of file +| height | altura del pie de página | string | — | 60px | \ No newline at end of file From 122fd84c577082e1d7f6bdfe32056285261a0530 Mon Sep 17 00:00:00 2001 From: Javier Diaz Date: Thu, 9 Nov 2017 18:03:37 -0600 Subject: [PATCH 15/48] [custom-theme] Spanish translation --- examples/docs/es/custom-theme.md | 60 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/examples/docs/es/custom-theme.md b/examples/docs/es/custom-theme.md index 5fb6bdd59..07b918480 100644 --- a/examples/docs/es/custom-theme.md +++ b/examples/docs/es/custom-theme.md @@ -1,25 +1,25 @@ -## Custom theme -Element uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale, e.g. change the theme color from blue to orange or green, maybe overriding them one by one is not a good idea. We provide three ways to change the style variables. +## Tema personalizado +Element utiliza la metodología BEM en CSS con la finalidad de que puedas sobrescribir los estilos fácilmente. Pero, si necesitas remplazar estilos a gran escala, por ejemplo, cambiar el color del tema de azul a naranja o verde, quizás reemplazarlos uno a uno no sea lo más adecuado, por ello, te proporcionamos 3 maneras de modificar los estilos. -### Changing theme color -If you just want to change the theme color of Element, the [theme preview website](https://elementui.github.io/theme-chalk-preview/#/en-US) is recommended. The theme color of Element is bright and friendly blue. By changing it, you can make Element more visually connected to specific projects. +### Cambiando el color del tema +Si lo que buscas es cambiar el color del tema de Element, se recomienda utilizar el [sitio de visualización de temas](https://elementui.github.io/theme-chalk-preview/#/en-US). Element utiliza un color azul brillante y amigable como tema principal. Al cambiarlo, puede hacer que Element este más conectado visualmente a proyectos específicos. -The above website enables you to preview theme of a new theme color in real-time, and it can generate a complete style package based on the new theme color for you to download directly (to import new style files in your project, please refer to the 'Import custom theme' or 'Import component theme on demand' part of this section). +Este sitio, te permitirá obtener una vista previa del tema con un nuevo color en tiempo real, y, además, obtener un paquete de estilos completo basado en el nuevo color para su descarga (para importar estos nuevos estilos, consulta la sección ‘Importar un tema personalizado’ o ‘Importar un tema de componente bajo demanda' que se encuentran dentro de esta sección). -### Update SCSS variables in your project -`theme-chalk` is written in SCSS. If your project also uses SCSS, you can directly change Element style variables. Create a new style file, e.g. `element-variables.scss`: +### Actualizando variables SCSS en tu proyecto +`theme-chalk` esta escrito en SCSS. Si tu proyecto también utiliza SCSS, puedes cambiar las variables de estilos de Element. Para ello, solo necesitas crear un nuevo archivo de estilos, por ejemplo, `element-variables.scss`: ```html -/* theme color */ +/* Color del tema */ $--color-primary: teal; -/* icon font path, required */ +/* Ubicación de la fuente, obligatoria */ $--font-path: '../node_modules/element-ui/lib/theme-chalk/fonts'; @import "../node_modules/element-ui/packages/theme-chalk/src/index"; ``` -Then in the entry file of your project, import this style file instead of Element's built CSS: +Entonces, en el archivo principal del proyecto, importa este archivo de estilos en lugar de los estilos de Element: ```JS import Vue from 'vue' import Element from 'element-ui' @@ -29,29 +29,29 @@ Vue.use(Element) ``` :::tip -Note that it is required to override icon font path to the relative path of Element's font files. +Nota es necesario sobreescribir la ruta de la fuente por una ruta relativa de las fuentes de Element. ::: -### CLI theme tool -If you project doesn't use SCSS, you can customize themes with our CLI theme tool: +### CLI para generar temas +Si tu proyecto no utiliza SCSS, puedes personalizar el tema a través de esta herramienta: -#### Install -First install the theme generator globally or locally. Local install is recommended because in this way, when others clone your project, npm will automatically install it for them. +#### Instalación +Primero, debes instalar el generador de temas ya sea de forma global o local. Se recomienda instalarlo de forma local, ya que de esta manera, cuando otros clonen tu proyecto, npm automáticamente los instalará para ellos. ```shell npm i element-theme -g ``` -Then install the chalk theme from npm or GitHub. +Ahora, instala el tema `chalk` desde npm o Github. ```shell -# from npm +# desde npm npm i element-theme-chalk -D -# from GitHub +# desde GitHub npm i https://github.com/ElementUI/theme-chalk -D ``` -#### Initialize variable file -After successfully installing the above packages, a command named `et` is available in CLI (if the packages are installed locally, use `node_modules/.bin/et` instead). Run `-i` to initialize the variable file which outputs to `element-variables.scss` by default. And you can specify its output directory as you will. +#### Inicializar archivo de variables +Después de haber instalado correctamente los paquetes, el comando `et` estará disponible en tu CLI (si instalaste el paquete de manera local, utilizá `node_modules/.bin/et` en su lugar). Ejecuta `-i` para inicializar un archivo de variables, puedes especificar un nombre distinto, pero por defecto, el archivo se llama `element-variables.scss`. También puedes especificar un directorio distinto. ```shell et -i [custom output file] @@ -59,7 +59,7 @@ et -i [custom output file] > ✔ Generator variables file ``` -In `element-variables.scss` you can find all the variables we used to style Element and they are defined in SCSS format. Here's a snippet: +En el archivo `element-variables.scss` podrás encontrar todas las variables que utiliza Element para definir los estilos y estos están definidos en SCSS. Aquí un ejemplo: ```css $--color-primary: #409EFF !default; $--color-primary-light-1: mix($--color-white, $--color-primary, 10%) !default; /* 53a8ff */ @@ -80,14 +80,14 @@ $--color-info: #878d99 !default; ... ``` -#### Modify variables -Just edit `element-variables.scss`, e.g. changing the theme color to red: +#### Modificando variables +Solo debes modificar el archivo `element-variables.scss`, por ejemplo, para cambiar el color del tema a rojo: ```CSS $--color-primary: red; ``` -#### Build theme -After saving the variable file, use `et` to build your theme. You can activate `watch` mode by adding a parameter `-w`. And if you customized the variable file's output, you need to add a parameter `-c` and variable file's name: +#### Construyendo el tema +Después de haber modificado el archivo de variables, utilizaremos el comando `et` para construir nuestro tema. Puedes activar el modo `watch` agregando el parámetro `-w`. Y, si deseas personalizar el nombre del archivo, debes agregar el parámetro `-c` seguido del nombre. ```shell et @@ -95,8 +95,8 @@ et > ✔ build element theme ``` -#### Import custom theme -By default the build theme file is placed inside `./theme`. You can specify its output directory with parameter `-o`. Importing your own theme is just like importing the default theme, only this time you import the file you just built: +#### Importar un tema personalizado +Por defecto, el archivo de tema construido es colocado dentro de `./theme`. Tu puedes especificar un directorio distinto utilizando el parámetro `-o`. Importar tu propio tema es igual a como si importarás el tema por defecto, únicamente tienes que importar el archivo que se construyó: ```javascript import '../theme/index.css' @@ -106,8 +106,8 @@ import Vue from 'vue' Vue.use(ElementUI) ``` -#### Import component theme on demand -If you are using `babel-plugin-component` for on-demand import, just modify `.babelrc` and specify `styleLibraryName` to the path where your custom theme is located relative to `.babelrc`. Note that `~` is required: +#### Importar un tema de componente bajo demanda +Si estas utilizando `babel-plugin-component` para importar bajo demanda, solo debes modificar el archivo `.babelrc` y especificar en la propiedad `styleLibraryName` la ruta en donde se encuentra localizado tu tema personalizado relativo a `.babelrc`. Nota el carácter `~` es obligatorio: ```json { "plugins": [["component", [ @@ -119,4 +119,4 @@ If you are using `babel-plugin-component` for on-demand import, just modify `.ba } ``` -If you are unfamiliar with `babel-plugin-component`, please refer to Quick Start. For more details, check out the [project repository](https://github.com/ElementUI/element-theme) of `element-theme`. \ No newline at end of file +Si no estas familiarizado con `babel-plugin-component`, por favor dirígete a la documentación sobre Como Iniciar. Para más detalles, consulta el [repositorio del proyecto](https://github.com/ElementUI/element-theme) de `element-theme`. \ No newline at end of file From 3764f1a373b2e13a42f4fbd8e78b1999755ef1e0 Mon Sep 17 00:00:00 2001 From: Federico Garcia Date: Wed, 8 Nov 2017 13:29:51 -0300 Subject: [PATCH 16/48] Translated to spanish - checkbox, collapse and color-picker --- examples/docs/es/checkbox.md | 144 +++++++++++++++---------------- examples/docs/es/collapse.md | 39 +++++---- examples/docs/es/color-picker.md | 34 ++++---- 3 files changed, 109 insertions(+), 108 deletions(-) diff --git a/examples/docs/es/checkbox.md b/examples/docs/es/checkbox.md index 8405e7050..557d9daed 100644 --- a/examples/docs/es/checkbox.md +++ b/examples/docs/es/checkbox.md @@ -3,8 +3,8 @@ module.exports = { data() { return { - checkList: ['selected and disabled','Option A'], - // checkList2: ['Option A'], + checkList: ['seleccionado y deshabilitado','Opción A'], + // checkList2: ['Opción A'], checked: true, checked1: false, checked2: true, @@ -45,18 +45,18 @@ ## Checkbox -A group of options for multiple choices. +Un grupo de opciones para manejar múltiples elecciones. -### Basic usage +### Uso básico -Checkbox can be used alone to switch between two states. +Checkbox puede ser usado para alternar entre dos estados. -:::demo Define `v-model`(bind variable) in `el-checkbox`. The default value is a `Boolean` for single `checkbox`, and it becomes `true` when selected. Content inside the `el-checkbox` tag will become the description following the button of the checkbox. +:::demo Define `v-model`(enlaza la variable) en `el-checkbox`. El valor por defecto es un `Boolean` para un `checkbox`, y se convierte en `true` cuando este es seleccionado. El contenido dentro del tag `el-checkbox` se convierte en la descripción al costado del botón del checkbox. ```html -## Upload +## Carga de archivos -Upload files by clicking or drag-and-drop +Carga archivos haciendo clic o arrastrándolos. -### Click to upload files +### Clic para cargar archivos -:::demo Customize upload button type and text using `slot`. Set `limit` and `on-exceed` to limit the maximum number of uploads allowed and specify method when the limit is exceeded. +:::demo Personaliza el tipo y texto del botón utilizando la propiedad `slot`. Define las propiedades `limit` y `on-exceed` para limitar el número máximo de archivos a subir y especifica un método para cuando el límite ha sido excedido. ```html - Click to upload -
jpg/png files with a size less than 500kb
+ Clic para subir archivo +
Solo archivos jpg/png con un tamaño menor de 500kb
``` -:::tip -We recommend our users to lock Element's version when using CDN. Please refer to [unpkg.com](https://unpkg.com) for more information. -::: +##Tip +Recomendamos a nuestros usuarios congelar la versión de Elemet cuando usas un CDN. Por favor, refiérase a [unpkg.com](https://unpkg.com) para más información. + ### Hello world -If you are using CDN, a hello-world page is easy with Element. [Online Demo](https://jsfiddle.net/hzfpyvg6/14/) +Si estás usando un CDN, una página con Hello-World es fácil con Element. [Online Demo](https://jsfiddle.net/hzfpyvg6/14/) ```html @@ -54,4 +54,5 @@ If you are using CDN, a hello-world page is easy with Element. [Online Demo](htt ``` -If you are using npm and wish to apply webpack, please continue to the next page: Quick Start. +Si estás usando npm y deseas combinarlo con webpack, por favor continúa a la siguiente página: Quick Start + diff --git a/examples/docs/es/layout.md b/examples/docs/es/layout.md index e234c6061..f537e8542 100644 --- a/examples/docs/es/layout.md +++ b/examples/docs/es/layout.md @@ -31,13 +31,13 @@ ## Layout -Quickly and easily create layouts with the basic 24-column. +Rápido y facilmente crea un layout básico con 24 columnas. -### Basic layout +### Layout básico -Create basic grid layout using columns. +Crea un layout básico usando columnas. -::: demo With `row` and `col`, we can easily manipulate the layout using the `span` attribute. +:::**Demo** Con `row` y `col`, podemos facilmente manipular el layout usando el atributo `span`. ```html
@@ -97,11 +97,11 @@ Create basic grid layout using columns. ``` ::: -### Column spacing +### Espaciado de columnas -Column spacing is supported. +El espaciado de columnas está soportado. -::: demo Row provides `gutter` attribute to specify spacings between columns, and its default value is 0. +:::**Demo** Row provee el atributo `gutter` para especificar el espacio entre columnas y su valor por defecto es 0. ```html
@@ -141,11 +141,11 @@ Column spacing is supported. ``` ::: -### Hybrid layout +### Layout híbrido -Form a more complex hybrid layout by combining the basic 1/24 columns. +Crea un complejo layout híbrido combinando el básico de 1/24 columnas. -::: demo +:::**Demo** ```html
@@ -194,11 +194,11 @@ Form a more complex hybrid layout by combining the basic 1/24 columns. ``` ::: -### Column offset +### Offset de columnas -You can specify column offsets. +Puedes especificar offsets para las columnas. -::: demo You can specify the number of column offset by setting the value of `offset` attribute of Col. +:::**Demo** Puedes especificar el offset para una columna mediante el atributo `offset` de Col. ```html @@ -244,11 +244,11 @@ You can specify column offsets. ``` ::: -### Alignment +### Alineación -Use the flex layout to make flexible alignment of columns. +Usa flex layout para un alineamiento flexible de columnas. -::: demo You can enable flex layout by setting `type` attribute to 'flex', and define the layout of child elements by setting `justify` attribute with start, center, end, space-between or space-around. +:::**Demo** Puedes habilitar flex layout asignando el atributo `type` a 'flex', y definir el layout de elementos hijos asignando el atributo `justify` con los valores start, center, end, space-between o space-around. ```html
@@ -309,9 +309,9 @@ Use the flex layout to make flexible alignment of columns. ### Responsive Layout -Taking example by Bootstrap's responsive design, five breakpoints are preset: xs, sm, md, lg and xl. +Tomando el ejemplo de Bootstrap responsive design, existen 5 breakpoints: xs, sm, md, lg y xl. -::: demo +:::**Demo** ```html
@@ -341,48 +341,48 @@ Taking example by Bootstrap's responsive design, five breakpoints are preset: xs ``` ::: -### Utility classes for hiding elements +### Clases útiles para ocultar elementos -Additionally, Element provides a series of classes for hiding elements under certain conditions. These classes can be added to any DOM elements or custom components. You need to import the following CSS file to use these classes: +Adicionalmente, Element provee una serie de clases para ocultar elementos dadas ciertas condiciones. Estas clases pueden se agregadas a cualquier elemento del DOM o un elemento propio. Necesitas importar el siguiente archivo CSS para usar estas clases: ```js import 'element-ui/lib/theme-chalk/display.css'; ``` -The classes are: -- `hidden-xs-only` - hide when on extra small viewports only -- `hidden-sm-only` - hide when on small viewports and down -- `hidden-sm-and-down` - hide when on small viewports and down -- `hidden-sm-and-up` - hide when on small viewports and up -- `hidden-md-only` - hide when on medium viewports only -- `hidden-md-and-down` - hide when on medium viewports and down -- `hidden-md-and-up` - hide when on medium viewports and up -- `hidden-lg-only` - hide when on large viewports only -- `hidden-lg-and-down` - hide when on large viewports and down -- `hidden-lg-and-up` - hide when on large viewports and up -- `hidden-xl-only` - hide when on extra large viewports only +Las clases son: +- `hidden-xs-only` - oculto en viewports extra pequenhos solamente +- `hidden-sm-only` - oculto en viewports pequenhos solamente +- `hidden-sm-and-down` - oculto en viewports pequenhos y menores +- `hidden-sm-and-up` - oculto en viewports pequenhos y superiores +- `hidden-md-only` - oculto en viewports medios solamente +- `hidden-md-and-down` - oculto en viewports medios y menores +- `hidden-md-and-up` - oculto en viewports medios y mayores +- `hidden-lg-only` - ocultos en viewports grandes solamente +- `hidden-lg-and-down` - ocultos en viewports grandes y menores +- `hidden-lg-and-up` - ocultos en viewports grandes y superiores +- `hidden-xl-only` - oculto en viewports extra grandes solamente -### Row Attributes +### Atributos Row | Attribute | Description | Type | Accepted Values | Default | |---------- |-------------- |---------- |-------------------------------- |-------- | -| gutter | grid spacing | number | — | 0 | -| type | layout mode, you can use flex, works in modern browsers | string | — | — | -| justify | horizontal alignment of flex layout | string | start/end/center/space-around/space-between | start | -| align | vertical alignment of flex layout | string | top/middle/bottom | top | -| tag | custom element tag | string | * | div | +| gutter | espaciado de la grilla | number | — | 0 | +| type | modo del layout , puedes usar flex, funciona en navegadores modernos| string | — | — | +| justify | alineación horizontal del layout flex | string | start/end/center/space-around/space-between | start | +| align | alineación vertical del layout flex | string | top/middle/bottom | top | +| tag | tag de elemento propio | string | * | div | -### Col Attributes +### Atributos Col | Attribute | Description | Type | Accepted Values | Default | |---------- |-------------- |---------- |-------------------------------- |-------- | -| span | number of column the grid spans | number | — | 24 | -| offset | number of spacing on the left side of the grid | number | — | 0 | -| push | number of columns that grid moves to the right | number | — | 0 | -| pull | number of columns that grid moves to the left | number | — | 0 | -| xs | `<768px` Responsive columns or column props object | number/object (e.g. {span: 4, offset: 4}) | — | — | -| sm | `≥768px` Responsive columns or column props object | number/object (e.g. {span: 4, offset: 4}) | — | — | -| md | `≥992px` Responsive columns or column props object | number/object (e.g. {span: 4, offset: 4}) | — | — | -| lg | `≥1200px` Responsive columns or column props object | number/object (e.g. {span: 4, offset: 4}) | — | — | -| xl | `≥1920px` Responsive columns or column props object | number/object (e.g. {span: 4, offset: 4}) | — | — | -| tag | custom element tag | string | * | div | +| span | número de columnas que abarca la cuadrícula | number | — | 24 | +| offset | especific espacio en el lado izquierdo de la grill | number | — | 0 | +| push | número de columnas que la grilla se mueve hacia la derecha | number | — | 0 | +| pull | número de columnas que la grilla se mueve hacia la izquierda | number | — | 0 | +| xs | `<768px` Columnas responsive u objeto con propiedades de la columna | number/object (e.g. {span: 4, offset: 4}) | — | — | +| sm | `≥768px` Columnas responsive u objeto con propiedades de la columna | number/object (e.g. {span: 4, offset: 4}) | — | — | +| md | `≥992px` Columnas responsive u objeto con propiedades de la columna | number/object (e.g. {span: 4, offset: 4}) | — | — | +| lg | `≥1200px` Columnas responsive u objeto con propiedades de la columna | number/object (e.g. {span: 4, offset: 4}) | — | — | +| xl | `≥1920px` Columnas responsive u objeto con propiedades de la columna | number/object (e.g. {span: 4, offset: 4}) | — | — | +| tag | tag de elemento propio | string | * | div | diff --git a/examples/docs/es/menu.md b/examples/docs/es/menu.md index 7768a2e56..e9891f51e 100644 --- a/examples/docs/es/menu.md +++ b/examples/docs/es/menu.md @@ -53,13 +53,14 @@ ## NavMenu -Menu that provides navigation for your website. +Menú que provee la navegación para tu sitio. ### Top bar -Top bar NavMenu can be used in a variety of scenarios. +Top bar NavMenu puede ser usado en distinto escenarios. + +:::**Demo** Por defecto el menú es vertical, pero puedes hacerlo horizontal asignando a la propiedad `mode` el valor 'horizontal'. Además, puedes utilizar el componente de submenú para crear un menú de segundo nivel. Menú provee `background-color`, `text-color` y `active-text-color` para customizar los colores. -::: demo By default Menu is vertical, but you can change it to horizontal by setting the mode prop to 'horizontal'. In addition, you can use the submenu component to create a second level menu. Menu provides `background-color`, `text-color` and `active-text-color` to customize the colors. ```html Processing Center @@ -110,9 +111,10 @@ Top bar NavMenu can be used in a variety of scenarios. ### Side bar -Vertical NavMenu with sub-menus. +NavMenu vertical con sub-menús. + +:::**Demo** Puedes utilizar el componente el-menu-item-group para crear un grupo de menú, y el nombre del grupo estará determinado por la propiedad `title` o la propiedad `slot`. -::: demo You can use the el-menu-item-group component to create a menu group, and the name of the group is determined by the title prop or a named slot. ```html @@ -205,9 +207,9 @@ Vertical NavMenu with sub-menus. ### Collapse -Vertical NavMenu could be collapsed. +NavMenu vertical puede ser colapsado. -::: demo +:::**Demo** ```html expand @@ -269,50 +271,50 @@ Vertical NavMenu could be collapsed. ``` ::: -### Menu Attribute -| Attribute | Description | Type | Accepted Values | Default | +### Atributos Menu +| Atributo | Descripción | Tipo | Valores aceptados | Valores por defecto | |---------- |-------- |---------- |------------- |-------- | -| mode | menu display mode | string | horizontal / vertical | vertical | -| collapse | whether the menu is collapsed (available only in vertical mode) | boolean | — | false | -| background-color | background color of Menu (hex format) | string | — | #ffffff | -| text-color | text color of Menu (hex format) | string | — | #2d2f33 | -| active-text-color | text color of currently active menu item (hex format) | string | — | #409EFF | -| default-active | index of currently active menu | string | — | — | -| default-openeds | array that contains keys of currently active sub-menus | Array | — | — | +| mode | modo de presentación del menú | string | horizontal / vertical | vertical | +| collapse | si el menú está colapsado (solo en modo vertical) | boolean | — | false | +| background-color | color de fondo del menú (formato hexadecimal) | string | — | #ffffff | +| text-color | color de texto del menú (formato hexadecimal) | string | — | #2d2f33 | +| active-text-color | color de text del menu-item activo (formato hexadecimal) | string | — | #409EFF | +| default-active | índice del menu-item activo | string | — | — | +| default-openeds | arreglo que contiene las llaves del sub-menus activo | Array | — | — | | unique-opened | whether only one sub-menu can be active | boolean | — | false | -| menu-trigger | how sub-menus are triggered, only works when `mode` is 'horizontal' | string | — | hover | -| router | whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action | boolean | — | false | +| menu-trigger | como dispara eventos sub-menus, solo funciona cuando `mode` es 'horizontal' | string | — | hover | +| router | si el modo `vue-router` está activado. Si es verdader, índice será usado como 'path' para activar la ruta | boolean | — | false | -### Menu Methods -| Event Name | Description | Parameters | +### Métodos Menu +| Nombre de evento | Descripción | Parámetros | |---------- |-------- |---------- | -| open | open a specific sub-menu | index: index of the sub-menu to open | -| close | close a specific sub-menu | index: index of the sub-menu to close | +| open | abre un sub-menu específico | index: índice del sub-menu para abrir | +| close | cierra un sub-menu específico | index: índice del sub-menu para cerrar | -### Menu Events -| Event Name | Description | Parameters | +### Eventos Menu +| Nombre de evento | Descripción | Parámetros | |---------- |-------- |---------- | -| select | callback function when menu is activated | index: index of activated menu, indexPath: index path of activated menu | -| open | callback function when sub-menu expands | index: index of expanded sub-menu, indexPath: index path of expanded sub-menu | -| close | callback function when sub-menu collapses | index: index of collapsed sub-menu, indexPath: index path of collapsed sub-menu | +| select | callback ejecutado cuando el menú es activado | index: índice del menú activado, indexPath: index path del menú activado | +| open | callback ejecutado cuando sub-menu se expande | index: índice del sub-menu expandido, indexPath: index path del sub-menu expandido | +| close | callback ejecutado cuando sub-menu colapsa | index: índice del sub-menu colapsado, indexPath: index path del menú colapsado | -### Menu-Item Events -| Event Name | Description | Parameters | +### Eventos Menu-Item +| Nombre de evento | Descripción | Parámetros | |---------- |-------- |---------- | -| click | callback function when menu-item is clicked | el: menu-item instance | +| click | callback ejecutado cuando se hace click sobre menu-item | el: instancia de menu-item | -### SubMenu Attribute -| Attribute | Description | Type | Accepted Values | Default | +### Atributos SubMenu +| Atributo | Descripción | Tipo | Valores aceptados | Valores por defecto | |---------- |-------- |---------- |------------- |-------- | -| index | unique identification | string | — | — | +| index | identificador único | string | — | — | -### Menu-Item Attribute -| Attribute | Description | Type | Accepted Values | Default | +### Atributos Menu-Item +| Atributo | Descripción | Tipo | Valores aceptados | Valores por defecto | |---------- |-------- |---------- |------------- |-------- | -| index | unique identification | string | — | — | -| route | Vue Router object | object | — | — | +| index | identificador único | string | — | — | +| route | Object Vue Router | object | — | — | -### Menu-Group Attribute -| Attribute | Description | Type | Accepted Values | Default | +### Atributos Menu-Group +| Atributo | Descripción | Tipo | Valores aceptados | Valores por defecto | |---------- |-------- |---------- |------------- |-------- | -| title | group title | string | — | — | +| title | título del grupo | string | — | — | From c0a4fb741aac8572beaf02346bdc9b82f2c58266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Salvador=20Garc=C3=ADa=20San=20Juan?= Date: Sat, 11 Nov 2017 02:40:06 -0500 Subject: [PATCH 25/48] [FIX] Unsaved translations. --- examples/docs/es/installation.md | 2 +- examples/docs/es/layout.md | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/docs/es/installation.md b/examples/docs/es/installation.md index 99b54b545..bc96d89c9 100644 --- a/examples/docs/es/installation.md +++ b/examples/docs/es/installation.md @@ -7,7 +7,7 @@ Instalar mediante npm es la forma recomendada ya que se integra facilmente con [ npm i element-ui -S ``` -### CDN +### CDN Obten la última versión desde [unpkg.com/element-ui](https://unpkg.com/element-ui/) , e importa el JavaScript y los archivos CSS en tu página. ```html diff --git a/examples/docs/es/layout.md b/examples/docs/es/layout.md index f537e8542..02c1c9081 100644 --- a/examples/docs/es/layout.md +++ b/examples/docs/es/layout.md @@ -363,7 +363,8 @@ Las clases son: - `hidden-xl-only` - oculto en viewports extra grandes solamente ### Atributos Row -| Attribute | Description | Type | Accepted Values | Default | + +| Atributos | Descripción | Tipo | Valores aceptados | Valor por defecto | |---------- |-------------- |---------- |-------------------------------- |-------- | | gutter | espaciado de la grilla | number | — | 0 | | type | modo del layout , puedes usar flex, funciona en navegadores modernos| string | — | — | @@ -372,7 +373,8 @@ Las clases son: | tag | tag de elemento propio | string | * | div | ### Atributos Col -| Attribute | Description | Type | Accepted Values | Default | + +| Atributos | Descripción | Tipo | Valores aceptados | Valor por defecto | |---------- |-------------- |---------- |-------------------------------- |-------- | | span | número de columnas que abarca la cuadrícula | number | — | 24 | | offset | especific espacio en el lado izquierdo de la grill | number | — | 0 | From e4bef2f494903d384ded026baef388c4fcba3964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Salvador=20Garc=C3=ADa=20San=20Juan?= Date: Sat, 11 Nov 2017 16:06:29 -0500 Subject: [PATCH 26/48] [ADD] Pagination, popover & progress spanish translations. --- examples/docs/es/pagination.md | 57 ++++++++++++++++--------------- examples/docs/es/popover.md | 61 +++++++++++++++++----------------- examples/docs/es/progress.md | 36 ++++++++++---------- 3 files changed, 75 insertions(+), 79 deletions(-) diff --git a/examples/docs/es/pagination.md b/examples/docs/es/pagination.md index 714b32735..6ea24753e 100644 --- a/examples/docs/es/pagination.md +++ b/examples/docs/es/pagination.md @@ -48,13 +48,12 @@ } -## Pagination +## Paginación +Si tiene que mostrar muchos datos en una página, utiliza la paginación. -If you have too much data to display in one page, use pagination. +### Uso básico -### Basic usage - -:::demo Set `layout` with different pagination elements you wish to display separated with a comma. Pagination elements are: `prev` (a button navigating to the previous page), `next` (a button navigating to the next page), `pager` (page list), `jumper` (a jump-to input), `total` (total item count), `size` (a select to determine page size) and `->`(every element after this symbol will be pulled to the right). +:::**Demo** Asigna en el atributo `layout` los diferentes elementos que quieres utilizar separados por coma. Los elementos de paginación son: `prev` (un botón para navegar a la página anterior), `next` (un botón para navegar a la siguiente página), `pager` (lista de página), `jumper` (un `input` para saltar a una página determinada), `total` (total de elementos), `size` (un `select` para seleccionar el tamanho de la página ) y `->`(todo elemento situado luego de este símbolo será halado a la derecha). ```html
When you have few pages @@ -73,11 +72,11 @@ If you have too much data to display in one page, use pagination. ``` ::: -### Small Pagination +### Paginación pequenha -Use small pagination in the case of limited space. +Usa una paginación pequenha en caso de espacio limitado. -:::demo Just set the `small` attribute to `true` and the Pagination becomes smaller. +:::**Demo** Solo pon el atributo `small` como `true` y la Paginación se volverá pequenha. ```html @@ -195,27 +194,27 @@ Add more modules based on your scenario. } -### Attributes -| Attribute | Description | Type | Accepted Values | Default | +### Atributos +| Atributo | Descripción | Tipo | Valores aceptados | Valores por defecto | |--------------------|----------------------------------------------------------|-------------------|-------------|--------| -| small | whether to use small pagination | boolean | — | false | -| page-size | item count of each page | number | — | 10 | -| total | total item count | number | — | — | -| page-count | total page count. Set either `total` or `page-count` and pages will be displayed; if you need `page-sizes`, `total` is required | number | — | — | -| current-page | current page number, supports the .sync modifier | number | — | 1 | -| layout | layout of Pagination, elements separated with a comma | string | `sizes`, `prev`, `pager`, `next`, `jumper`, `->`, `total`, `slot` | 'prev, pager, next, jumper, ->, total' | -| page-sizes | options of item count per page | number[] | — | [10, 20, 30, 40, 50, 100] | -| popper-class | custom class name for the page size Select's dropdown | string | — | — | -| prev-text | text for the prev button | string | — | — | -| next-text | text for the next button | string | — | — | +| small | usar paginación pequenha | boolean | — | false | +| page-size | cantidad de elementos por página | number | — | 10 | +| total | total de elementos | number | — | — | +| page-count | total de páginas. Asigna `total` o `page-count` y las páginas serán mostradas; si necesitas `page-sizes`, `total` es **requerido** | number | — | — | +| current-page | número actual de la página, soporta el modificador .sync | number | — | 1 | +| layout | layout de la paginación, elementos separados por coma | string | `sizes`, `prev`, `pager`, `next`, `jumper`, `->`, `total`, `slot` | 'prev, pager, next, jumper, ->, total' | +| page-sizes | opciones para la cantidad de elementos por página | number[] | — | [10, 20, 30, 40, 50, 100] | +| popper-class | clase propia para el `dropdown` del `select` del número de páginas | string | — | — | +| prev-text | texto para el botón `prev` | string | — | — | +| next-text | texto para el botón `next` | string | — | — | -### Events -| Event Name | Description | Parameters | +### Eventos +| Nombre del evento | Descripción | Parámetros | |---------|--------|---------| -| size-change | triggers when `page-size` changes | the new `page-size` | -| current-change | triggers when `current-page` changes | the new `current-page` | +| size-change | se dispara cuando `page-size` cambia | nuevo valor de `page-size` | +| current-change | se dispara cuando `current-page` cambia | nuevo valor de `current-page` | ### Slot -| Name | Description | +| Nombre | Descripción | | --- | --- | -| — | custom content. To use this, you need to declare `slot` in `layout` | +| — | Elemento propio. Para utilizar esto necesitas declarar `slot` en el `layout` | diff --git a/examples/docs/es/popover.md b/examples/docs/es/popover.md index 49f030fa3..d36ef6d4d 100644 --- a/examples/docs/es/popover.md +++ b/examples/docs/es/popover.md @@ -99,11 +99,11 @@ ## Popover -### Basic usage +### Uso básico -Similar to Tooltip, Popover is also built with `Vue-popper`. So for some duplicated attributes, please refer to the documentation of Tooltip. +Similar a un Tooltip, Popover está construido con `Vue-popper`. Así que para atributos duplicados, por favor refiérase a la documentación de Tooltip. -:::demo Add `ref` in your popover, then in your button, use `v-popover` directive to link the button and the popover. The attribute `trigger` is used to define how popover is triggered: `hover`, `click` or `focus`. Alternatively, you can specify reference using a named `slot`. +:::**Demo** Agrega `ref` al popover, luego en el botón usa la directiva `v-popover` para asociar el botón y el popover. El atributo `trigger` es usado para definir como el popover se dispara: `hover`, `click` o `focus`. De manera alternatica puedes especificar la referencia utilizando un `[named slot](https://vuejs.org/v2/guide/components.html#Named-Slots). ```html ``` -::: -### Attributes -| Attribute | Description | Type | Accepted Values | Default | + +### Atributos +| Atributo | Descripción | Tipo | Valores aceptados | Valores por defecto | |--------------------|----------------------------------------------------------|-------------------|-------------|--------| -| trigger | how the popover is triggered | string | click/focus/hover/manual | click | -| title | popover title | string | — | — | -| content | popover content, can be replaced with a default `slot` | string | — | — | -| width | popover width | string, number | — | Min width 150px | -| placement | popover placement | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom | -| disabled | whether Popover is disabled | boolean | — | false | -| value(v-model) | whether popover is visible | Boolean | — | false | +| trigger | cómo se dispara el popover | string | click/focus/hover/manual | click | +| title | título del popover | string | — | — | +| content | contenido del popover, puede ser sustituido por un `slot` | string | — | — | +| width | ancho del popover | string, number | — | Min width 150px | +| placement | posición del popover en la pantalla | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom | +| disabled | si el popover está deshabilitado | boolean | — | false | +| value(v-model) | si el popover está visible | Boolean | — | false | | offset | popover offset | number | — | 0 | | transition | popover transition animation | string | — | el-fade-in-linear | -| visible-arrow | whether a tooltip arrow is displayed or not. For more info, please refer to [Vue-popper](https://github.com/element-component/vue-popper) | boolean | — | true | -| popper-options | parameters for [popper.js](https://popper.js.org/documentation.html) | object | please refer to [popper.js](https://popper.js.org/documentation.html) | `{ boundariesElement: 'body', gpuAcceleration: false }` | -| popper-class | custom class name for popover | string | — | — | -| open-delay | delay of appearance when `trigger` is hover, in milliseconds | number | — | — | +| visible-arrow | si una flecha del tooltip is mostrada o no. Para más información, por favor refiérase a [Vue-popper](https://github.com/element-component/vue-popper) | boolean | — | true | +| popper-options | parámetros para [popper.js](https://popper.js.org/documentation.html) | object | por favor, refiérase a [popper.js](https://popper.js.org/documentation.html) | `{ boundariesElement: 'body', gpuAcceleration: false }` | +| popper-class | clase propia para popover | string | — | — | +| open-delay | retraso de la aparición cuando `trigger` es hover, en milisegundos | number | — | — | ### Slot -| Name | Description | +| Nombre | Descripción | | --- | --- | -| — | text content of popover | -| reference | HTML element that triggers popover | +| — | texto contenido en popover | +| reference | elemento HTML que dispara el popover | -### Events -| Event Name | Description | 回调参数 | +### Eventos +| Nombre del evento | Descripción | Parámetros | |---------|--------|---------| -| show | triggers when popover shows | — | -| hide | triggers when popover hides | — | +| show | se dispara cuando se muestra el popover | — | +| hide | se dispara cuando se oculta el popover | — | diff --git a/examples/docs/es/progress.md b/examples/docs/es/progress.md index 275009e6f..385ad833c 100644 --- a/examples/docs/es/progress.md +++ b/examples/docs/es/progress.md @@ -9,13 +9,12 @@ } } -## Progress +## Progreso +Progreso es usado para mostrar el estado de la operación actual e informar al usuario acerca de ésta. -Progress is used to show the progress of current operation, and inform the user the current status. +### Barra de progreso lineal (porcentage externo) -### Linear progress bar (external percentage) - -:::demo Use `percentage` attribute to set the percentage. It's **required** and must be between `0-100`. +:::**Demo** Usa el atributo `percentage` para asignar el porcentage. Este es **requerido** y tiene que ser un valor entre `0-100`. ```html @@ -24,11 +23,10 @@ Progress is used to show the progress of current operation, and inform the user ``` ::: -### Linear progress bar (internal percentage) +### Barra de progreso lineal (porcentage interno) +En este caso el porcentage no toma espacio adicional. -In this case the percentage takes no additional space. - -:::demo `stroke-width` attribute decides the `width` of progress bar, and use `text-inside` attribute to put description inside the progress bar. +:::**Demo** El atributo `stroke-width` decide el ancho de la barra de progreso, y usa el atributo `text-inside` para poner la descripción dentro de la misma. ```html @@ -37,9 +35,9 @@ In this case the percentage takes no additional space. ``` ::: -### Circular progress bar +### Barra de progreso circular -:::demo You can specify `type` attribute to `circle` to use circular progress bar, and use `width` attribute to change the size of circle. +:::**Demo** Puedes asignar el atributo `type` como `circle` para usar la barra circular de progreso, y usar el atributo `width` para cambiar el tamanho del círculo. ```html @@ -49,13 +47,13 @@ In this case the percentage takes no additional space. ::: ### Attributes -| Attribute | Description | Type | Accepted Values | Default | +| Atributo | Descripción | Tipo | Valores aceptado | Valores por defecto | | --- | ---- | ---- | ---- | ---- | -| **percentage** | percentage, **required** | number | 0-100 | 0 | -| type | the type of progress bar | string | line/circle | line | -| stroke-width | the width of progress bar | number | — | 6 | -| text-inside | whether to place the percentage inside progress bar, only works when `type` is 'line' | boolean | — | false | -| status | the current status of progress bar | string | success/exception | — | -| width | the canvas width of circle progress bar | number | — | 126 | -| show-text | whether to show percentage | boolean | — | true | +| **percentage** | porcenteage, **requerido** | number | 0-100 | 0 | +| type | tipo de barra de progreso | string | line/circle | line | +| stroke-width | ancho de la barra de progreso | number | — | 6 | +| text-inside | mostrar el porcentage dentro de la barra de progreso, solo funciona cuando `type` es 'line' | boolean | — | false | +| status | estado actual de la barra de progreso | string | success/exception | — | +| width | ancho del canvas que contiene la barra de progreso circula | number | — | 126 | +| show-text | mostrar porcentage | boolean | — | true | From 1833db26d8acc13b85ab9797a5afad352071ed67 Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Sun, 12 Nov 2017 11:56:21 +0800 Subject: [PATCH 27/48] Select: fix divider and focus issue --- packages/select/src/option-group.vue | 4 ++-- packages/select/src/select.vue | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/select/src/option-group.vue b/packages/select/src/option-group.vue index a28b6b542..50cddd3f5 100644 --- a/packages/select/src/option-group.vue +++ b/packages/select/src/option-group.vue @@ -1,6 +1,6 @@ From 496ad686a2a3cb0f2514425769dfe5acf6552892 Mon Sep 17 00:00:00 2001 From: Leopoldthecoder Date: Mon, 13 Nov 2017 17:19:50 +0800 Subject: [PATCH 34/48] update es Select doc --- examples/docs/es/select.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/examples/docs/es/select.md b/examples/docs/es/select.md index 79e85c45b..22b6fa135 100644 --- a/examples/docs/es/select.md +++ b/examples/docs/es/select.md @@ -101,6 +101,7 @@ value8: '', value9: [], value10: [], + value11: [], loading: false, states: ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"] }; @@ -320,7 +321,7 @@ You can clear Select using a clear icon. Multiple select uses tags to display selected options. -:::demo Set `multiple` attribute for `el-select` to enable multiple mode. In this case, the value of `v-model` will be an array of selected options. +:::demo Set `multiple` attribute for `el-select` to enable multiple mode. In this case, the value of `v-model` will be an array of selected options. By default the selected options will be displayed as Tags. You can collapse them to a text by using `collapse-tags` attribute. ```html ## Radio +Selección única entre múltiples opciones. -Single selection among multiple options. +### Uso básico +El elemento Radio no debe tener muchas opciones. De otra manera, utilice el componente Select. -### Basic usage - -Radio should not have too many options. Otherwise, use the Select component instead. - -:::demo Creating a radio component is easy, you just need to bind a variable to Radio's `v-model`. It equals to the value of `label` of the chosen radio. The type of `label` is `String`, `Number` or `Boolean`. +:::**Demo** Crear un elemento Radio es fácil, solo necesitas enlazar(`bind`) una variable a la directiva `v-model` del Radio. Va a ser igual al valor `label` del Radio seleccionado. El tipo de dato de `label` es `String`, `Number` o `Boolean`. ```html