Home  >  Q&A  >  body text

"v-select component using compound tags"

<p><pre class="brush:php;toolbar:false;"><v-select v-model="pack" :debounce="250" :options="packs" placeholder="pack" :disabled="loading" label="id"> </v-select></pre> <p>Hello, I encountered a problem in v-select. I have a pack (in vue it is a computed property pack that includes id and name), when I put the id or name into the label like this in the code, the code works fine; but when I try to put the compound label (id - name), it will not work. I've tried everything but nothing works. </p>
P粉610028841P粉610028841415 days ago474

reply all(1)I'll reply

  • P粉809110129

    P粉8091101292023-08-31 00:26:04

    This worked for me:

    <v-select
          v-model="pack"
          :debounce="250"
          :items="packs"
          item-text="name"
          item-value="id"
          placeholder="pack"
          label="id">
      </v-select>

    reply
    0
  • Cancelreply