mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
bump readme
This commit is contained in:
@@ -4,16 +4,17 @@
|
|||||||
|
|
||||||
#### Features
|
#### Features
|
||||||
|
|
||||||
- No Dependencies
|
- **Tagging Support (+v.1.1.0)**
|
||||||
|
- No JS Dependencies
|
||||||
- List Filtering/Searching
|
- List Filtering/Searching
|
||||||
- Supports Vuex
|
- Supports Vuex
|
||||||
- Select Single/Multiple Options
|
- Select Single/Multiple Options
|
||||||
- Bootstrap Friendly Classes
|
- Bootstrap Friendly Markup
|
||||||
- Excellent Test Coverage
|
- +90% Test Coverage
|
||||||
|
|
||||||
#### Upcoming/In Progress
|
#### Upcoming/In Progress
|
||||||
|
|
||||||
- Tagging (adding options not present in list, see `taggable` branch)
|
- ~~Tagging (adding options not present in list, see `taggable` branch)~~ **added in v.1.1.0**
|
||||||
- Rich Option Templating
|
- Rich Option Templating
|
||||||
- Asyncronous Option Loading
|
- Asyncronous Option Loading
|
||||||
|
|
||||||
@@ -50,7 +51,7 @@ export default {
|
|||||||
```javascript
|
```javascript
|
||||||
/**
|
/**
|
||||||
* Contains the currently selected value. Very similar to a
|
* Contains the currently selected value. Very similar to a
|
||||||
* `value` attribute on an <input>. In most cases, you'll want
|
* `value` attribute on an <input>. In most cases, you'll want
|
||||||
* to set this as a two-way binding, using :value.sync. However,
|
* to set this as a two-way binding, using :value.sync. However,
|
||||||
* this will not work with Vuex, in which case you'll need to use
|
* this will not work with Vuex, in which case you'll need to use
|
||||||
* the onChange callback property.
|
* the onChange callback property.
|
||||||
@@ -65,13 +66,23 @@ export default {
|
|||||||
* If you are using an array of objects, vue-select will look for
|
* If you are using an array of objects, vue-select will look for
|
||||||
* a `label` key (ex. [{label: 'This is Foo', value: 'foo'}]). A
|
* a `label` key (ex. [{label: 'This is Foo', value: 'foo'}]). A
|
||||||
* custom label key can be set with the `label` prop.
|
* custom label key can be set with the `label` prop.
|
||||||
* @type {Array}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
options: {
|
options: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() { return [] },
|
default() { return [] },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the max-height property on the dropdown list.
|
||||||
|
* @deprecated
|
||||||
|
* @type {String}
|
||||||
|
*/
|
||||||
|
maxHeight: {
|
||||||
|
type: String,
|
||||||
|
default: '400px'
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable filtering the options.
|
* Enable/disable filtering the options.
|
||||||
* @type {Boolean}
|
* @type {Boolean}
|
||||||
@@ -82,7 +93,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Equivalent to the `multiple` attribute on a `<select>` input.
|
* Equivalent to the `multiple` attribute on a `<select>` input.
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
multiple: {
|
multiple: {
|
||||||
@@ -91,7 +102,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Equivalent to the `placeholder` attribute on an `<input>`.
|
* Equivalent to the `placeholder` attribute on an `<input>`.
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
placeholder: {
|
placeholder: {
|
||||||
@@ -119,9 +130,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells vue-select what key to use when generating option labels when
|
* Tells vue-select what key to use when generating option
|
||||||
* `option` is an object.
|
* labels when each `option` is an object.
|
||||||
* @type {Object}
|
* @type {String}
|
||||||
*/
|
*/
|
||||||
label: {
|
label: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -132,7 +143,8 @@ export default {
|
|||||||
* An optional callback function that is called each time the selected
|
* An optional callback function that is called each time the selected
|
||||||
* value(s) change. When integrating with Vuex, use this callback to trigger
|
* value(s) change. When integrating with Vuex, use this callback to trigger
|
||||||
* an action, rather than using :value.sync to retreive the selected value.
|
* an action, rather than using :value.sync to retreive the selected value.
|
||||||
* @type {[type]}
|
* @type {Function}
|
||||||
|
* @default {null}
|
||||||
*/
|
*/
|
||||||
onChange: Function,
|
onChange: Function,
|
||||||
|
|
||||||
@@ -140,7 +152,17 @@ export default {
|
|||||||
* Enable/disable creating options from searchInput.
|
* Enable/disable creating options from searchInput.
|
||||||
* @type {Boolean}
|
* @type {Boolean}
|
||||||
*/
|
*/
|
||||||
tagable: {
|
taggable: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When true, newly created tags will be added to
|
||||||
|
* the options list.
|
||||||
|
* @type {Boolean}
|
||||||
|
*/
|
||||||
|
pushTags: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
@@ -151,15 +173,11 @@ export default {
|
|||||||
*/
|
*/
|
||||||
createOption: {
|
createOption: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default: function (value) {
|
default: function (newOption) {
|
||||||
let firstOption = this.options[0]
|
if (typeof this.options[0] === 'object') {
|
||||||
if (firstOption && typeof firstOption === 'object' ) {
|
return {[this.label]: newOption}
|
||||||
value = {
|
|
||||||
value
|
|
||||||
}
|
}
|
||||||
value[this.label] = value
|
return newOption
|
||||||
}
|
|
||||||
return value
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user