vue.js - v-select vuetify 最大元素数

标签 vue.js vuetify.js v-select

v-select 似乎只显示数组中的 20 个元素,即使数组(人员)有 22 个元素,但如果我使用自动完成功能,我可以在列表中看到那 2 个缺失的人,所以他们实际上直到我开始寻找使用自动完成功能时才显示。代码如下:

<v-select
  :items="persons"
  v-model="model.persons"
  label="Persons:"
  item-text="name"
  item-value="id"
  multiple
  chips
  max-height="auto"
  autocomplete
>
  <template slot="selection" slot-scope="data">
    <v-chip
      :selected="data.selected"
      :key="JSON.stringify(data.item)"
      close
      class="chip--select-multi"
      @input="data.parent.selectItem(data.item)"
    >
       {{ data.item.name }}
    </v-chip>
  </template>
  <template slot="item" slot-scope="data">
    <template v-if="typeof data.item !== 'object'">
      <v-list-tile-content v-text="data.item"></v-list-tile-content>
    </template>
    <template v-else>                       
      <v-list-tile-content>
        <v-list-tile-title v-html="data.item.name"></v-list-tile-title>
      </v-list-tile-content>
    </template>
  </template>
</v-select>

是否有任何 v-select 选项可用于增加该数字?

最佳答案

menu-props="auto" 属性传递给 v-select 修复了这个问题。

<v-select
  ...
  menu-props="auto"
>

关于vue.js - v-select vuetify 最大元素数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59773205/

相关文章:

vue.js - VueJS和数据表

javascript - 我想让 v-card 透明,但它不能正常工作

javascript - 相同功能按钮,但分别使用 Vue 和 Vuetify

javascript - 引导表中的 vue v-select

nuxt.js - 验证 : editing no-data-text prop or no-data slot for v-select doesn't seem to have any effect

javascript - Vuetify v-select 值不返回键

javascript - 需要使用 Vue 获取点击元素 'Name'

typescript - 如何使用 typescript 在 vue 类样式组件中双向绑定(bind) v-model 对象

javascript - Vitest - FormData 不是测试单元的构造函数问题

javascript - 如何修复错误并在 Laravel/Vue 应用程序中正确使用 Vuetify