mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
- 更新 .gitignore,添加 SpecStory 说明文件 - 在 App.vue 中引入 NGlobalStyle 组件 - 更新 api-models.ts,添加签到相关数据模型 - 在 CheckInSettings.vue 中实现签到功能的配置界面 - 添加签到排行榜功能,允许用户查看签到情况 - 更新 PointHistoryCard.vue,增加签到记录显示 - 在 PointSettings.vue 中添加签到相关设置项 - 更新路由,添加签到排行页面
94 lines
2.6 KiB
Vue
94 lines
2.6 KiB
Vue
<script setup lang="ts">
|
|
import { updateNoteItemContentType, updateNotes } from '@/data/UpdateNote';
|
|
import { NDivider, NGrid } from 'naive-ui';
|
|
import { VNode } from 'vue';
|
|
|
|
function renderContent(content: updateNoteItemContentType): VNode | string | undefined {
|
|
if (Array.isArray(content)) {
|
|
return h('div', { style: { whiteSpace: 'pre-wrap' } }, content.map(item => renderContent(item)))
|
|
}
|
|
const getContent = (c: unknown) => {
|
|
if (typeof c === 'string') {
|
|
return c
|
|
}
|
|
if (typeof c === 'function') {
|
|
return c()
|
|
}
|
|
}
|
|
return h('span', { style: { whiteSpace: 'pre-wrap' } }, getContent(content))
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<NScrollbar
|
|
style="max-height: 80vh;padding-right: 16px;"
|
|
trigger="none"
|
|
>
|
|
<NFlex vertical>
|
|
<div
|
|
v-for="item in updateNotes"
|
|
:key="item.ver"
|
|
>
|
|
<NDivider title-placement="left">
|
|
{{ item.date }}
|
|
</NDivider>
|
|
<NGrid
|
|
x-gap="10"
|
|
y-gap="10"
|
|
>
|
|
<template
|
|
v-for="note in item.items"
|
|
:key="note.title"
|
|
>
|
|
<NGridItem span="6">
|
|
<div style="">
|
|
<NTag
|
|
v-if="note.type === 'fix'"
|
|
type="info"
|
|
round
|
|
:bordered="false"
|
|
>
|
|
错误修复
|
|
</NTag>
|
|
<NTag
|
|
v-else-if="note.type === 'new'"
|
|
type="success"
|
|
round
|
|
:bordered="false"
|
|
>
|
|
功能添加
|
|
</NTag>
|
|
<NTag
|
|
v-else-if="note.type === 'optimize'"
|
|
:color="{ textColor: '#000', color: '#f0ad4e', borderColor: '#f0ad4e' }"
|
|
round
|
|
:bordered="false"
|
|
>
|
|
功能优化
|
|
</NTag>
|
|
<NTag
|
|
v-else-if="note.type === 'other'"
|
|
type="error"
|
|
round
|
|
:bordered="false"
|
|
>
|
|
其他
|
|
</NTag>
|
|
</div>
|
|
</NGridItem>
|
|
<NGridItem span="18">
|
|
<NFlex vertical>
|
|
<template
|
|
v-for="content in note.content"
|
|
:key="content"
|
|
>
|
|
<component :is="renderContent(content)" />
|
|
</template>
|
|
</NFlex>
|
|
</NGridItem>
|
|
</template>
|
|
</NGrid>
|
|
</div>
|
|
</NFlex>
|
|
</NScrollbar>
|
|
</template> |