diff --git a/examples/docs/es/cascader.md b/examples/docs/es/cascader.md index 6b7a4e292..aa5817e8f 100644 --- a/examples/docs/es/cascader.md +++ b/examples/docs/es/cascader.md @@ -280,13 +280,14 @@ ## Cascader -If the options have a clear hierarchical structure, Cascader can be used to view and select them. +Si las opciones tienen una estructura jerárquica clara, Cascader puede utilizarse para visualizarlas y seleccionarlas. -### Basic usage +### Uso básico -There are two ways to expand child option items. +Existen dos maneras de expandir los elementos hijo de la opción. + +:::demo Al asignar al atributo `options` un array de opciones, se genera un Cascader. El atributo `expand-trigger` define cómo se expanden las opciones hijo. Este ejemplo también muestra el evento `change` , cuyo parámetro es el valor de Cascader, un array formado por los valores de cada nivel seleccionado. -:::demo Assigning the `options` attribute to an array of options renders a Cascader. The `expand-trigger` attribute defines how child options are expanded. This example also demonstrates the `change` event, whose parameter is the value of Cascader, an array made up of the values of each selected level. ```html
Child options expand when clicked (default) @@ -519,11 +520,12 @@ There are two ways to expand child option items. ``` ::: -### Disabled option +### Opcion Disabled -Disable an option by setting a `disabled` field in the option object. +Para desactivar una opción configure un campo `disabled` en el objeto de opción. + +:::demo En este ejemplo, el primer elemento del array `options` tiene un campo `disabled: true` , por lo que está desactivado. Por defecto, Cascader verifica el campo `disabled` en cada objeto de opción; si está utilizando otro nombre de campo para indicar si una opción está deshabilitada, puede asignarla en el atributo `props` (consulte la tabla API a continuación para obtener más detalles). Y por supuesto, el valor de `value`, `label` y `children` también se pueden personalizar de la misma manera. -:::demo In this example, the first item in `options` array has a `disabled: true` field, so it is disabled. By default, Cascader checks the `disabled` field in each option object; if you are using another field name to indicate whether an option is disabled, you can assign it in the `props` attribute (see the API table below for details). And of course, field name `value`, `label` and `children` can also be customized in the same way. ```html Only options of the last level can be selected @@ -1663,34 +1669,35 @@ Search and select options with a keyword. ``` ::: -### Attributes -| Attribute | Description | Type | Options | Default| -|---------- |-------------------- |---------|------------- |-------- | -| options | data of the options | array | — | — | -| props | configuration options, see the following table | object | — | — | -| value | selected value | array | — | — | -| popper-class | custom class name for Cascader's dropdown | string | — | — | -| placeholder | input placeholder | string | — | Select | -| disabled | whether Cascader is disabled | boolean | — | false | -| clearable | whether selected value can be cleared | boolean | — | false | -| expand-trigger | trigger mode of expanding current item | string | click / hover | click | -| show-all-levels | whether to display all levels of the selected value in the input | boolean | — | true | -| filterable | whether the options can be searched | boolean | — | — | -| debounce | debounce delay when typing filter keyword, in milliseconds | number | — | 300 | -| change-on-select | whether selecting an option of any level is permitted | boolean | — | false | -| size | size of Input | string | medium / small / mini | — | -| before-filter | hook function before filtering with the value to be filtered as its parameter. If `false` is returned or a `Promise` is returned and then is rejected, filtering will be aborted | function(value) | — | — | +### Atributos +| Atributo | Descripción | Tipo | Opciones | Por defecto | +| ---------------- | ---------------------------------------- | --------------- | --------------------- | ----------- | +| options | datos de las opciones | array | — | — | +| props | opciones de configuration, mire la tabla siguiente | object | — | — | +| value | valor seleccionado | array | — | — | +| popper-class | nombre de clase para el Cascader's dropdown | string | — | — | +| placeholder | input placeholder | string | — | Select | +| disabled | si Cascader esta disabled | boolean | — | false | +| clearable | si se puede borrar el valor seleccionado | boolean | — | false | +| expand-trigger | evento del elemento actual para expandirse. | string | click / hover | click | +| show-all-levels | si mostrar todos los niveles del valor seleccionado en la entrada | boolean | — | true | +| filterable | si se pueden buscar las opciones | boolean | — | — | +| debounce | retardo al escribir la palabra clave del filtro, en milisegundos | number | — | 300 | +| change-on-select | si se permite seleccionar una opción de cualquier nivel | boolean | — | false | +| size | tamaño del input | string | medium / small / mini | — | +| before-filter | funcion antes de filtrar con el valor a filtrar como parámetro. Si se devuelve `false` o se devuelve una `Promise` y luego es rechazada, el filtrado será abortado. | function(value) | — | — | ### props -| Attribute | Description | Type | Accepted Values | Default | -| --------- | ----------------- | ------ | ------ | ------ | -| label | specify which key of option object is used as the option's label | string | — | — | -| value | specify which key of option object is used as the option's value | string | — | — | -| children | specify which key of option object is used as the option's child options | string | — | — | -| disabled | specify which key of option object indicates if the option is disabled | string | — | — | +| Atributo | Descripción | Tipo | Valores aceptados | Por defecto | +| -------- | ---------------------------------------- | ------ | ----------------- | ----------- | +| label | especifica qué clave del elemento de la opción se utiliza como etiqueta | string | — | — | +| value | especifica qué clave del elemento de la opción se utiliza como valor | string | — | — | +| children | especifica qué clave del elemento de la opción se utiliza como hijo | string | — | — | +| disabled | especifica qué clave del elemento de la opción indica si está deshabilitada | string | — | — | + +### Eventos +| Nombre | Descripción | Parametros | +| ------------------ | ---------------------------------------- | ------------------------- | +| change | se dispara cuando el valor cambia | valor | +| active-item-change | se dispara cuando cambia la opción activa, sólo funciona cuando `change-on-select` es `false`. | array de opciones activas | -### Events -| Event Name | Description | Parameters | -|---------- |-------- |---------- | -| change | triggers when the binding value changes | value | -| active-item-change | triggers when active option changes, only works when `change-on-select` is `false` | an array of active options |