|
298 | 298 | <i v-if="!noDrop" ref="openIndicator" role="presentation" class="open-indicator"></i>
|
299 | 299 |
|
300 | 300 | <slot name="spinner">
|
301 |
| - <div class="spinner" v-show="mutableLoading">Loading...</div> |
| 301 | + <div class="spinner" v-show="mutableLoading">{{ loadingText }}</div> |
302 | 302 | </slot>
|
303 | 303 | </div>
|
304 | 304 |
|
|
310 | 310 | </a>
|
311 | 311 | </li>
|
312 | 312 | <li v-if="!filteredOptions.length" class="no-options">
|
313 |
| - <slot name="no-options">Sorry, no matching options.</slot> |
| 313 | + <slot name="no-options">{{ noMatchText }}</slot> |
314 | 314 | </li>
|
315 | 315 | </ul>
|
316 | 316 | </transition>
|
|
341 | 341 | * If you are using an array of objects, vue-select will look for
|
342 | 342 | * a `label` key (ex. [{label: 'This is Foo', value: 'foo'}]). A
|
343 | 343 | * custom label key can be set with the `label` prop.
|
344 |
| - * @type {Object} |
| 344 | + * @type {Array} |
345 | 345 | */
|
346 | 346 | options: {
|
347 | 347 | type: Array,
|
|
371 | 371 |
|
372 | 372 | /**
|
373 | 373 | * Equivalent to the `multiple` attribute on a `<select>` input.
|
374 |
| - * @type {Object} |
| 374 | + * @type {Boolean} |
375 | 375 | */
|
376 | 376 | multiple: {
|
377 | 377 | type: Boolean,
|
|
380 | 380 |
|
381 | 381 | /**
|
382 | 382 | * Equivalent to the `placeholder` attribute on an `<input>`.
|
383 |
| - * @type {Object} |
| 383 | + * @type {String} |
384 | 384 | */
|
385 | 385 | placeholder: {
|
386 | 386 | type: String,
|
387 | 387 | default: ''
|
388 | 388 | },
|
389 | 389 |
|
| 390 | + /** |
| 391 | + * Text to show if there is no matching options |
| 392 | + * @type {String} |
| 393 | + */ |
| 394 | + noMatchText: { |
| 395 | + type: String, |
| 396 | + default: 'Sorry, no matching options.' |
| 397 | + }, |
| 398 | +
|
| 399 | + /** |
| 400 | + * Text to show when loading |
| 401 | + * @type {String} |
| 402 | + */ |
| 403 | + loadingText: { |
| 404 | + type: String, |
| 405 | + default: 'Loading...' |
| 406 | + }, |
| 407 | +
|
390 | 408 | /**
|
391 | 409 | * Sets a Vue transition property on the `.dropdown-menu`. vue-select
|
392 | 410 | * does not include CSS for transitions, you'll need to add them yourself.
|
|
429 | 447 | /**
|
430 | 448 | * Callback to generate the label text. If {option}
|
431 | 449 | * is an object, returns option[this.label] by default.
|
| 450 | + * @type {Function} |
432 | 451 | * @param {Object || String} option
|
433 | 452 | * @return {String}
|
434 | 453 | */
|
|
449 | 468 | * value(s) change. When integrating with Vuex, use this callback to trigger
|
450 | 469 | * an action, rather than using :value.sync to retreive the selected value.
|
451 | 470 | * @type {Function}
|
452 |
| - * @default {null} |
| 471 | + * @param {Object || String} val |
453 | 472 | */
|
454 | 473 | onChange: {
|
455 | 474 | type: Function,
|
|
0 commit comments