perf: 优化timeline丢失的样式

This commit is contained in:
dap 2025-01-24 20:42:56 +08:00
parent 7f0b40b565
commit e89d1a0520
2 changed files with 3 additions and 4 deletions

View File

@ -13,7 +13,6 @@ import { renderDict } from '#/utils/render';
defineOptions({
name: 'ApprovalTimelineItem',
inheritAttrs: false,
});
const props = defineProps<{ item: Flow }>();
@ -42,7 +41,7 @@ onMounted(async () => {
</script>
<template>
<TimelineItem :key="item.id">
<TimelineItem>
<template #dot>
<div class="relative rounded-full border">
<VbenAvatar

View File

@ -13,8 +13,8 @@ const props = defineProps<{
<template>
<Timeline v-if="props.list.length > 0">
<ApprovalTimelineItem
v-for="(item, index) in props.list"
:key="index"
v-for="item in props.list"
:key="item.id"
:item="item"
/>
</Timeline>