From f04a92db023f048efe7cc4702eef6a69bbcde59c Mon Sep 17 00:00:00 2001 From: g82tt Date: Sun, 17 May 2026 14:18:31 +0800 Subject: [PATCH] =?UTF-8?q?V4=E4=BF=AE=E5=A4=8D:=20=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=94=B9=E7=94=A8JSX=E8=AF=AD=E6=B3=95(el-bu?= =?UTF-8?q?tton=E8=80=8C=E9=9D=9Eh=E5=87=BD=E6=95=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehouse/device_manager/base_device.vue | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/web.vite/src/views/warehouse/device_manager/base_device.vue b/web.vite/src/views/warehouse/device_manager/base_device.vue index 7d89af2..0ba1c80 100644 --- a/web.vite/src/views/warehouse/device_manager/base_device.vue +++ b/web.vite/src/views/warehouse/device_manager/base_device.vue @@ -140,26 +140,38 @@ // 自定义操作列 columns.push({ title: '操作', field: '_actions', width: 300, align: 'left', fixed: 'right', - render: (_h, { row }) => { + render: (h, { row, column, index }) => { if (row.DeviceGroup === '视频设备') { - return _h('div', [ - h('el-button', { size: 'small', type: 'primary', - onClick: () => openPreview(row) - }, { default: () => '预览' }), - h('el-button', { size: 'small', - onClick: () => { curDev.value = row; ptzVisible.value = true } - }, { default: () => '云台' }), - ]); + return ( +
+ openPreview(row)}> + 预览 + + { curDev.value = row; ptzVisible.value = true }}> + 云台 + +
+ ); } if (row.DeviceGroup === 'IoT设备') { - return _h('div', [ - h('el-button', { size: 'small', type: 'primary', - onClick: () => openRealtime(row) - }, { default: () => '实时数据' }), - h('el-button', { size: 'small', - onClick: () => openControl(row) - }, { default: () => '控制' }), - ]); + return ( +
+ openRealtime(row)}> + 实时数据 + + openControl(row)}> + 控制 + +
+ ); } return null; }