fix: 修复右上角通知文件notification兼容处理
This commit is contained in:
parent
c99d2795bc
commit
5f8bc64b1e
|
@ -45,46 +45,42 @@ const subscribeNotice = () => {
|
|||
total.value += 1;
|
||||
notification.open({
|
||||
message: resp?.payload?.topicName,
|
||||
description: () => (
|
||||
<div
|
||||
class="ellipsis"
|
||||
style={{ cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
description: () =>
|
||||
h(
|
||||
'div',
|
||||
{
|
||||
/* changeStatus_api('_read', [resp.id]); */
|
||||
}
|
||||
class: "ellipsis",
|
||||
style: {
|
||||
cursor: 'pointer'
|
||||
},
|
||||
onClick: () => {
|
||||
read('', resp);
|
||||
}}
|
||||
>
|
||||
{resp?.payload?.message}
|
||||
</div>
|
||||
),
|
||||
}
|
||||
},
|
||||
{
|
||||
default: () => resp?.payload?.message
|
||||
}
|
||||
)
|
||||
,
|
||||
onClick: () => {
|
||||
// changeStatus_api('_read', [resp.id])
|
||||
read('', resp);
|
||||
},
|
||||
key: resp.payload.id,
|
||||
btn: (
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
onClick={(e) => {
|
||||
btn: () =>
|
||||
h(
|
||||
Button,
|
||||
{
|
||||
/* changeStatus_api('_read', [resp.id]).then(
|
||||
(resp: any) => {
|
||||
if (resp.status === 200) {
|
||||
notification.close(resp.payload.id);
|
||||
getList();
|
||||
}
|
||||
},
|
||||
); */
|
||||
}
|
||||
type: "primary",
|
||||
size: "small",
|
||||
onClick: (e: Event) => {
|
||||
e.stopPropagation();
|
||||
read('_read', resp);
|
||||
}}
|
||||
>
|
||||
标记已读
|
||||
</Button>
|
||||
}
|
||||
},
|
||||
{
|
||||
default: () => "标记已读"
|
||||
}
|
||||
),
|
||||
});
|
||||
});
|
||||
|
|
|
@ -468,7 +468,7 @@ const columns = [
|
|||
|
||||
const subRef = ref();
|
||||
const propertyValue = ref(new Map());
|
||||
|
||||
const cacheIds = ref<string>()
|
||||
const showBatch = ref(false);
|
||||
|
||||
const clickBatch = () => {
|
||||
|
@ -657,7 +657,9 @@ const onCheckAllChange = (e: any) => {
|
|||
watch(
|
||||
() => tableRef?.value?._dataSource,
|
||||
(value) => {
|
||||
subRef.value?.unsubscribe();
|
||||
if (value.length !== 0) {
|
||||
setTimeout(() => {
|
||||
subscribeProperty(value);
|
||||
value.forEach((item: any) => {
|
||||
item?.accessModes?.forEach((i: any) => {
|
||||
|
@ -666,6 +668,7 @@ watch(
|
|||
}
|
||||
});
|
||||
});
|
||||
}, 100)
|
||||
}
|
||||
cancelSelect();
|
||||
checkAll.value = false;
|
||||
|
@ -701,9 +704,7 @@ watch(
|
|||
);
|
||||
|
||||
onUnmounted(() => {
|
||||
if (subRef.value) {
|
||||
subRef.value?.unsubscribe();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue