60 lines
2.0 KiB
Vue
60 lines
2.0 KiB
Vue
<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>
|