fix(select): fix option migrate error (#1574)

* fix(select): fix option migrate error

* docs(select): update the accepted type of model-value
This commit is contained in:
Ryan2128 2021-03-09 20:25:21 +08:00 committed by GitHub
parent 92cb1c4169
commit 543b2b08a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View File

@ -34,7 +34,7 @@ export default defineComponent({
props: {
value: {
required: true,
type: [String, Number, Object],
type: [String, Number, Boolean, Object],
},
label: [String, Number],
created: Boolean,

View File

@ -527,7 +527,7 @@ If the binding value of Select is an object, make sure to assign `value-key` as
### Select Attributes
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value / v-model | binding value | boolean / string / number | — | — |
| value / v-model | binding value | string / number / boolean / object | — | — |
| multiple | whether multiple-select is activated | boolean | — | false |
| disabled | whether Select is disabled | boolean | — | false |
| value-key | unique identity key name for value, required when value is an object | string | — | value |
@ -580,7 +580,7 @@ If the binding value of Select is an object, make sure to assign `value-key` as
### Option Attributes
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value | value of option | string/number/object | — | — |
| value | value of option | string / number / boolean / object | — | — |
| label | label of option, same as `value` if omitted | string/number | — | — |
| disabled | whether option is disabled | boolean | — | false |

View File

@ -534,7 +534,7 @@ Si el valor de encuadernación de Select es un objeto, asegúrese de asignar `va
### Select atributos
| Atributo | Descripción | Tipo | Valores aceptados | Por defecto |
| -------------------- | ---------------------------------------- | -------- | ----------------- | ---------------- |
| value / v-model | valor enlazado | boolean / string / number | — | — |
| value / v-model | valor enlazado | string / number / boolean / object | — | — |
| multiple | si multiple-select esta activo | boolean | — | false |
| disabled | si Select esta deshabilitado | boolean | — | false |
| collapse-tags | si se colapsan los tags a un texto cuando `multiple` es `true`. | boolean | — | false |
@ -587,7 +587,7 @@ Si el valor de encuadernación de Select es un objeto, asegúrese de asignar `va
### Atributos de opciones
| Atributo | Descripción | Tipo | Valores aceptados | Por defecto |
| -------- | ---------------------------------------- | -------------------- | ----------------- | ----------- |
| value | valor de option | string/number/object | — | — |
| value | valor de option | string / number / boolean / object | — | — |
| label | etiqueta de option, es igual a `value` si se omite | string/number | — | — |
| disabled | si option esta deshabilitado | boolean | — | false |

View File

@ -530,7 +530,7 @@ Si la valeur de Select est un objet, assurez-vous d'utiliser `value-key` comme i
| Attribut | Description | Type | Valeurs acceptées | Défaut |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value / v-model | La valeur liée. | boolean / string / number | — | — |
| value / v-model | La valeur liée. | string / number / boolean / object | — | — |
| multiple | Si la sélection multiple est activée. | boolean | — | false |
| disabled | Si le sélecteur est désactivé. | boolean | — | false |
| value-key | Identifiant unique pour la valeur, requis quand la valeur est un objet. | string | — | value |
@ -587,7 +587,7 @@ Si la valeur de Select est un objet, assurez-vous d'utiliser `value-key` comme i
| Attribut | Description | Type | Valeurs acceptées | Défaut |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value | Valeur de l'option. | string/number/object | — | — |
| value | Valeur de l'option. | string / number / boolean / object | — | — |
| label | Label de l'option, identique à `value` si omis. | string/number | — | — |
| disabled | Si l'option est désactivée. | boolean | — | false |

View File

@ -527,7 +527,7 @@
### 属性の選択
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value / v-model | バインディング値 | boolean / string / number | — | — |
| value / v-model | バインディング値 | string / number / boolean / object | — | — |
| multiple | 複数セレクトが有効かどうか | boolean | — | false |
| disabled | セレクトが無効になっているかどうか | boolean | — | false |
| value-key | 値がオブジェクトの場合に必要な、値の一意の ID キー名 | string | — | value |
@ -579,7 +579,7 @@
### オプション属性
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value | オプションの値 | string/number/object | — | — |
| value | オプションの値 | string / number / boolean / object | — | — |
| label | オプションのラベル、省略された場合は `value` と同じ | string/number | — | — |
| disabled | オプションが無効かどうか | boolean | — | false |

View File

@ -522,7 +522,7 @@
### Select Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value / v-model | 绑定值 | boolean / string / number | — | — |
| value / v-model | 绑定值 | string / number / boolean / object | — | — |
| multiple | 是否多选 | boolean | — | false |
| disabled | 是否禁用 | boolean | — | false |
| value-key | 作为 value 唯一标识的键名,绑定值为对象类型时必填 | string | — | value |
@ -575,7 +575,7 @@
### Option Attributes
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value | 选项的值 | string/number/object | — | — |
| value | 选项的值 | string / number / boolean / object | — | — |
| label | 选项的标签,若不设置则默认与 `value` 相同 | string/number | — | — |
| disabled | 是否禁用该选项 | boolean | — | false |