2026-08-03 17:44:42 +08:00
|
|
|
|
<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; }
|
2026-08-06 15:32:07 +08:00
|
|
|
|
.editor-page-footer { position: sticky; z-index: 3; bottom: 0; display: flex; justify-content: center; padding: 12px 24px; border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.96); box-shadow: 0 -6px 18px rgba(15, 31, 58, .06); backdrop-filter: blur(10px); }
|
|
|
|
|
|
.editor-page-footer :deep(.editor-actions) { width: min(100%, 560px); justify-content: center; }
|
|
|
|
|
|
.editor-page-footer :deep(.editor-actions > .el-button) { min-width: 132px; min-height: 42px; }
|
|
|
|
|
|
.editor-page-footer :deep(.editor-actions > .el-button:last-child) { min-width: 172px; }
|
2026-08-03 17:44:42 +08:00
|
|
|
|
|
|
|
|
|
|
@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>
|