diff --git a/components/ContentDashboard.vue b/components/ContentDashboard.vue index 7a9febf..b666490 100644 --- a/components/ContentDashboard.vue +++ b/components/ContentDashboard.vue @@ -42,30 +42,35 @@ - - + + + + + + + {{ task.date }} + - - {{ task.date }} + + + 立即处理 所属项目: {{ task.project }} - {{ task.description }} + {{truncateText(task.description)}} 负责人: {{ task.owner }} 发布时间: {{ task.releaseTime }} - - 立即处理 - + @@ -187,6 +192,16 @@ const customerStatus = ref([ { label: '即将跟进', count: 0 } ]); +const truncateText = (text, maxLength = 30, suffix = '...')=> { + if (!text || typeof text !== 'string') return '' + + if (text.length <= maxLength) { + return text + } + + return text.substring(0, maxLength) + suffix +} + // 加载状态 const loading = ref(false); @@ -586,6 +601,7 @@ const getTagCustomStyle = (status) => { .task-header { display: flex; align-items: center; + justify-content: space-between; gap: 12px; margin-bottom: 12px; }