Select fields components are used for collecting user provided information from a list of options.
When using objects for the items prop, you must associate item-text and item-value with existing properties on your objects. These values are defaulted to text and value and can be changed.
The auto property of menu-props is only supported for the default input style.
제공되는 Props, Slots, Events 와 함수들을 이용하여 원하는 컴포넌트를 직접 구현해 보세요.
Appends an icon to the component, uses the same syntax as v-icon
Appends an icon to the outside the component's input, uses same syntax as v-icon
Specifies which DOM element that this component should detach to. String can be any valid querySelector and Object can be any valid Node. This will attach to the root v-app
component by default.
오토 포커스 활성화
Changes the background-color of the input
items prop으로 넘겨진 모든 항목의 유니크한 로컬 사본을 보관합니다.
Changes display of selections to chips
Applied when using clearable and the input is dirty
Add input clear functionality, default icon is Material Icons clear
Applies specified color to the control - it can be the name of material color (for example success
or purple
) or css color (#033
or rgba(255, 0, 0, 0.5)
). You can find list of built in classes on the colors page.
인풋 길이 카운터를 생성. 넘버가 지정되지 않으면 25가 기본 값으로 쓰입니다. 검증(validation)은 적용되지 않습니다.
Applies the dark theme variant to the component. This will default the components color to white unless you've configured your application theme to dark or if you are using the color prop on the component. You can find more information on the Material Design documentation for dark themes.
선택된 칩(chip)에 삭제(remove) 아이콘을 추가
Reduces the input height
Disables keyboard lookup
인풋(input)을 비활성화
Will force the components content to render on mounted. This is useful if you have content that will not be rendered in the DOM that you want crawled for SEO.
수동으로 인풋을 에러 상태로 만듬
The total number of errors that should display at once
Puts the input in an error state and passes through custom error messages. Will be combined with any validations that occur from the rules prop. This field will not trigger validation
Applies the alternate filled input style
아이템을 필터링하는데 사용되는 함수
solo나 solo-inverted prop을 사용할때 요소의 높이(elevation)와 그림자를 제거
Designates input type as full-width
Sets the height of the input
Hides hint and validation errors. When set to auto
messages will be rendered only if there's a message (hint, error message, counter value etc) to display
이미 선택된 셀렉트 메뉴 항목을 보여주지 않음
Hint text
컴포넌트의 DOM 아이디를 설정
Sets color of selected items
항목 의 비활성화(disabled) 값 속성을 설정
항목 의 텍스트 값 속성을 설정
Set property of items's value - must be primitive. Dot notation is supported. Note: This is currently not supported with v-combobox
GitHub Issue
Can be an array of objects or array of strings. When using objects, will look for a text, value and disabled keys. This can be changed using the item-text, item-value and item-disabled props. Objects that have a header or divider property are considered special cases and generate a list header or divider; these items are not selectable.
{
text: string | number | object
value: string | number | object
disabled: boolean
divider: boolean
header: string
}
Sets input label
Applies the light theme variant to the component.
Specifies the height of the loader
선형 프로그레스바를 표시. 프로그레스바의 색을 나타내는 문자열(마테리얼 이나 테마 색상 - primary, secondary, success, info, warning, error)이나 부울값(boolean) 이 가능. 부울값의 경우 컴포넌트 색상(컴포넌트가 지원할 경우 color prop으로 지정된 값)이나 primary 색상이 사용됨
Pass props through to the v-menu
component. Accepts either a string for boolean props menu-props="auto, overflowY"
, or an object :menu-props="{ auto: true, overflowY: true }"
Displays a list of messages or message if using a string
복수 선택이 가능하도록 변경. 값의 배열을 받음(?).
데이터가 없을때 보여지는 문자열
clearable prop을 사용할때, 일단 한번 클리어되면 현재 상태에 따라 선택 메뉴가 열리거나 열려있게 됩니다. When using the clearable prop, once cleared
Applies the outlined style to the input
Forces hint to always be visible
Sets the input’s placeholder text
접두사(prefix) 표시
Prepends an icon to the component, uses the same syntax as v-icon
Prepends an icon inside the component's input, uses the same syntax as v-icon
Puts input in readonly state
선택시 item-value 로 지정된 값이 아니라 오브젝트가 바로 반환되도록 바꿈.
Reverses the input orientation
Adds a border radius to the input
Accepts an array of functions that take an input value as an argument and return either true
/ false
or a string
with an error message
Round if outlined
and increase border-radius
if filled
. Must be used with either outlined
or filled
Label does not move on focus/dirty
Changes display of selections to chips with the small property
인풋의 스타일을 바꿈
포커스 되지 않은 요소의 불투명도를 낮춤
Puts the input in a manual success state
Puts the input in a success state and passes through custom success messages.
접미사(suffix) 표시
인풋 타입을 설정
blur 이벤트까지 검증을 지연
The input's value
Apply a custom value comparator function
Adds an item inside the input and after input content
Adds an item after menu content
Adds an item outside the input and after input content
The default Vue slot.
Define a custom item appearance
{
parent: VueComponent
item: object
on: object // Only needed when providing your own v-list-item
attrs: object // Only needed when providing your own v-list-item
}
Replaces the default label
Customize the messages slot.
{
key: number, // the messages index
message: string, // the message
}
필터링된 아이템이 없을때 보여짐
Adds an item outside the input and before input content
Adds an item inside the input and before input content
Adds an item before menu content
커스텀 프로그레스 바를 위한 슬롯(loading prop이 부울 False 가 아닐때 표시)
Define a custom selection appearance
{
parent: VueComponent
item: object
index: number
select: function
selected: boolean
disabled: boolean
}
Emitted when the input is blurred
Event
Emitted when the input is changed by user interaction
any
Emitted when input is clicked
MouseEvent
Emitted when appended icon is clicked
Event
Emitted when appended outer icon is clicked
Event
Emitted when clearable icon clicked
Event
Emitted when prepended icon is clicked
Event
Emitted when prepended inner icon is clicked
Event
Emitted when component is focused
Event
연결된 모델을 업데이트 (The updated bound model)
any
Emitted when any key is pressed
KeyboardEvent
Emitted when click is pressed
MouseEvent
Emitted when click is released
MouseEvent
The error.sync
event
boolean
Emitted when menu item is selected using keyboard arrows
number
The search-input.sync
event
string
0.2 !default;
true !default;
4px !default;
68px !default;
40px !default;
40px !default;
42px !default;
0 4px 0 4px !default;
5px 4px 3px 0 !default;
4px 0 !default;
8px 0 !default;
20px !default;
7px !default;
.22 !default;
18px !default;
7px 4px 7px 0 !default;
20px !default;
38px !default;
26px !default;
Browser autocomplete is set to off by default, may vary by browser and may be ignored. MDN
간단한 예재부터 복잡한 예제까지 아래를 참고해서 앱 개발을 시작해 보세요.
You cannot use disabled v-select
.
You cannot use read-only v-select
, but it looks default.
표준 단일 셀렉트는 다양한 설정 옵션을 가지고 있습니다.
앞이나 뒤에 커스텀 아이콘 붙이세요
multi-select 에서 선택된 항목들을 보여줄때 v-chip
을 사용할 수 있습니다.
You can use dense
prop to reduce the field height and lower max height of list items.
텍스트와 값 필드에 해당하는 항목 배열 내의 특정 속성을 지정할 수 있습니다. 기본값은 text 와 value 입니다. 이 예제에서는 선택된 아이템의 전체 오브젝트를 반환하는 return-opject
prop을 사용합니다..
Custom props can be passed directly to v-menu
using menuProps
prop. In this example menu is force directed to top and shifted to top.
The v-select
components can be optionally expanded with prepended and appended items. This is perfect for customized select-all functionality.
The selection
slot can be used to customize the way selected values are shown in the input. This is great when you want something like foo (+20 others)
or don't want the selection to occupy multiple lines.