Vuetify的组合框存在两个问题:
当我基本上只是直接从文档中复制并根据需要进行调整时,我不知道我在做什么错。
<v-combobox
@focus="isShaped = true"
@blur="isShaped = false"
v-model="card_name"
:loading="isLoading"
:items="cards"
hide-no-data
prepend-inner-icon="mdi-magnify"
append-icon=""
outlined rounded :shaped="isShaped"
label="Search for a card"
:search-input.sync="search"
item-text="name"
item-value="set_name"
>
<template v-slot:item="{ item }">
<v-list-item>
<v-list-item-content>
<v-list-item-title class="mb-2">{{item.name}}</v-list-item-title>
<v-list-item-subtitle>{{item.set_name}}</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
</template>
<template v-slot:selection="{ item }">
<span v-text="item.name"></span>
</template>
<template v-slot:progress>
<v-progress-circular
class="mt-3"
v-if="isLoading"
indeterminate
color="primary"
:width="2"
:size="30"
></v-progress-circular>
</template>
</v-combobox>
这是codepen:https://codepen.io/chataolauj/pen/RwwYxBg?editors=1010