Skip to content

Commit a00bf77

Browse files
committed
💄 优化模板属性样式
1 parent 5e44c2d commit a00bf77

File tree

3 files changed

+188
-299
lines changed

3 files changed

+188
-299
lines changed

ballcat-codegen-frontend/src/views/gen/template-property/TemplatePropertyEditPage.vue

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
2-
<a-spin :spinning="loading">
2+
<div class="template-property-edit-page">
3+
<a-spin :spinning="loading">
34
<a-form
45
ref="formRef"
56
:label-col="{ span: 6 }"
@@ -106,13 +107,14 @@
106107
<a-textarea v-model:value="modelRef.remarks" placeholder="请输入" />
107108
</a-form-item>
108109
<a-form-item label=" " :colon="false">
109-
<a-space>
110+
<a-space class="form-actions">
110111
<a-button type="primary" html-type="submit" :loading="loading">保存</a-button>
111112
<a-button @click="handleCancel">取消</a-button>
112113
</a-space>
113114
</a-form-item>
114-
</a-form>
115-
</a-spin>
115+
</a-form>
116+
</a-spin>
117+
</div>
116118
</template>
117119

118120
<script setup lang="ts">
@@ -236,6 +238,15 @@ export default {
236238
height: 100%;
237239
}
238240
241+
/* 页面根容器,确保占满内容区域 */
242+
.template-property-edit-page {
243+
height: 100%;
244+
display: flex;
245+
flex-direction: column;
246+
min-height: 0; /* 允许内部滚动 */
247+
padding: 0; /* 统一由表单内边距控制,避免与父级重复 */
248+
}
249+
239250
/* 表单容器样式 */
240251
.ant-form {
241252
height: 100%;
@@ -254,7 +265,7 @@ export default {
254265
:deep(.ant-form-item-label > label) {
255266
color: @slate-800 !important;
256267
font-weight: @font-weight-semibold !important;
257-
font-size: @font-size-2lg !important;
268+
font-size: @font-size-lg !important;
258269
line-height: @line-height-base;
259270
}
260271
@@ -523,6 +534,15 @@ export default {
523534
justify-content: center;
524535
}
525536
537+
.form-actions {
538+
position: sticky;
539+
bottom: 0;
540+
padding: @spacing-md @spacing-lg;
541+
background: linear-gradient(180deg, fade(@bg-color-container, 95%), @bg-color-container);
542+
border-top: 1px solid @slate-200;
543+
z-index: 1;
544+
}
545+
526546
:deep(.ant-space-horizontal) {
527547
gap: @spacing-lg !important;
528548
}
@@ -560,7 +580,7 @@ export default {
560580
/* 响应式设计 */
561581
@media (max-width: 768px) {
562582
.ant-form {
563-
padding: @spacing-xl @spacing-lg;
583+
padding: @spacing-lg;
564584
}
565585
566586
:deep(.ant-form-item-label) {

0 commit comments

Comments
 (0)