fix layout

This commit is contained in:
Timi
2026-10-28 14:21:26 +08:00
parent 5609d2484e
commit adc6e38328
83 changed files with 5587 additions and 5386 deletions
+74 -70
View File
@@ -1,76 +1,80 @@
<template>
<t-navbar
fixed
:z-index="20"
title="门店日记详情"
left-arrow
@left-click="$router.back()"
>
<template #right>
<t-button
v-if="article?.id && canUpdate && !isDeleting"
@click="toEdit"
theme="primary"
variant="text"
size="small"
content="编辑"
/>
</template>
</t-navbar>
<div v-can="permissionCodes.storeDiary.read" class="store-diary-detail">
<template v-if="article">
<header class="header" v-entrance-transition>
<h1 v-text="article.title || '未命名日记'" />
<div v-if="article.description" class="description" v-text="article.description" />
<time-label
class="time gray"
v-if="article.createdAt"
:timestamp="article.createdAt"
underline
<div class="page-layout navbar">
<t-navbar
fixed
:z-index="20"
title="门店日记详情"
left-arrow
@left-click="$router.back()"
>
<template #right>
<t-button
v-if="article?.id && canUpdate && !isDeleting"
@click="toEdit"
theme="primary"
variant="text"
size="small"
content="编辑"
/>
</header>
<div v-if="additionalPhotoItemList.length" class="additional-photos-wrapper" v-entrance-transition>
<attachment-selector :items="additionalPhotoItemList" readonly />
</div>
<section class="content" v-entrance-transition>
<article-view
:article="article"
empty-text="暂无日记正文"
:resolve-attachment-url="resolveAttachmentUrl"
/>
</section>
<footer class="footer gray">
<div class="updater">
<div>最近更新人:</div>
<div v-if="article.updater" class="updater">
<t-image
class="avatar"
:src="getUpdaterAvatar(article.updater)"
:alt="getUpdaterName(article.updater)"
fit="cover"
</template>
</t-navbar>
<main class="page-content scroll column">
<div v-can="permissionCodes.storeDiary.read" class="store-diary-detail">
<template v-if="article">
<header class="header" v-entrance-transition>
<h1 v-text="article.title || '未命名日记'" />
<div v-if="article.description" class="description" v-text="article.description" />
<time-label
class="time gray"
v-if="article.createdAt"
:timestamp="article.createdAt"
underline
/>
<span v-text="getUpdaterName(article.updater)" />
</header>
<div v-if="additionalPhotoItemList.length" class="additional-photos-wrapper" v-entrance-transition>
<attachment-selector :items="additionalPhotoItemList" readonly />
</div>
<span v-else v-text="'未知用户'" />
</div>
<div class="updated-at">
<span>最近更新时间:</span>
<time-label v-if="article.updatedAt" :timestamp="article.updatedAt" />
<span v-else v-text="'未知时间'" />
</div>
</footer>
<t-button
v-if="canDelete"
class="delete cell-button"
theme="danger"
block
:loading="isDeleting"
@click="confirmDelete"
>
删除日记
</t-button>
</template>
<t-empty v-else :description="isLoading ? '正在加载门店日记' : '门店日记不存在'" />
<section class="content" v-entrance-transition>
<article-view
:article="article"
empty-text="暂无日记正文"
:resolve-attachment-url="resolveAttachmentUrl"
/>
</section>
<footer class="footer gray">
<div class="updater">
<div>最近更新人:</div>
<div v-if="article.updater" class="updater">
<t-image
class="avatar"
:src="getUpdaterAvatar(article.updater)"
:alt="getUpdaterName(article.updater)"
fit="cover"
/>
<span v-text="getUpdaterName(article.updater)" />
</div>
<span v-else v-text="'未知用户'" />
</div>
<div class="updated-at">
<span>最近更新时间:</span>
<time-label v-if="article.updatedAt" :timestamp="article.updatedAt" />
<span v-else v-text="'未知时间'" />
</div>
</footer>
<t-button
v-if="canDelete"
class="delete cell-button"
theme="danger"
block
:loading="isDeleting"
@click="confirmDelete"
>
删除日记
</t-button>
</template>
<t-empty v-else :description="isLoading ? '正在加载门店日记' : '门店日记不存在'" />
</div>
</main>
</div>
</template>
@@ -213,7 +217,7 @@ onMounted(loadArticle);
<style scoped lang="less">
.store-diary-detail {
padding: var(--app-nav-height) 0 calc(1rem + env(safe-area-inset-bottom, 0));
padding: 0 0 calc(1rem + env(safe-area-inset-bottom, 0));
.header {
margin: 0 1rem;