Skip to content

Commit eff7731

Browse files
committed
fix: 优化TheEchoCard组件的日期格式化逻辑,调整样式以增强可读性;修复TheMdEditor组件的配置格式;清理EchoPage组件的多余空行
1 parent b52bea1 commit eff7731

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

web/src/components/advanced/TheEchoCard.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
<!-- 小点 -->
88
<div class="w-2 h-2 rounded-full bg-orange-600 mr-2"></div>
99
<!-- 具体日期时间 -->
10-
<div class="flex justify-start text-sm text-orange-500 hover:underline hover:decoration-offset-3 hover:decoration-1">
10+
<div
11+
class="flex justify-start text-sm text-orange-500 hover:underline hover:decoration-offset-3 hover:decoration-1"
12+
>
1113
{{ formatDate(props.echo.created_at) }}
1214
</div>
1315
</div>
@@ -294,7 +296,11 @@ onBeforeUnmount(() => {
294296
}
295297
296298
.echoimg {
297-
box-shadow: 0 1px 2px rgba(0,0,0,.02),0 2px 4px rgba(0,0,0,.02),0 4px 8px rgba(0,0,0,.02),0 8px 16px rgba(0,0,0,.02);
299+
box-shadow:
300+
0 1px 2px rgba(0, 0, 0, 0.02),
301+
0 2px 4px rgba(0, 0, 0, 0.02),
302+
0 4px 8px rgba(0, 0, 0, 0.02),
303+
0 8px 16px rgba(0, 0, 0, 0.02);
298304
border-radius: 8px;
299305
}
300306

web/src/components/advanced/TheMdEditor.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const initEditor = reactive({
5252
'-',
5353
'=',
5454
'previewOnly',
55-
'pageFullscreen'
55+
'pageFullscreen',
5656
] as ToolbarNames[],
5757
noPrettier: false,
5858
tabWidth: 2,
@@ -149,8 +149,7 @@ config({
149149
},
150150
},
151151
},
152-
});
153-
152+
})
154153
</script>
155154

156155
<style scoped lang="css">

web/src/utils/other.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ export const formatDate = (dateString: string) => {
5353
const weekDays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
5454
const weekDay = weekDays[date.getDay()]
5555

56-
return `${padZero(date.getHours())}:${padZero(date.getMinutes())} · ` +
57-
`${date.getFullYear()}${date.getMonth() + 1}${date.getDate()}日 · ${weekDay}`
56+
return (
57+
`${padZero(date.getHours())}:${padZero(date.getMinutes())} · ` +
58+
`${date.getFullYear()}${date.getMonth() + 1}${date.getDate()}日 · ${weekDay}`
59+
)
5860
}
5961
}
6062

web/src/views/echo/modules/EchoPage.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ const goBack = () => {
5757
}
5858
}
5959
60-
6160
onMounted(() => {
6261
// 在这里可以添加获取Echo详情的逻辑
6362
fetchGetEchoById(echoId).then((res) => {

0 commit comments

Comments
 (0)