style(special-plan): 对齐 BizSpecialPlanEdit 到 People.vue 风格 (form 页)
改动 (仅 UI/CSS, 业务逻辑 100% 保留):
- 删 <div class="header"> 返回按钮 + 大标题 → 改用 <div class="breadcrumb">
首页 / 网站管理 / 专项计划管理 / {{isEdit ? '编辑' : '新建'}}
- form-actions 改用 <el-form-item class="form-actions"> 包裹 (隐藏 label, 顶部
border-top 分割线, 按钮左对齐)
- 取消按钮 @click="$router.back()" 改 router.push('/admin/special-plan')
避免外链直接进编辑页时 back 跳出 SPA
- 删未用 import { ArrowLeft } (返回按钮已删)
- page-card 加 background/border/padding/max-width 1200px (form 页标准, 居左不居中)
- 加 .breadcrumb / .form-actions CSS (跟 MeetingNew.vue / ProjectsNew.vue 同款)
不动的:
- isEdit computed / loadDetail / save / onTypeChange handler
- 表单字段定义 / 校验逻辑
- RichEditor / OssFileUploader 用法
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<div class="page-card biz-plan-edit">
|
||||
<div class="header">
|
||||
<el-button :icon="ArrowLeft" @click="$router.back()">返回</el-button>
|
||||
<span class="title">{{ isEdit ? '编辑专项计划' : '新建专项计划' }}</span>
|
||||
</div>
|
||||
<div class="breadcrumb">首页 / 网站管理 / 专项计划管理 / {{ isEdit ? '编辑' : '新建' }}</div>
|
||||
|
||||
<el-form :model="form" label-width="100px" v-loading="loading">
|
||||
<el-form-item label="标题" required>
|
||||
@@ -41,9 +38,9 @@
|
||||
<el-input v-model="form.remark" type="textarea" :rows="2" placeholder="可选, 内部备注" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-form-item class="form-actions">
|
||||
<el-button type="primary" :loading="saving" @click="save">保存</el-button>
|
||||
<el-button @click="$router.back()">取消</el-button>
|
||||
<el-button @click="router.push('/admin/special-plan')">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -52,7 +49,6 @@
|
||||
<script setup>
|
||||
import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ArrowLeft } from '@element-plus/icons-vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import request from '@/utils/request'
|
||||
import RichEditor from '@/components/RichEditor.vue'
|
||||
@@ -117,8 +113,18 @@ onMounted(loadDetail)
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.biz-plan-edit { padding: 16px; }
|
||||
.header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
|
||||
.header .title { font-size: 18px; font-weight: 600; }
|
||||
/* 整页面板 (form 页: max-width 1200px, 居左, 不居中) */
|
||||
.biz-plan-edit {
|
||||
background: #fff;
|
||||
padding: 16px 20px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #f0f0f0;
|
||||
max-width: 1200px;
|
||||
/* 不要 margin: 0 auto */
|
||||
}
|
||||
.breadcrumb { font-size: 13px; color: #8c8c8c; margin-bottom: 12px; }
|
||||
.form-tip { margin-left: 12px; font-size: 12px; color: #909399; }
|
||||
.form-actions { margin-top: 24px; padding-top: 24px; border-top: 1px solid #f0f0f0; }
|
||||
.form-actions :deep(.el-form-item__label) { display: none; }
|
||||
.form-actions :deep(.el-form-item__content) { margin-left: 0 !important; display: flex; gap: 12px; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user