chore: 调整样式

This commit is contained in:
dap 2025-01-08 10:55:03 +08:00
parent d5482decb8
commit 8df6e3860f
3 changed files with 26 additions and 12 deletions

View File

@ -1,18 +1,18 @@
<script setup lang="ts">
import type { VbenFormProps } from '@vben/common-ui';
import type { LeaveForm } from './api/model';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { useRouter } from 'vue-router';
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { Page, useVbenModal } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps,
} from '#/adapter/vxe-table';
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
import { cancelProcessApply } from '#/api/workflow/instance';
import { commonDownloadExcel } from '#/utils/file/download';

View File

@ -28,7 +28,7 @@ function formatDate(date: string) {
</script>
<template>
<Descriptions :column="1" bordered size="small">
<Descriptions :column="1" size="middle">
<DescriptionsItem label="请假类型">
{{ leaveType }}
</DescriptionsItem>
@ -39,7 +39,7 @@ function formatDate(date: string) {
{{ data.leaveDays }}
</DescriptionsItem>
<DescriptionsItem label="请假原因">
{{ data.remark }}
{{ data.remark || '无' }}
</DescriptionsItem>
</Descriptions>
</template>

View File

@ -156,10 +156,17 @@ function handleComplete() {
formApi.resetForm();
router.push('/demo/leave');
}
/**
* 显示详情时 需要较小的padding
*/
const cardSize = computed(() => {
return showDescription.value ? 'small' : 'default';
});
</script>
<template>
<Card ref="cardRef">
<Card ref="cardRef" :size="cardSize">
<div id="leave-form">
<!-- 使用v-if会影响生命周期 -->
<BasicForm v-show="!showDescription" />
@ -174,12 +181,19 @@ function handleComplete() {
</template>
<style lang="scss">
/**
去除 '菜单加载中' 主要是iframe内嵌使用
*/
html:has(#leave-form) {
/**
去除 '菜单加载中' 主要是iframe内嵌使用
*/
.ant-message-notice-content:has(.ant-message-loading) {
display: none;
}
/**
去除顶部进度条样式
*/
#nprogress {
display: none;
}
}
</style>