mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-27 01:23:55 +08:00
fix: 修复点击用户框无法关闭菜单问题
This commit is contained in:
@@ -210,6 +210,7 @@ export default {
|
|||||||
paramDropdownVisible: false,
|
paramDropdownVisible: false,
|
||||||
voiceCloneDropdownVisible: false,
|
voiceCloneDropdownVisible: false,
|
||||||
userMenuVisible: false, // 添加用户菜单可见状态
|
userMenuVisible: false, // 添加用户菜单可见状态
|
||||||
|
menuVisibleTimer: null, // 菜单显示定时器,防止够快触发
|
||||||
isSmallScreen: false,
|
isSmallScreen: false,
|
||||||
// 搜索历史相关
|
// 搜索历史相关
|
||||||
searchHistory: [],
|
searchHistory: [],
|
||||||
@@ -631,7 +632,12 @@ export default {
|
|||||||
|
|
||||||
// 处理用户菜单可见性变化
|
// 处理用户菜单可见性变化
|
||||||
handleUserMenuVisibleChange(visible) {
|
handleUserMenuVisibleChange(visible) {
|
||||||
this.userMenuVisible = visible;
|
if (this.menuVisibleTimer) return;
|
||||||
|
this.menuVisibleTimer = setTimeout(() => {
|
||||||
|
this.userMenuVisible = visible;
|
||||||
|
clearTimeout(this.menuVisibleTimer);
|
||||||
|
this.menuVisibleTimer = null;
|
||||||
|
}, 100);
|
||||||
|
|
||||||
// 如果菜单关闭了,也要清空选择值
|
// 如果菜单关闭了,也要清空选择值
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
|
|||||||
Reference in New Issue
Block a user