mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-10 07:52:23 +03:00
docs: autogenerate events, props
This commit is contained in:
+5
-37
@@ -1,39 +1,7 @@
|
||||
## `input`
|
||||
---
|
||||
title: API/Events
|
||||
api: events
|
||||
---
|
||||
|
||||
Triggered when the selected value changes. Used internally for `v-model`.
|
||||
<api-events />
|
||||
|
||||
```js
|
||||
/**
|
||||
* @param val {Object|String}` - selected option.
|
||||
*/
|
||||
this.$emit("input", val);
|
||||
```
|
||||
|
||||
## `option:created`
|
||||
|
||||
Triggered when `taggable` is `true` and a new option has been created.
|
||||
|
||||
```js
|
||||
/**
|
||||
* @param newOption {Object} - created option
|
||||
*/
|
||||
this.$emit("option:created", newOption);
|
||||
```
|
||||
|
||||
## `search:blur`
|
||||
|
||||
Triggered when the text input loses focus. The dropdown will close immediately before this
|
||||
event is triggered.
|
||||
|
||||
```js
|
||||
this.$emit("search:blur");
|
||||
```
|
||||
|
||||
## `search:focus`
|
||||
|
||||
Triggered when the text input gains focus. The dropdown will open immediately before this
|
||||
event is triggered.
|
||||
|
||||
```js
|
||||
this.$emit("search:focus");
|
||||
```
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
api: methods
|
||||
---
|
||||
|
||||
<ApiMethods />
|
||||
|
||||
+5
-1
@@ -1 +1,5 @@
|
||||
<ApiDocs type="props" />
|
||||
---
|
||||
api: props
|
||||
---
|
||||
|
||||
<api-props type="props" />
|
||||
|
||||
Reference in New Issue
Block a user