| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497 |
- /* 素材管理 - 磁盘样式(复制自 client/css/disk/disk.css) */
- /* 全局样式 */
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- }
- body {
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
- background: #f5f5f5;
- color: #333;
- }
- /* 主容器 */
- .disk-container {
- display: flex;
- flex-direction: column;
- height: 100vh;
- background: white;
- }
- /* 文件列表容器 */
- .file-list-container {
- position: relative;
- flex: 1;
- overflow-y: auto;
- padding: 24px;
- }
- /* 拖拽提示 */
- .drop-hint {
- display: none;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: absolute;
- top: 24px;
- left: 24px;
- right: 24px;
- bottom: 24px;
- background: rgba(24, 144, 255, 0.05);
- border: 2px dashed #1890ff;
- border-radius: 8px;
- color: #1890ff;
- z-index: 10;
- pointer-events: none;
- }
- .drop-hint svg {
- margin-bottom: 16px;
- opacity: 0.6;
- }
- .drop-hint p {
- font-size: 16px;
- font-weight: 500;
- }
- .file-list-container.drag-over .drop-hint {
- display: flex;
- }
- /* 文件列表 */
- .file-list {
- display: flex;
- flex-wrap: wrap;
- gap: 16px;
- padding: 8px;
- }
- /* 文件项 */
- .file-item {
- display: flex;
- flex-direction: column;
- align-items: center;
- width: calc((100% - 32px) / 3);
- min-width: 120px;
- max-width: 180px;
- padding: 16px 8px;
- border-radius: 8px;
- cursor: pointer;
- transition: background 0.2s;
- user-select: none;
- position: relative;
- }
- .file-item:hover {
- background: #f5f5f5;
- }
- .file-item.selected {
- background: rgba(82, 196, 26, 0.1);
- }
- .file-item.dragging {
- opacity: 0.5;
- background: #e6f7ff;
- }
- .file-item.cut {
- opacity: 0.6;
- filter: grayscale(0.3);
- }
- .file-item.drag-target {
- background: rgba(24, 144, 255, 0.15);
- outline: 2px dashed #1890ff;
- outline-offset: -2px;
- }
- /* 拖拽排序指示器 */
- .file-item.drag-over-left::before,
- .file-item.drag-over-right::after {
- content: '';
- position: absolute;
- top: 0;
- bottom: 0;
- width: 3px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- border-radius: 2px;
- box-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
- }
- .file-item.drag-over-left::before {
- left: -8px;
- }
- .file-item.drag-over-right::after {
- right: -8px;
- }
- /* 选中状态勾选标记 */
- .file-item .check-mark {
- position: absolute;
- top: 4px;
- left: 4px;
- width: 20px;
- height: 20px;
- background: #52c41a;
- border-radius: 50%;
- display: none;
- align-items: center;
- justify-content: center;
- color: white;
- z-index: 5;
- }
- .file-item.selected .check-mark {
- display: flex;
- }
- /* 框选区域 */
- .selection-box {
- position: fixed;
- border: 1px solid #1890ff;
- background: rgba(24, 144, 255, 0.1);
- pointer-events: none;
- z-index: 1000;
- display: none;
- }
- .file-icon {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100%;
- max-width: 140px;
- aspect-ratio: 1;
- margin: 0 auto 8px;
- }
- .file-icon svg {
- width: 60%;
- height: 60%;
- }
- /* 图片缩略图 */
- .file-thumbnail {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 100%;
- max-width: 140px;
- aspect-ratio: 1;
- margin: 0 auto 8px;
- border-radius: 6px;
- overflow: hidden;
- /* 棋盘格背景用于显示透明部分 */
- background-color: #ffffff;
- background-image:
- linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
- linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
- linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
- linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
- background-size: 16px 16px;
- background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
- border: 1px solid #e5e5e5;
- position: relative;
- }
- .file-thumbnail img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- }
- /* 文件夹预览徽章 */
- .folder-preview {
- border: 2px solid #fbbf24;
- background: #ffffff !important;
- background-image: none !important;
- }
- .folder-badge {
- position: absolute;
- bottom: 4px;
- right: 4px;
- width: 24px;
- height: 24px;
- display: flex;
- align-items: center;
- justify-content: center;
- background: rgba(255, 255, 255, 0.95);
- border-radius: 6px;
- font-size: 14px;
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
- }
- /* 文件夹图标 */
- .folder-icon {
- color: #ffc107;
- }
- /* 文件图标 */
- .file-icon-default {
- color: #90caf9;
- }
- .file-icon-image {
- color: #81c784;
- }
- .file-icon-video {
- color: #e57373;
- }
- .file-icon-audio {
- color: #ba68c8;
- }
- .file-icon-zip {
- color: #ff8a65;
- }
- .file-icon-document {
- color: #64b5f6;
- }
- /* 文件名 */
- .file-name {
- width: 100%;
- font-size: 13px;
- text-align: center;
- word-break: break-all;
- color: #333;
- line-height: 1.4;
- max-height: 2.8em;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- line-clamp: 2;
- -webkit-box-orient: vertical;
- padding: 2px 4px;
- border-radius: 4px;
- cursor: text;
- }
- .file-name:hover {
- background: rgba(24, 144, 255, 0.1);
- }
- /* 重命名输入框 */
- .rename-input {
- width: 100%;
- font-size: 13px;
- text-align: center;
- padding: 2px 4px;
- border: 1px solid #1890ff;
- border-radius: 4px;
- outline: none;
- background: white;
- }
- /* 文件信息 */
- .file-info {
- font-size: 11px;
- color: #999;
- margin-top: 4px;
- }
- /* 空状态 */
- .empty-state {
- display: none;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- height: 100%;
- color: #999;
- }
- .empty-state svg {
- margin-bottom: 24px;
- }
- .empty-state p {
- font-size: 16px;
- margin-bottom: 8px;
- }
- .empty-state .hint {
- font-size: 13px;
- color: #bbb;
- }
- .empty-state.show {
- display: flex;
- }
- /* 加载状态 */
- .loading {
- display: none;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(255, 255, 255, 0.9);
- z-index: 20;
- }
- .loading.show {
- display: flex;
- }
- .spinner {
- width: 40px;
- height: 40px;
- border: 3px solid #f3f3f3;
- border-top: 3px solid #1890ff;
- border-radius: 50%;
- animation: spin 1s linear infinite;
- }
- @keyframes spin {
- 0% { transform: rotate(0deg); }
- 100% { transform: rotate(360deg); }
- }
- .loading p {
- margin-top: 16px;
- color: #666;
- font-size: 14px;
- }
- /* 上传进度 */
- .upload-progress {
- display: none;
- position: fixed;
- bottom: 24px;
- right: 24px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
- padding: 16px;
- min-width: 300px;
- max-width: 400px;
- z-index: 1000;
- }
- .upload-progress.show {
- display: block;
- }
- .upload-progress-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 12px;
- }
- .upload-progress-title {
- font-size: 14px;
- font-weight: 500;
- color: #333;
- }
- .upload-progress-close {
- background: none;
- border: none;
- color: #999;
- cursor: pointer;
- padding: 4px;
- display: flex;
- align-items: center;
- }
- .upload-progress-item {
- display: flex;
- align-items: center;
- gap: 12px;
- padding: 8px 0;
- border-top: 1px solid #f0f0f0;
- }
- .upload-progress-icon {
- flex-shrink: 0;
- color: #1890ff;
- }
- .upload-progress-info {
- flex: 1;
- min-width: 0;
- }
- .upload-progress-name {
- font-size: 13px;
- color: #333;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .upload-progress-status {
- font-size: 12px;
- color: #999;
- margin-top: 2px;
- }
- .upload-progress-bar {
- width: 100%;
- height: 4px;
- background: #f0f0f0;
- border-radius: 2px;
- margin-top: 4px;
- overflow: hidden;
- }
- .upload-progress-bar-fill {
- height: 100%;
- background: #1890ff;
- transition: width 0.3s;
- }
- .upload-progress-list {
- max-height: 320px;
- overflow-y: auto;
- }
- /* 响应式 */
- @media (max-width: 768px) {
- .header {
- flex-direction: column;
- gap: 12px;
- align-items: stretch;
- }
-
- .breadcrumb {
- justify-content: flex-start;
- }
-
- .actions {
- justify-content: flex-end;
- }
-
- .file-list {
- gap: 12px;
- }
-
- .file-item {
- width: calc((100% - 24px) / 3);
- min-width: 100px;
- max-width: none;
- }
- }
- @media (max-width: 650px) {
- .file-item {
- width: calc((100% - 12px) / 2);
- min-width: 100px;
- }
- }
|