Merge branch 'dev' of github.com:jetlinks/jetlinks-ui-vue into dev

This commit is contained in:
leiqiaochu 2023-07-11 14:18:25 +08:00
commit 4357cb93fa
4 changed files with 11 additions and 7 deletions

View File

@ -202,13 +202,15 @@ const modelRef = reactive({
const property = ref<any>({});
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);
})

View File

@ -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 {

View File

@ -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,
},
];

View File

@ -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"