From bd140af7147412d6ecd345ef8ae33e73baef08b8 Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Thu, 15 May 2025 09:54:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96headerbar=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/manager-web/src/components/HeaderBar.vue | 65 ++++--------------- 1 file changed, 13 insertions(+), 52 deletions(-) diff --git a/main/manager-web/src/components/HeaderBar.vue b/main/manager-web/src/components/HeaderBar.vue index 39075462..842441ce 100644 --- a/main/manager-web/src/components/HeaderBar.vue +++ b/main/manager-web/src/components/HeaderBar.vue @@ -58,7 +58,7 @@
-
+
@@ -103,7 +103,8 @@ export default { }, isChangePasswordDialogVisible: false, // 控制修改密码弹窗的显示 userDropdownVisible: false, - paramDropdownVisible: false + paramDropdownVisible: false, + isSmallScreen: false } }, computed: { @@ -113,7 +114,13 @@ export default { } }, mounted() { - this.fetchUserInfo() + this.fetchUserInfo(); + this.checkScreenSize(); + window.addEventListener('resize', this.checkScreenSize); + }, + //移除事件监听器 + beforeDestroy() { + window.removeEventListener('resize', this.checkScreenSize); }, methods: { goHome() { @@ -147,7 +154,9 @@ export default { } }) }, - + checkScreenSize() { + this.isSmallScreen = window.innerWidth <= 1386; + }, // 处理搜索 handleSearch() { const searchValue = this.search.trim(); @@ -354,45 +363,6 @@ export default { } } -@media (max-width: 1024px) { - .search-container { - margin-right: 10px; - max-width: 150px; - } - - .header-right { - gap: 5px; - } -} - -@media (max-width: 900px) { - .header-left { - margin-right: auto; - } - - .search-container { - max-width: 150px; - } -} - -@media (max-width: 768px) { - .search-container { - max-width: 145px; - } - - .custom-search-input>>>.el-input__inner { - padding-left: 10px; - font-size: 11px; - } -} - -@media (max-width: 600px) { - .search-container { - max-width: 120px; - min-width: 100px; - } -} - .equipment-management.more-dropdown { position: relative; } @@ -411,13 +381,4 @@ export default { color: #606266; white-space: nowrap; } - -@media (max-width: 768px) { - .equipment-management.more-dropdown .el-dropdown-menu { - position: fixed; - right: 10px; - top: 60px; - z-index: 2000; - } -} \ No newline at end of file From ead9ee81fb59c7b24528f49d42ce110ab0d7edd1 Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Thu, 15 May 2025 15:39:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:summaryMemory=20key=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/xiaozhi-server/core/utils/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/utils/util.py b/main/xiaozhi-server/core/utils/util.py index b95f43d2..875adde0 100644 --- a/main/xiaozhi-server/core/utils/util.py +++ b/main/xiaozhi-server/core/utils/util.py @@ -319,7 +319,7 @@ def initialize_modules( modules["memory"] = memory.create_instance( memory_type, config["Memory"][select_memory_module], - config['summaryMemory'], + config.get('summaryMemory', ''), ) logger.bind(tag=TAG).info(f"初始化组件: memory成功 {select_memory_module}") From a2c2eab6b3805d84f78fba352eacb39a948dd0b3 Mon Sep 17 00:00:00 2001 From: Sakura-RanChen <1908198662@qq.com> Date: Thu, 15 May 2025 15:46:53 +0800 Subject: [PATCH 3/3] no message --- main/xiaozhi-server/core/utils/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/xiaozhi-server/core/utils/util.py b/main/xiaozhi-server/core/utils/util.py index 875adde0..9ab77a5a 100644 --- a/main/xiaozhi-server/core/utils/util.py +++ b/main/xiaozhi-server/core/utils/util.py @@ -319,7 +319,7 @@ def initialize_modules( modules["memory"] = memory.create_instance( memory_type, config["Memory"][select_memory_module], - config.get('summaryMemory', ''), + config.get('summaryMemory', None), ) logger.bind(tag=TAG).info(f"初始化组件: memory成功 {select_memory_module}")