From 8db22171a3f4301bfa38bf06256d68466a590146 Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Tue, 11 Jul 2023 14:12:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Northbound/DuerOS/Detail/command/index.vue | 9 ++++++--- src/views/Northbound/DuerOS/Detail/doc.vue | 2 +- src/views/Northbound/DuerOS/index.vue | 3 ++- yarn.lock | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/views/Northbound/DuerOS/Detail/command/index.vue b/src/views/Northbound/DuerOS/Detail/command/index.vue index 87b86321..0fda44f2 100644 --- a/src/views/Northbound/DuerOS/Detail/command/index.vue +++ b/src/views/Northbound/DuerOS/Detail/command/index.vue @@ -202,13 +202,15 @@ const modelRef = reactive({ const property = ref({}); -const onPropertyChange = (val: string) => { +const onPropertyChange = (val: string, flag?: boolean) => { if (val) { const _item = props.metadata?.properties.find( (item: any) => item.id === val, ); property.value = _item || {}; - modelRef.message.value = undefined + if(!flag){ + modelRef.message.value = undefined + } } }; @@ -227,7 +229,7 @@ watch( if (newVal) { Object.assign(modelRef, newVal); if (newVal?.message?.properties) { - onPropertyChange(newVal?.message?.properties); + onPropertyChange(newVal?.message?.properties, true); } } }, @@ -263,6 +265,7 @@ const saveBtn = () => resolve(false); }); } + console.log(_data) emit('update:modelValue', _data) resolve(_data); }) diff --git a/src/views/Northbound/DuerOS/Detail/doc.vue b/src/views/Northbound/DuerOS/Detail/doc.vue index 65327958..373dbc83 100644 --- a/src/views/Northbound/DuerOS/Detail/doc.vue +++ b/src/views/Northbound/DuerOS/Detail/doc.vue @@ -75,7 +75,7 @@ import { getImage } from '@/utils/comm'; padding: 8px 16px; color: #2f54eb; background-color: rgba(#a7bdf7, 0.2); - // white-space: wrap; + word-wrap: break-word; } h1 { diff --git a/src/views/Northbound/DuerOS/index.vue b/src/views/Northbound/DuerOS/index.vue index dbcbff1b..8bf2ce8c 100644 --- a/src/views/Northbound/DuerOS/index.vue +++ b/src/views/Northbound/DuerOS/index.vue @@ -163,6 +163,7 @@ const columns = [ title: '名称', dataIndex: 'name', key: 'name', + ellipsis: true, search: { type: 'string', }, @@ -229,7 +230,7 @@ const columns = [ title: '操作', key: 'action', fixed: 'right', - width: 160, + width: 180, scopedSlots: true, }, ]; diff --git a/yarn.lock b/yarn.lock index 29c7b517..0aa3c5d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3837,8 +3837,8 @@ jetlinks-ui-components@^1.0.23: jetlinks-ui-components@^1.0.24: version "1.0.24" - resolved "http://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.24.tgz#f23e69b72990bea38df7e9b8926b0024b835931f" - integrity sha512-DaOzmKeECzml6IK+kxg3Fu6aTHwPOEP9PfiM3F+pS0Ko1b3KhjIahhT4z3d6OheoPyBonBZNcfYZBAmy46TDTw== + resolved "http://registry.jetlinks.cn/jetlinks-ui-components/-/jetlinks-ui-components-1.0.24.tgz#0be30b811e9a31e6089b2c970110d32117b23f3c" + integrity sha512-XZ8hhozMh5vFLWVWswHjE3rknDJK+PyYJt8GaVOI86LY5RDl/tnbasgXCZHtyWjPJvJFSWiqqblHUJvJKSUVtQ== dependencies: "@vueuse/core" "^9.12.0" "@vueuse/router" "^9.13.0"