chore: move has multiple calculation to computed
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
b76250196a
commit
70f78758a2
|
@ -9,7 +9,7 @@
|
|||
<div class="control" :class="{'is-loading': loading || localLoading}">
|
||||
<div
|
||||
class="input-wrapper input"
|
||||
:class="{'has-multiple': multiple && Array.isArray(internalValue) && internalValue.length > 0}">
|
||||
:class="{'has-multiple': hasMultiple}">
|
||||
<template v-if="Array.isArray(internalValue)">
|
||||
<template v-for="(item, key) in internalValue">
|
||||
<slot name="tag" :item="item">
|
||||
|
@ -232,6 +232,9 @@ export default {
|
|||
|
||||
return this.searchResults
|
||||
},
|
||||
hasMultiple() {
|
||||
return this.multiple && Array.isArray(this.internalValue) && this.internalValue.length > 0
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// Searching will be triggered with a 200ms delay to avoid searching on every keyup event.
|
||||
|
|
Reference in New Issue
Block a user