fix sendAt style
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
class="item"
|
class="item"
|
||||||
v-entrance-transition="index * 30"
|
v-entrance-transition="index * 30"
|
||||||
>
|
>
|
||||||
<t-cell :description="getSendTime(item)" arrow @click="toDetail(item)">
|
<t-cell arrow @click="toDetail(item)">
|
||||||
<template #leftIcon>
|
<template #leftIcon>
|
||||||
<div class="icon" :class="{ scheduled: isScheduled(item) }">
|
<div class="icon" :class="{ scheduled: isScheduled(item) }">
|
||||||
<t-icon :name="isScheduled(item) ? 'time' : 'notification'" size="1.25rem" />
|
<t-icon :name="isScheduled(item) ? 'time' : 'notification'" size="1.25rem" />
|
||||||
@@ -28,6 +28,10 @@
|
|||||||
<span v-text="getSubject(item)" />
|
<span v-text="getSubject(item)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template #description>
|
||||||
|
<span v-if="isScheduled(item)" v-text="`定时 ${Time.toDateTime(item.sendAt)}`" />
|
||||||
|
<pass-time-label v-else :timestamp="item.sendAt || item.createdAt" underline />
|
||||||
|
</template>
|
||||||
<template #note>
|
<template #note>
|
||||||
<t-tag size="small" :theme="getStatusTheme(item)" :content="getStatusText(item)" />
|
<t-tag size="small" :theme="getStatusTheme(item)" :content="getStatusText(item)" />
|
||||||
</template>
|
</template>
|
||||||
@@ -55,7 +59,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Time } from "timi-web";
|
import { PassTimeLabel, Time } from "timi-web";
|
||||||
import { NotifyAPI, type Notify, type NotifyManagementItem, type Page, type PageResult, useUserStore } from "timi-web-api";
|
import { NotifyAPI, type Notify, type NotifyManagementItem, type Page, type PageResult, useUserStore } from "timi-web-api";
|
||||||
import { DialogPlugin } from "tdesign-mobile-vue";
|
import { DialogPlugin } from "tdesign-mobile-vue";
|
||||||
import { Message } from "@/utils/message";
|
import { Message } from "@/utils/message";
|
||||||
@@ -140,13 +144,6 @@ function getStatusTheme(item: NotifyManagementItem): NotifyTagTheme {
|
|||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSendTime(item: NotifyManagementItem): string {
|
|
||||||
if (isScheduled(item)) {
|
|
||||||
return `定时 ${Time.toDateTime(item.sendAt)}`;
|
|
||||||
}
|
|
||||||
return Time.toPassedDateTime(item.sendAt || item.createdAt) || "-";
|
|
||||||
}
|
|
||||||
|
|
||||||
function canCancel(item: NotifyManagementItem): boolean {
|
function canCancel(item: NotifyManagementItem): boolean {
|
||||||
return canCancelNotify.value && isScheduled(item);
|
return canCancelNotify.value && isScheduled(item);
|
||||||
}
|
}
|
||||||
@@ -287,21 +284,6 @@ onUnmounted(() => navBarStore.clearRight());
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.t-cell__title) {
|
|
||||||
flex: 1 1 0;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.t-cell__description) {
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.t-cell__note) {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: 3.5rem;
|
width: 3.5rem;
|
||||||
height: 3.5rem;
|
height: 3.5rem;
|
||||||
@@ -317,27 +299,6 @@ onUnmounted(() => navBarStore.clearRight());
|
|||||||
background: #fef3c7;
|
background: #fef3c7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.title,
|
|
||||||
.description {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
gap: .5rem;
|
|
||||||
|
|
||||||
> span:first-child {
|
|
||||||
min-width: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.description {
|
|
||||||
gap: .75rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user