新增文件上传页面,新增文件上传的公共组件(进度条,步骤条,上传区域)
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* 文件上传进度组件样式
|
||||
*/
|
||||
|
||||
:root {
|
||||
--primary-color: var(--color-primary, #00684a);
|
||||
--primary-hover: var(--color-primary-hover, #005a40);
|
||||
--primary-light: rgba(0, 104, 74, 0.1);
|
||||
--success-color: var(--color-success, #52c41a);
|
||||
--warning-color: var(--color-warning, #faad14);
|
||||
--error-color: var(--color-error, #ff4d4f);
|
||||
--text-color: rgba(0, 0, 0, 0.85);
|
||||
--text-secondary: rgba(0, 0, 0, 0.45);
|
||||
--border-color: #f0f0f0;
|
||||
--bg-gray: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 进度条样式 */
|
||||
.progress-container {
|
||||
@apply my-6;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
@apply h-2 bg-gray-100 rounded overflow-hidden mb-2;
|
||||
}
|
||||
|
||||
.progress-bar-inner {
|
||||
@apply h-full bg-[var(--primary-color)] rounded transition-[width] duration-300 ease-in-out w-0;
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
@apply flex justify-between text-xs text-gray-500;
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@screen sm {
|
||||
.progress-container {
|
||||
@apply my-4;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
@apply h-1.5;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
/**
|
||||
* 处理步骤组件样式
|
||||
*/
|
||||
|
||||
:root {
|
||||
--primary-color: var(--color-primary, #00684a);
|
||||
--primary-hover: var(--color-primary-hover, #005a40);
|
||||
--primary-light: rgba(0, 104, 74, 0.1);
|
||||
--success-color: var(--color-success, #52c41a);
|
||||
--warning-color: var(--color-warning, #faad14);
|
||||
--error-color: var(--color-error, #ff4d4f);
|
||||
--text-color: rgba(0, 0, 0, 0.85);
|
||||
--text-secondary: rgba(0, 0, 0, 0.45);
|
||||
--border-color: #f0f0f0;
|
||||
--bg-gray: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 横向步骤样式 */
|
||||
.steps-container-horizontal {
|
||||
@apply my-8 flex justify-between relative;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.steps-container-horizontal::before {
|
||||
content: "";
|
||||
@apply absolute top-[14px] left-[30px] right-[30px] h-0.5 bg-gray-200 z-0;
|
||||
}
|
||||
|
||||
.step-item-horizontal {
|
||||
@apply relative flex flex-col items-center flex-1 text-center z-[1];
|
||||
}
|
||||
|
||||
.step-icon-horizontal {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
@apply rounded-full bg-gray-300 flex items-center justify-center mb-2 relative z-[2];
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.step-icon-horizontal i {
|
||||
@apply text-white text-base;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.step-icon-horizontal span:not(.loading-spinner) {
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.step-item-horizontal.active .step-icon-horizontal {
|
||||
@apply bg-[var(--primary-color)];
|
||||
box-shadow: 0 0 0 4px rgba(0, 104, 74, 0.1);
|
||||
}
|
||||
|
||||
.step-item-horizontal.active .step-icon-horizontal span:not(.loading-spinner) {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.step-item-horizontal.done .step-icon-horizontal {
|
||||
@apply bg-[var(--success-color)];
|
||||
}
|
||||
|
||||
.step-item-horizontal.done .step-icon-horizontal i {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.step-item-horizontal.error .step-icon-horizontal {
|
||||
@apply bg-[var(--error-color)];
|
||||
}
|
||||
|
||||
.step-item-horizontal.error .step-icon-horizontal i {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.step-content-horizontal {
|
||||
@apply px-2 max-w-[140px];
|
||||
}
|
||||
|
||||
.step-title-horizontal {
|
||||
@apply font-medium mb-1 text-sm whitespace-nowrap overflow-hidden text-ellipsis;
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.step-description-horizontal {
|
||||
@apply text-xs text-gray-500 leading-tight mt-1;
|
||||
}
|
||||
|
||||
.step-item-horizontal.active .step-title-horizontal {
|
||||
@apply text-[var(--primary-color)];
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.step-item-horizontal.done .step-title-horizontal {
|
||||
@apply text-[var(--success-color)];
|
||||
}
|
||||
|
||||
.step-item-horizontal.error .step-title-horizontal {
|
||||
@apply text-[var(--error-color)];
|
||||
}
|
||||
|
||||
/* 加载动画 */
|
||||
.loading-spinner {
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -8px; /* 宽度的一半 */
|
||||
margin-top: -8px; /* 高度的一半 */
|
||||
border-radius: 50%;
|
||||
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||
border-top-color: var(--primary-color);
|
||||
animation-name: spinner-rotate;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
@keyframes spinner-rotate {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* 响应式调整 - 只在小屏幕上应用垂直布局 */
|
||||
@media (max-width: 640px) {
|
||||
.steps-container-horizontal {
|
||||
@apply flex-col items-start;
|
||||
}
|
||||
|
||||
.steps-container-horizontal::before {
|
||||
@apply hidden;
|
||||
}
|
||||
|
||||
.step-item-horizontal {
|
||||
@apply flex-row items-start mb-5 w-full;
|
||||
}
|
||||
|
||||
.step-item-horizontal:last-child {
|
||||
@apply mb-0;
|
||||
}
|
||||
|
||||
.step-content-horizontal {
|
||||
@apply text-left ml-3 max-w-none;
|
||||
}
|
||||
|
||||
.step-icon-horizontal {
|
||||
@apply mb-0 flex-shrink-0;
|
||||
}
|
||||
|
||||
.step-title-horizontal {
|
||||
@apply text-base;
|
||||
}
|
||||
|
||||
.step-description-horizontal {
|
||||
@apply mt-1 text-sm;
|
||||
}
|
||||
|
||||
/* 垂直连接线 */
|
||||
.step-item-horizontal::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 30px;
|
||||
bottom: -20px;
|
||||
width: 2px;
|
||||
background-color: #e8e8e8;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.step-item-horizontal:last-child::before {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/* 表格内容 */
|
||||
.ant-table tbody td {
|
||||
@apply py-3 px-4 border-b border-gray-100;
|
||||
@apply py-3 px-4 border-b border-gray-100 align-middle;
|
||||
}
|
||||
|
||||
/* 表格行 */
|
||||
@@ -63,6 +63,25 @@
|
||||
@apply text-[#00684a];
|
||||
}
|
||||
|
||||
/* 模板名称列垂直居中样式 */
|
||||
.ant-table .flex.items-center {
|
||||
height: 1.5rem; /* h-6 */
|
||||
}
|
||||
|
||||
.ant-table .flex.items-center i {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.ant-table .flex.items-center span {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
@layer components {
|
||||
/* 基础表格 */
|
||||
.table-container {
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* 文件上传区域组件样式
|
||||
*/
|
||||
|
||||
:root {
|
||||
--primary-color: var(--color-primary, #00684a);
|
||||
--primary-hover: var(--color-primary-hover, #005a40);
|
||||
--primary-light: rgba(0, 104, 74, 0.1);
|
||||
--success-color: var(--color-success, #52c41a);
|
||||
--warning-color: var(--color-warning, #faad14);
|
||||
--error-color: var(--color-error, #ff4d4f);
|
||||
--text-color: rgba(0, 0, 0, 0.85);
|
||||
--text-secondary: rgba(0, 0, 0, 0.45);
|
||||
--border-color: #f0f0f0;
|
||||
--bg-gray: #f5f5f5;
|
||||
}
|
||||
|
||||
/* 上传区域样式 */
|
||||
.upload-area {
|
||||
@apply border-2 border-dashed border-gray-300 rounded-lg p-10 text-center bg-gray-50 cursor-pointer transition-all duration-300;
|
||||
}
|
||||
|
||||
.upload-area:hover,
|
||||
.upload-area.dragover {
|
||||
@apply border-[var(--primary-color)] bg-[var(--primary-light)];
|
||||
}
|
||||
|
||||
.upload-area.disabled {
|
||||
@apply opacity-50 cursor-not-allowed;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
@apply text-5xl text-gray-400 mb-4;
|
||||
}
|
||||
|
||||
.upload-text {
|
||||
@apply text-gray-500 mb-2 font-medium;
|
||||
}
|
||||
|
||||
.upload-tip {
|
||||
@apply text-xs text-gray-500;
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@screen sm {
|
||||
.upload-area {
|
||||
@apply p-6;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
@apply text-4xl mb-2;
|
||||
}
|
||||
|
||||
.upload-text {
|
||||
@apply text-sm;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user