新增文件上传页面,新增文件上传的公共组件(进度条,步骤条,上传区域)
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;
|
||||
}
|
||||
}
|
||||
+8
-1
@@ -18,6 +18,9 @@
|
||||
@import './components/file-type-tag.css';
|
||||
@import './components/status-dot.css';
|
||||
@import './components/tag.css';
|
||||
@import './components/file-progress.css';
|
||||
@import './components/processing-steps.css';
|
||||
@import './components/upload-area.css';
|
||||
/* @import './components/modal.css'; */
|
||||
|
||||
/* Tailwind 基础指令 */
|
||||
@@ -83,13 +86,17 @@
|
||||
a {
|
||||
@apply text-[#00684a] hover:text-[#005a3f] transition-colors duration-200;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* 组件相关样式 */
|
||||
@layer components {
|
||||
/* 文本颜色工具类 */
|
||||
.text-primary {
|
||||
@apply text-[#00684a];
|
||||
@apply !text-[--color-primary];
|
||||
}
|
||||
.text-error {
|
||||
@apply !text-[--color-error];
|
||||
}
|
||||
|
||||
.bg-primary {
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
/**
|
||||
* 文件上传页面样式
|
||||
*/
|
||||
|
||||
.file-upload-page {
|
||||
--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;
|
||||
}
|
||||
|
||||
/* 页面头部 */
|
||||
.file-upload-page .page-header {
|
||||
@apply flex justify-between items-center mb-4;
|
||||
}
|
||||
|
||||
.file-upload-page .page-title {
|
||||
@apply text-xl font-medium;
|
||||
}
|
||||
|
||||
/* 表单样式 */
|
||||
.file-upload-page .form-group {
|
||||
@apply mb-4;
|
||||
}
|
||||
|
||||
.file-upload-page .form-label {
|
||||
@apply block text-sm font-medium text-gray-700 mb-2;
|
||||
}
|
||||
|
||||
.file-upload-page .form-tip {
|
||||
@apply text-xs text-gray-500 mt-1;
|
||||
}
|
||||
|
||||
.file-upload-page .form-select {
|
||||
@apply block w-full px-3 py-2 text-base border-gray-300 rounded-md shadow-sm focus:outline-none;
|
||||
}
|
||||
|
||||
.file-upload-page .form-select:focus {
|
||||
@apply border-[#00684a] shadow-[0_0_0_2px_rgba(0,104,74,0.2)] outline-none;
|
||||
}
|
||||
|
||||
/* 上传区域样式 */
|
||||
.file-upload-page .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;
|
||||
}
|
||||
|
||||
.file-upload-page .upload-area:hover,
|
||||
.file-upload-page .upload-area.dragover {
|
||||
@apply border-[var(--primary-color)] bg-[var(--primary-light)];
|
||||
}
|
||||
|
||||
.file-upload-page .upload-icon {
|
||||
@apply text-5xl text-gray-400 mb-4;
|
||||
}
|
||||
|
||||
.file-upload-page .upload-text {
|
||||
@apply text-gray-500 mb-2 font-medium;
|
||||
}
|
||||
|
||||
.file-upload-page .upload-tip {
|
||||
@apply text-xs text-gray-500;
|
||||
}
|
||||
|
||||
/* 进度条样式 */
|
||||
.file-upload-page .progress-container {
|
||||
@apply my-6;
|
||||
}
|
||||
|
||||
.file-upload-page .progress-bar {
|
||||
@apply h-2 bg-gray-100 rounded overflow-hidden mb-2;
|
||||
}
|
||||
|
||||
.file-upload-page .progress-bar-inner {
|
||||
@apply h-full bg-[var(--primary-color)] rounded transition-[width] duration-300 ease-in-out w-0;
|
||||
}
|
||||
|
||||
.file-upload-page .progress-text {
|
||||
@apply flex justify-between text-xs text-gray-500;
|
||||
}
|
||||
|
||||
/* 横向步骤样式 */
|
||||
.file-upload-page .steps-container-horizontal {
|
||||
@apply my-8 flex justify-between relative;
|
||||
}
|
||||
|
||||
.file-upload-page .steps-container-horizontal::before {
|
||||
content: "";
|
||||
@apply absolute top-[14px] left-0 right-0 h-0.5 bg-gray-200 z-0;
|
||||
}
|
||||
|
||||
.file-upload-page .step-item-horizontal {
|
||||
@apply relative flex flex-col items-center flex-1 text-center z-[1];
|
||||
}
|
||||
|
||||
.file-upload-page .step-icon-horizontal {
|
||||
@apply w-[30px] h-[30px] rounded-full bg-gray-300 flex items-center justify-center mb-2 relative z-[2];
|
||||
}
|
||||
|
||||
.file-upload-page .step-icon-horizontal i {
|
||||
@apply hidden text-white text-base absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 m-0 p-0;
|
||||
}
|
||||
|
||||
.file-upload-page .step-item-horizontal.active .step-icon-horizontal {
|
||||
@apply bg-[var(--primary-color)];
|
||||
}
|
||||
|
||||
.file-upload-page .step-item-horizontal.done .step-icon-horizontal {
|
||||
@apply bg-[var(--success-color)];
|
||||
}
|
||||
|
||||
.file-upload-page .step-item-horizontal.done .step-icon-horizontal i {
|
||||
@apply inline-block;
|
||||
}
|
||||
|
||||
.file-upload-page .step-item-horizontal.error .step-icon-horizontal {
|
||||
@apply bg-[var(--error-color)];
|
||||
}
|
||||
|
||||
.file-upload-page .step-content-horizontal {
|
||||
@apply px-2 max-w-[140px];
|
||||
}
|
||||
|
||||
.file-upload-page .step-title-horizontal {
|
||||
@apply font-medium mb-1 text-sm whitespace-nowrap overflow-hidden text-ellipsis;
|
||||
}
|
||||
|
||||
.file-upload-page .step-description-horizontal {
|
||||
@apply text-xs text-gray-500 leading-tight mt-1;
|
||||
}
|
||||
|
||||
.file-upload-page .step-item-horizontal.active .step-title-horizontal {
|
||||
@apply text-[var(--primary-color)];
|
||||
}
|
||||
|
||||
/* 文件信息样式 */
|
||||
.file-upload-page .file-info-list {
|
||||
@apply list-none p-0 m-0;
|
||||
}
|
||||
|
||||
.file-upload-page .file-info-item {
|
||||
@apply flex mb-2;
|
||||
}
|
||||
|
||||
.file-upload-page .file-info-label {
|
||||
@apply flex-none w-20 text-gray-500;
|
||||
}
|
||||
|
||||
.file-upload-page .file-info-value {
|
||||
@apply flex-1;
|
||||
}
|
||||
|
||||
/* 文件类型徽章 */
|
||||
.file-upload-page .file-type-badge {
|
||||
@apply inline-flex items-center px-2 py-0.5 rounded text-xs font-medium;
|
||||
}
|
||||
|
||||
.file-upload-page .file-type-badge i {
|
||||
@apply mr-1 text-sm;
|
||||
}
|
||||
|
||||
.file-upload-page .file-type-contract {
|
||||
@apply bg-blue-100 text-blue-800;
|
||||
}
|
||||
|
||||
.file-upload-page .file-type-license {
|
||||
@apply bg-green-100 text-green-800;
|
||||
}
|
||||
|
||||
.file-upload-page .file-type-punishment {
|
||||
@apply bg-yellow-100 text-yellow-800;
|
||||
}
|
||||
|
||||
/* 状态徽章 */
|
||||
.file-upload-page .status-badge {
|
||||
@apply inline-flex items-center px-2 py-0.5 rounded text-xs font-medium;
|
||||
}
|
||||
|
||||
.file-upload-page .status-waiting {
|
||||
@apply bg-purple-100 text-purple-800;
|
||||
}
|
||||
|
||||
.file-upload-page .status-processing {
|
||||
@apply bg-blue-100 text-blue-800;
|
||||
}
|
||||
|
||||
.file-upload-page .status-success {
|
||||
@apply bg-green-100 text-green-800;
|
||||
}
|
||||
|
||||
.file-upload-page .status-error {
|
||||
@apply bg-red-100 text-red-800;
|
||||
}
|
||||
|
||||
/* 动画效果 */
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.05);
|
||||
opacity: 0.8;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.file-upload-page .pulse-animation {
|
||||
animation: pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* 响应式调整 */
|
||||
@screen md {
|
||||
.file-upload-page .file-info-grid {
|
||||
@apply grid grid-cols-2 gap-6;
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,11 @@
|
||||
@apply overflow-x-auto;
|
||||
}
|
||||
|
||||
/* 选择框focus状态 */
|
||||
.prompt-page .form-select:focus {
|
||||
@apply border-[#00684a] shadow-[0_0_0_2px_rgba(0,104,74,0.2)] outline-none;
|
||||
}
|
||||
|
||||
/* 类型标签 */
|
||||
.prompt-page .type-badge {
|
||||
@apply inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium mr-1;
|
||||
@@ -65,7 +70,7 @@
|
||||
|
||||
/* 状态标签 */
|
||||
.prompt-page .status-badge {
|
||||
@apply inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium;
|
||||
@apply inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium text-center;
|
||||
}
|
||||
|
||||
.prompt-page .status-active {
|
||||
@@ -82,7 +87,7 @@
|
||||
|
||||
/* 操作按钮 */
|
||||
.prompt-page .operation-btn {
|
||||
@apply inline-flex items-center px-2 py-1 text-sm rounded-md hover:bg-gray-100 transition-colors duration-150 ease-in-out;
|
||||
@apply !text-black inline-flex items-center px-3 py-1 text-sm rounded-md hover:bg-gray-100 transition-colors duration-150 ease-in-out hover:!text-[--color-primary];
|
||||
}
|
||||
|
||||
.prompt-page .operation-btn i {
|
||||
|
||||
Reference in New Issue
Block a user