feat: 更新通知相关字段,修正数据结构以适应新 API 版本
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
"@elysiajs/eden": "^1.4.5",
|
||||
"@ionic/vue": "^8.7.11",
|
||||
"@ionic/vue-router": "^8.7.11",
|
||||
"@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.100.tgz",
|
||||
"@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@vee-validate/yup": "^4.15.1",
|
||||
"@vueuse/core": "^14.1.0",
|
||||
|
||||
12
pnpm-lock.yaml
generated
12
pnpm-lock.yaml
generated
@@ -57,8 +57,8 @@ importers:
|
||||
specifier: ^8.7.11
|
||||
version: 8.7.11(@stencil/core@4.39.0)(vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3))
|
||||
'@riwa/api-types':
|
||||
specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.100.tgz
|
||||
version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.100.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))'
|
||||
specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz
|
||||
version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))'
|
||||
'@tailwindcss/vite':
|
||||
specifier: ^4.1.18
|
||||
version: 4.1.18(vite@7.2.7(@types/node@24.10.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.1)(yaml@2.8.2))
|
||||
@@ -2772,9 +2772,9 @@ packages:
|
||||
'@remirror/core-constants@3.0.0':
|
||||
resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==}
|
||||
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.100.tgz':
|
||||
resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.100.tgz}
|
||||
version: 0.0.100
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz':
|
||||
resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz}
|
||||
version: 0.0.102
|
||||
peerDependencies:
|
||||
'@elysiajs/eden': ^1.4.5
|
||||
|
||||
@@ -12099,7 +12099,7 @@ snapshots:
|
||||
|
||||
'@remirror/core-constants@3.0.0': {}
|
||||
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.100.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
'@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.102.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))':
|
||||
dependencies:
|
||||
'@elysiajs/eden': 1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3))
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ function getConfigByType(type: string) {
|
||||
<!-- 图标和标题 -->
|
||||
<div class="flex items-start gap-4">
|
||||
<div class="bg-text-950 p-2.5 rounded-full shrink-0">
|
||||
<Icon :icon="getConfigByType(data.type).icon" class="text-2xl" :style="{ color: getConfigByType(data.type).color }" />
|
||||
<Icon :icon="getConfigByType(data.notification.type).icon" class="text-2xl" :style="{ color: getConfigByType(data.notification.type).color }" />
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<div class="text-xl font-semibold wrap-break-word">
|
||||
{{ data.title }}
|
||||
{{ data.notification.title }}
|
||||
</div>
|
||||
<ion-note class="text-xs">
|
||||
{{ useDateFormat(data.createdAt, 'YYYY-MM-DD HH:mm:ss') }}
|
||||
@@ -41,7 +41,7 @@ function getConfigByType(type: string) {
|
||||
<!-- 内容 -->
|
||||
<div class="notification-content">
|
||||
<p class="text-base leading-relaxed whitespace-pre-wrap wrap-break-word">
|
||||
{{ data.content }}
|
||||
{{ data.notification.content }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -104,13 +104,13 @@ onBeforeMount(() => {
|
||||
@click="handleItemClick(item)"
|
||||
>
|
||||
<div slot="start" class="bg-text-950 p-2.5 rounded-full">
|
||||
<Icon :icon="getConfigByType(item.type).icon" class="text-2xl" :style="{ color: getConfigByType(item.type).color }" />
|
||||
<Icon :icon="getConfigByType(item.notification.type).icon" class="text-2xl" :style="{ color: getConfigByType(item.notification.type).color }" />
|
||||
</div>
|
||||
<div class="pl-3 w-full">
|
||||
<div class="flex items-center justify-between mb-1">
|
||||
<div class="flex-center gap-2">
|
||||
<div class="text-md font-semibold">
|
||||
{{ item.title }}
|
||||
{{ item.notification.title }}
|
||||
</div>
|
||||
<div v-show="item.status === 'unread'" class="h-2 w-2 bg-red-500 rounded-full" />
|
||||
</div>
|
||||
@@ -119,7 +119,7 @@ onBeforeMount(() => {
|
||||
</ion-note>
|
||||
</div>
|
||||
<div class="text-xs overflow-hidden text-ellipsis">
|
||||
{{ item.content }}
|
||||
{{ item.notification.content }}
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
|
||||
Reference in New Issue
Block a user