feat(components): [el-select] add effect and close #5956 (#5976)

This commit is contained in:
BeADre 2022-02-11 23:13:33 +08:00 committed by GitHub
parent cd2fe007e1
commit 99f378a63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 2 deletions

View File

@ -137,6 +137,7 @@ select-v2/remote-search
| collapse-tags | whether to collapse tags to a text when multiple selecting | boolean | — | false |
| multiple-limit | maximum number of options user can select when multiple is true. No limit when set to 0 | number | — | 0 |
| name | the name attribute of select input | string | — | — |
| effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | light |
| autocomplete | autocomplete of select input | string | — | off |
| placeholder | the autocomplete attribute of select input | string | — | Please select |
| filterable | is filterable | boolean | — | false |

View File

@ -122,6 +122,7 @@ If the binding value of Select is an object, make sure to assign `value-key` as
| collapse-tags | whether to collapse tags to a text when multiple selecting | boolean | — | false |
| multiple-limit | maximum number of options user can select when `multiple` is `true`. No limit when set to 0 | number | — | 0 |
| name | the name attribute of select input | string | — | — |
| effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | light |
| autocomplete | the autocomplete attribute of select input | string | — | off |
| placeholder | placeholder | string | — | Select |
| filterable | whether Select is filterable | boolean | — | false |

View File

@ -58,6 +58,7 @@ time-select/time-range
| size | size of Input | string | large / default / small | default |
| placeholder | placeholder in non-range mode | string | — | — |
| name | same as `name` in native input | string | — | — |
| effect | Tooltip theme, built-in theme: `dark` / `light` | string | string | light |
| prefix-icon | Custom prefix icon component | string / Component | — | Clock |
| clear-icon | Custom clear icon component | string / Component | — | CircleClose |
| start | start time | string | — | 09:00 |

View File

@ -19,6 +19,10 @@ export const SelectProps = {
type: [String, Object] as PropType<string | Component>,
default: CircleClose,
},
effect: {
type: String as PropType<'light' | 'dark' | string>,
default: 'light',
},
collapseTags: Boolean,
defaultFirstOption: Boolean,
disabled: Boolean,

View File

@ -16,7 +16,7 @@
:stop-popper-mouse-event="false"
:popper-options="popperOptions"
:fallback-placements="['bottom-start', 'top-start', 'right', 'left']"
effect="light"
:effect="effect"
placement="bottom-start"
pure
:transition="`${nsSelectV2.namespace.value}-zoom-in-top`"

View File

@ -12,7 +12,7 @@
:teleported="compatTeleported"
:popper-class="[nsSelect.e('popper'), popperClass]"
:fallback-placements="['bottom-start', 'top-start', 'right', 'left']"
effect="light"
:effect="effect"
pure
trigger="click"
:transition="`${nsSelect.namespace.value}-zoom-in-top`"
@ -279,6 +279,10 @@ export default defineComponent({
type: String as PropType<ComponentSize>,
validator: isValidComponentSize,
},
effect: {
type: String as PropType<'light' | 'dark' | string>,
default: 'light',
},
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,

View File

@ -6,6 +6,7 @@
:clearable="clearable"
:clear-icon="clearIcon"
:size="size"
:effect="effect"
:placeholder="placeholder"
default-first-option
:filterable="editable"
@ -117,6 +118,10 @@ export default defineComponent({
type: Boolean,
default: true,
},
effect: {
type: String as PropType<'light' | 'dark' | string>,
default: 'light',
},
clearable: {
type: Boolean,
default: true,