This commit is contained in:
2026-08-03 17:44:42 +08:00
parent 64d051153d
commit 0260b9bb41
14 changed files with 216 additions and 78 deletions
+12 -2
View File
@@ -35,7 +35,12 @@ const groupId = computed(() => `client-nav-group-${props.node.key}`)
:aria-controls="groupId"
@click="emit('toggle', node.key)"
>
<component v-if="!level" :is="node.icon" :size="20" />
<component
:is="node.icon"
class="client-sidebar-node-icon"
:size="level ? 16 : 20"
aria-hidden="true"
/>
<span>{{ node.title }}</span>
<ChevronDown class="client-sidebar-group-chevron" :size="16" aria-hidden="true" />
</button>
@@ -66,7 +71,12 @@ const groupId = computed(() => `client-nav-group-${props.node.key}`)
:aria-current="node.path === activePath ? 'page' : undefined"
@click="emit('navigate', node.path)"
>
<component v-if="!level" :is="node.icon" :size="20" />
<component
:is="node.icon"
class="client-sidebar-node-icon"
:size="level ? 16 : 20"
aria-hidden="true"
/>
<span>{{ node.title }}</span>
</RouterLink>
</li>
@@ -0,0 +1,59 @@
<script setup lang="ts">
import { ArrowLeft } from '@lucide/vue'
defineProps<{
modelValue: boolean
page: boolean
title: string
beforeClose: (done: () => void) => void | Promise<void>
}>()
const emit = defineEmits<{
'update:modelValue': [value: boolean]
back: []
}>()
</script>
<template>
<section v-if="page" class="first-leg-editor-page">
<div class="editor-page-nav">
<el-button link type="primary" @click="emit('back')"><ArrowLeft :size="17" />返回订单列表</el-button>
<span>可先保存草稿,确认无误后再提交平台审核</span>
</div>
<div class="editor-page-body"><slot /></div>
<footer class="editor-page-footer"><slot name="footer" /></footer>
</section>
<el-drawer
v-else
class="first-leg-editor"
:model-value="modelValue"
:title="title"
size="1080px"
destroy-on-close
:before-close="beforeClose"
@update:model-value="emit('update:modelValue', $event)"
>
<slot />
<template #footer><slot name="footer" /></template>
</el-drawer>
</template>
<style scoped>
.first-leg-editor-page { min-width: 0; border: 1px solid var(--border); background: #fff; }
.editor-page-nav { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 20px; border-bottom: 1px solid var(--border); }
.editor-page-nav span { color: var(--muted); font-size: 12px; }
.editor-page-body { padding: 22px 24px 30px; }
.editor-page-footer { position: sticky; z-index: 3; bottom: 0; display: flex; justify-content: flex-end; padding: 12px 24px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.96); }
@media (max-width: 720px) {
.editor-page-nav { align-items: flex-start; flex-direction: column; gap: 2px; padding: 10px 16px; }
.editor-page-nav span { padding-left: 1px; line-height: 1.5; }
.editor-page-body { padding: 18px 16px 24px; }
.editor-page-footer { padding: 10px 16px; }
}
@media (max-width: 480px) {
.editor-page-footer { position: static; }
}
</style>