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

This commit is contained in:
100011797 2023-07-14 13:51:43 +08:00
commit 30de9c322a
2 changed files with 10 additions and 5 deletions

View File

@ -43,7 +43,7 @@
</j-space>
</j-tooltip>
</template>
<template #channelId="slotProps">
<template #gbChannelId="slotProps">
<div style="display: flex; align-items: center;">
<Ellipsis style="width: 150px">
{{ slotProps.gbChannelId }}
@ -180,8 +180,8 @@ const columns = [
},
{
title: '国标ID',
dataIndex: 'channelId',
key: 'channelId',
dataIndex: 'gbChannelId',
key: 'gbChannelId',
scopedSlots: true,
width: 200,
headerCell: 'gbChannelIdHeader', //

View File

@ -77,7 +77,7 @@ const handleHeader= (data:any) =>{
})
}
const dataSource = reactive({
table:props.headers.length > 0 ? handleHeader(props.headers) : ''
table:props.headers.length > 0 ? handleHeader(props.headers) : []
});
watch(()=>JSON.stringify(props.headers),()=>{
@ -102,12 +102,17 @@ const handleAdd = () => {
};
const validate = () =>{
return new Promise((resolve:any,reject:any)=>{
tableRef.value.validate().then(()=>{
if(dataSource.table){
tableRef.value.validate().then(()=>{
valueChange()
resolve(data.value)
}).catch((err:any)=>{
console.log(err);
reject(false)
})
}else{
resolve([])
}
})
}
defineExpose({