gpt4 book ai didi

vue.js - Vuetify.js - 内的 没有 消失就无法聚焦

转载 作者:行者123 更新时间:2023-12-04 17:44:26 25 4
gpt4 key购买 nike

考虑以下布局:

<v-menu>
<span slot="activator">Open dropdown</span>
<v-list>
<v-list-tile @click=""><v-list-tile-title>Menu item 1</v-list-tile-title></v-list-tile>
<v-list-tile @click=""><v-list-tile-title>Menu item 2</v-list-tile-title></v-list-tile>
<v-list-tile @click=""><v-list-tile-title>Menu item 3</v-list-tile-title></v-list-tile>
<v-list-tile @click=""><v-text-field label="Search" append-icon="search"></v-text-field></v-list-tile>
</v-list>
</v-menu>

这会呈现一个“按钮”以打开下拉菜单,其中包含 3 个菜单项和一个用于搜索的文本输入字段作为第 4 个项目。问题是专注于文本字段会自动折叠菜单。感谢所有帮助,提前致谢。

最佳答案

只需添加 :close-on-click="false":close-on-content-click="false"

<v-menu  :close-on-content-click="false"  :close-on-click="false">
<span slot="activator">Open dropdown</span>
<v-list>
<v-list-tile @click=""><v-list-tile-title>Menu item 1</v-list-tile-title></v-list-tile>
<v-list-tile @click=""><v-list-tile-title>Menu item 2</v-list-tile-title></v-list-tile>
<v-list-tile @click=""><v-list-tile-title>Menu item 3</v-list-tile-title></v-list-tile>
<v-list-tile @click=""><v-text-field label="Search" append-icon="search"></v-text-field></v-list-tile>
</v-list>
</v-menu>

关于vue.js - Vuetify.js - <v-menu> 内的 <v-text-field> 没有 <v-menu> 消失就无法聚焦,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52757417/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com