From 62a7971f7acd631a28752340831f95a176911f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=9A=E7=9A=93?= <1736436516@qq.com> Date: Tue, 26 Nov 2024 16:26:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BB=9A=E8=BD=AE=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Channel.vue | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/Channel.vue b/src/components/Channel.vue index 5fae391..8b6cbdc 100644 --- a/src/components/Channel.vue +++ b/src/components/Channel.vue @@ -152,6 +152,21 @@ const filterCameras = () => { // console.log("filteredCameras>>:", filteredCameras.value); }; + +// 名称+ID查询 +// const filterCameras = () => { +// const keyword = searchKeyword.value.trim().toLowerCase(); +// if (!keyword) { +// filteredCameras.value = [...cameras.value]; +// } else { +// filteredCameras.value = cameras.value.filter(camera => { +// const idMatch = camera.id.toString().toLowerCase().includes(keyword); +// const nameMatch = camera.name.toLowerCase().includes(keyword); +// return idMatch || nameMatch; +// }); +// } +// }; + const selectCameraById = (cameraId) => { const camera = cameras.value.find(c => c.id === cameraId); if (camera && !selectedCameras.value.some(c => c.id === camera.id)) { @@ -175,7 +190,7 @@ const handleSettings = async (cameraId) => { }; const handleSaveResult = ({ success, message }) => { - console.log('收到子组件保存结果事件:', { success, message }); + // console.log('收到子组件保存结果事件:', { success, message }); ElMessage({ message, @@ -517,16 +532,17 @@ onBeforeUnmount(() => { width: 68vw; height: 55vh; max-height: 58vh; - overflow-y: scroll; - scrollbar-width: none; + /* overflow-y: scroll; */ + overflow-y: auto; + scrollbar-width:thin; /* background-color: #ffffff; */ background-color: #F1F1F1; /* background-color: #c71515; */ } -.camera-grid::-webkit-scrollbar { +/* .camera-grid::-webkit-scrollbar { display: none; -} +} */ .grid-item { margin: 1vh;