jvs-ppt-ui 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/jvs-ppt-ui.es.js +18145 -16271
- package/dist/lib/jvs-ppt-ui.umd.js +86 -86
- package/dist/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CanvasArea.vue +36 -4
- package/src/components/TemplateGallery.vue +401 -6
- package/src/components/material/CreateMaterialPanel.vue +2229 -0
- package/src/components/material/MyAssetsPanel.vue +1548 -0
- package/src/components/material/useDamAuth.ts +239 -0
|
@@ -0,0 +1,1548 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, computed, onMounted, onUnmounted, watch } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
Search,
|
|
5
|
+
CircleCloseFilled,
|
|
6
|
+
View,
|
|
7
|
+
VideoPlay
|
|
8
|
+
} from '@element-plus/icons-vue'
|
|
9
|
+
import { useSlides } from '../../composables/useSlides'
|
|
10
|
+
import { useDamAuth } from './useDamAuth'
|
|
11
|
+
import type { MaterialItem } from '../TemplateGallery.vue'
|
|
12
|
+
|
|
13
|
+
export interface DamProjectItem {
|
|
14
|
+
id: string
|
|
15
|
+
name: string
|
|
16
|
+
type: 'PERSONAL' | 'TEAM' | string
|
|
17
|
+
description?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface DamFolderNode {
|
|
21
|
+
id: string
|
|
22
|
+
projectId: string
|
|
23
|
+
parentId?: string
|
|
24
|
+
name: string
|
|
25
|
+
defaultFlag?: boolean
|
|
26
|
+
children?: DamFolderNode[]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const emit = defineEmits<{
|
|
30
|
+
(e: 'select', item: MaterialItem): void
|
|
31
|
+
(e: 'preview', item: MaterialItem, list: MaterialItem[], event?: Event): void
|
|
32
|
+
(e: 'use-as-ref', item: MaterialItem): void
|
|
33
|
+
}>()
|
|
34
|
+
|
|
35
|
+
const { notify } = useSlides()
|
|
36
|
+
const { damFetchJson, isDamLoggedIn } = useDamAuth()
|
|
37
|
+
|
|
38
|
+
// 搜索与过滤状态
|
|
39
|
+
const searchKeyword = ref('')
|
|
40
|
+
const mediaTypeFilter = ref<'ALL' | 'IMAGE' | 'VIDEO'>('ALL')
|
|
41
|
+
const activeSourceSubTab = ref<'recent' | 'ai' | 'uploads'>('recent')
|
|
42
|
+
|
|
43
|
+
// 项目与文件夹树状态
|
|
44
|
+
const projects = ref<DamProjectItem[]>([])
|
|
45
|
+
const folderTrees = ref<Record<string, DamFolderNode[]>>({})
|
|
46
|
+
const expandedProjectIds = ref<Record<string, boolean>>({})
|
|
47
|
+
const selectedProjectId = ref<string>('')
|
|
48
|
+
const selectedFolderId = ref<string>('')
|
|
49
|
+
const selectedTreeLabel = ref<string>('全部项目资产')
|
|
50
|
+
const treePopoverVisible = ref(false)
|
|
51
|
+
const treeTriggerRef = ref<HTMLElement | null>(null)
|
|
52
|
+
|
|
53
|
+
// 列表与分页状态
|
|
54
|
+
const loading = ref(false)
|
|
55
|
+
const loadingMore = ref(false)
|
|
56
|
+
const isUploading = ref(false)
|
|
57
|
+
const currentPage = ref(1)
|
|
58
|
+
const pageSize = 20
|
|
59
|
+
const reachEnd = ref(false)
|
|
60
|
+
const assetList = ref<MaterialItem[]>([])
|
|
61
|
+
const fileInputRef = ref<HTMLInputElement | null>(null)
|
|
62
|
+
|
|
63
|
+
const PROJECT_COLORS = ['#3b82f6', '#10b981', '#8b5cf6', '#f59e0b', '#ec4899']
|
|
64
|
+
|
|
65
|
+
function getProjectColor(proj: DamProjectItem, idx: number): string {
|
|
66
|
+
if (proj.type === 'PERSONAL') return '#3b82f6'
|
|
67
|
+
return PROJECT_COLORS[idx % PROJECT_COLORS.length] || '#10b981'
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function getProjectDisplayName(proj: DamProjectItem): string {
|
|
71
|
+
if (!proj) return '项目'
|
|
72
|
+
if (proj.name === 'Personal project' || proj.type === 'PERSONAL') {
|
|
73
|
+
return proj.name === 'Personal project' ? '个人项目' : proj.name
|
|
74
|
+
}
|
|
75
|
+
return proj.name
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 组装多级文件夹树结构
|
|
80
|
+
*/
|
|
81
|
+
function buildFolderTree(rawList: any[]): DamFolderNode[] {
|
|
82
|
+
if (!Array.isArray(rawList) || rawList.length === 0) return []
|
|
83
|
+
const hasNested = rawList.some(item => Array.isArray(item.children) && item.children.length > 0)
|
|
84
|
+
if (hasNested) return rawList
|
|
85
|
+
|
|
86
|
+
const nodeMap = new Map<string, DamFolderNode>()
|
|
87
|
+
const roots: DamFolderNode[] = []
|
|
88
|
+
|
|
89
|
+
rawList.forEach(item => {
|
|
90
|
+
nodeMap.set(String(item.id), {
|
|
91
|
+
id: String(item.id),
|
|
92
|
+
projectId: String(item.projectId || ''),
|
|
93
|
+
parentId: item.parentId ? String(item.parentId) : '0',
|
|
94
|
+
name: item.name || '文件夹',
|
|
95
|
+
defaultFlag: item.defaultFlag,
|
|
96
|
+
children: []
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
nodeMap.forEach(node => {
|
|
101
|
+
const pid = node.parentId
|
|
102
|
+
if (pid && pid !== '0' && nodeMap.has(pid)) {
|
|
103
|
+
nodeMap.get(pid)!.children!.push(node)
|
|
104
|
+
} else {
|
|
105
|
+
roots.push(node)
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
return roots
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 拉取当前用户的项目列表及默认展开项目的文件夹树
|
|
114
|
+
*/
|
|
115
|
+
async function fetchProjectsAndFolders() {
|
|
116
|
+
if (!isDamLoggedIn.value) return
|
|
117
|
+
try {
|
|
118
|
+
const res = await damFetchJson('/project/my')
|
|
119
|
+
let rawProjects: any[] = []
|
|
120
|
+
if (Array.isArray(res)) rawProjects = res
|
|
121
|
+
else if (Array.isArray(res?.data?.data)) rawProjects = res.data.data
|
|
122
|
+
else if (Array.isArray(res?.data)) rawProjects = res.data
|
|
123
|
+
|
|
124
|
+
if (rawProjects.length === 0) {
|
|
125
|
+
// 尝试初始化并获取个人项目
|
|
126
|
+
const pRes = await damFetchJson('/project/personal')
|
|
127
|
+
const pData = pRes?.data?.data || pRes?.data || pRes
|
|
128
|
+
if (pData && pData.id) {
|
|
129
|
+
rawProjects = [pData]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
projects.value = rawProjects.map(p => ({
|
|
134
|
+
id: String(p.id),
|
|
135
|
+
name: p.name || '未命名项目',
|
|
136
|
+
type: p.type || 'PERSONAL',
|
|
137
|
+
description: p.description
|
|
138
|
+
}))
|
|
139
|
+
|
|
140
|
+
// 默认预加载首个项目的文件夹树
|
|
141
|
+
const firstProj = projects.value[0]
|
|
142
|
+
if (firstProj) {
|
|
143
|
+
expandedProjectIds.value[firstProj.id] = true
|
|
144
|
+
await fetchFolderTreeForProject(firstProj.id)
|
|
145
|
+
}
|
|
146
|
+
} catch (err) {
|
|
147
|
+
console.warn('[MyAssets] 获取项目列表失败:', err)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async function fetchFolderTreeForProject(projectId: string) {
|
|
152
|
+
if (!projectId) return
|
|
153
|
+
try {
|
|
154
|
+
const res = await damFetchJson('/folder/tree', {
|
|
155
|
+
params: { projectId }
|
|
156
|
+
})
|
|
157
|
+
let rawList: any[] = []
|
|
158
|
+
if (Array.isArray(res)) rawList = res
|
|
159
|
+
else if (Array.isArray(res?.data?.data)) rawList = res.data.data
|
|
160
|
+
else if (Array.isArray(res?.data)) rawList = res.data
|
|
161
|
+
|
|
162
|
+
folderTrees.value = {
|
|
163
|
+
...folderTrees.value,
|
|
164
|
+
[projectId]: buildFolderTree(rawList)
|
|
165
|
+
}
|
|
166
|
+
} catch (err) {
|
|
167
|
+
console.warn('[MyAssets] 获取文件夹树失败:', err)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
async function toggleProjectExpand(projectId: string, e: Event) {
|
|
172
|
+
e.stopPropagation()
|
|
173
|
+
const nextState = !expandedProjectIds.value[projectId]
|
|
174
|
+
expandedProjectIds.value[projectId] = nextState
|
|
175
|
+
if (nextState && !folderTrees.value[projectId]) {
|
|
176
|
+
await fetchFolderTreeForProject(projectId)
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function selectAllAssets() {
|
|
181
|
+
selectedProjectId.value = ''
|
|
182
|
+
selectedFolderId.value = ''
|
|
183
|
+
selectedTreeLabel.value = '全部项目资产'
|
|
184
|
+
treePopoverVisible.value = false
|
|
185
|
+
reloadAssets()
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function selectProjectNode(proj: DamProjectItem) {
|
|
189
|
+
selectedProjectId.value = proj.id
|
|
190
|
+
selectedFolderId.value = ''
|
|
191
|
+
selectedTreeLabel.value = getProjectDisplayName(proj)
|
|
192
|
+
treePopoverVisible.value = false
|
|
193
|
+
if (!folderTrees.value[proj.id]) {
|
|
194
|
+
fetchFolderTreeForProject(proj.id)
|
|
195
|
+
}
|
|
196
|
+
reloadAssets()
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function selectFolderNode(proj: DamProjectItem, folder: DamFolderNode) {
|
|
200
|
+
selectedProjectId.value = proj.id
|
|
201
|
+
selectedFolderId.value = folder.id
|
|
202
|
+
selectedTreeLabel.value = `${getProjectDisplayName(proj)} / ${folder.name}`
|
|
203
|
+
treePopoverVisible.value = false
|
|
204
|
+
reloadAssets()
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function isVideoAsset(raw: any): boolean {
|
|
208
|
+
const assetType = String(raw.assetType || raw.mediaType || raw.type || '').toUpperCase()
|
|
209
|
+
if (assetType === 'VIDEO') return true
|
|
210
|
+
const u = String(raw.fileUrl || raw.url || raw.ossUrl || raw.imageUrl || '').split('?')[0].toLowerCase()
|
|
211
|
+
return u.endsWith('.mp4') || u.endsWith('.webm') || u.endsWith('.mov') || u.endsWith('.m4v')
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* 将后端 Asset / RecentAssetVO / AiGenerationRecord / UploadFile 统一映射为 MaterialItem
|
|
216
|
+
*/
|
|
217
|
+
function normalizeDamAsset(raw: any): MaterialItem | null {
|
|
218
|
+
if (!raw) return null
|
|
219
|
+
// semantic/search 接口返回的条目可能包裹在 asset 属性中
|
|
220
|
+
const entity = raw.asset && typeof raw.asset === 'object' ? { ...raw.asset, score: raw.score } : raw
|
|
221
|
+
|
|
222
|
+
const url =
|
|
223
|
+
entity.fileUrl ||
|
|
224
|
+
entity.imageUrl ||
|
|
225
|
+
entity.ossUrl ||
|
|
226
|
+
entity.fileLink ||
|
|
227
|
+
entity.url ||
|
|
228
|
+
entity.previewUrl ||
|
|
229
|
+
entity.sourceUrl ||
|
|
230
|
+
''
|
|
231
|
+
if (!url) return null
|
|
232
|
+
|
|
233
|
+
const isVid = isVideoAsset(entity)
|
|
234
|
+
let meta: any = {}
|
|
235
|
+
if (entity.metaDataJson) {
|
|
236
|
+
try {
|
|
237
|
+
meta = typeof entity.metaDataJson === 'string' ? JSON.parse(entity.metaDataJson) : entity.metaDataJson
|
|
238
|
+
} catch {
|
|
239
|
+
meta = {}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
const rawTitle =
|
|
244
|
+
entity.name ||
|
|
245
|
+
entity.prompt ||
|
|
246
|
+
meta.prompt ||
|
|
247
|
+
entity.fileName ||
|
|
248
|
+
entity.fileOriginalName ||
|
|
249
|
+
entity.portrait?.summary ||
|
|
250
|
+
(isVid ? '视频资产' : '图片资产')
|
|
251
|
+
|
|
252
|
+
const cleanTitle = String(rawTitle).replace(/\.[a-zA-Z0-9]+$/, '').replace(/_\d{10,14}$/, '')
|
|
253
|
+
const sourceType = String(entity.sourceType || '').toUpperCase()
|
|
254
|
+
let badgeLabel = '资产'
|
|
255
|
+
if (isVid) badgeLabel = '视频'
|
|
256
|
+
else if (sourceType === 'GENERATE' || activeSourceSubTab.value === 'ai' || entity.recordId || entity.sessionId) {
|
|
257
|
+
badgeLabel = 'AI 生成'
|
|
258
|
+
} else if (sourceType === 'UPLOAD' || activeSourceSubTab.value === 'uploads') {
|
|
259
|
+
badgeLabel = '已上传'
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const w = Number(meta.width || entity.width || entity.originalWidth || 0)
|
|
263
|
+
const h = Number(meta.height || entity.height || entity.originalHeight || 0)
|
|
264
|
+
|
|
265
|
+
return {
|
|
266
|
+
id: String(entity.id || entity.fileId || entity.recordId || `dam-${Math.random().toString(36).slice(2, 9)}`),
|
|
267
|
+
title: cleanTitle || '我的素材',
|
|
268
|
+
type: isVid ? 'video' : 'image',
|
|
269
|
+
assetType: isVid ? 'VIDEO' : 'IMAGE',
|
|
270
|
+
sourceType: sourceType || (activeSourceSubTab.value === 'ai' ? 'GENERATE' : 'UPLOAD'),
|
|
271
|
+
badgeLabel,
|
|
272
|
+
url,
|
|
273
|
+
previewUrl: entity.previewUrl || url,
|
|
274
|
+
sourceUrl: url,
|
|
275
|
+
originalWidth: w > 0 ? w : undefined,
|
|
276
|
+
originalHeight: h > 0 ? h : undefined,
|
|
277
|
+
projectId: entity.projectId,
|
|
278
|
+
folderId: entity.folderId,
|
|
279
|
+
model: entity.model || meta.model || '',
|
|
280
|
+
createTime: entity.createTime || entity.uploadTime || ''
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function extractRecordsFromResponse(res: any): any[] {
|
|
285
|
+
if (!res) return []
|
|
286
|
+
if (Array.isArray(res)) return res
|
|
287
|
+
if (Array.isArray(res?.data?.records)) return res.data.records
|
|
288
|
+
if (Array.isArray(res?.records)) return res.records
|
|
289
|
+
if (Array.isArray(res?.data?.data?.records)) return res.data.data.records
|
|
290
|
+
if (Array.isArray(res?.data?.data)) return res.data.data
|
|
291
|
+
if (Array.isArray(res?.data?.list)) return res.data.list
|
|
292
|
+
if (Array.isArray(res?.data)) return res.data
|
|
293
|
+
return []
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* 加载我的素材列表
|
|
298
|
+
*/
|
|
299
|
+
async function fetchMyAssets(page = 1, append = false) {
|
|
300
|
+
if (!isDamLoggedIn.value) {
|
|
301
|
+
assetList.value = []
|
|
302
|
+
reachEnd.value = true
|
|
303
|
+
return
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
try {
|
|
307
|
+
loading.value = !append
|
|
308
|
+
loadingMore.value = append
|
|
309
|
+
|
|
310
|
+
const kw = searchKeyword.value.trim()
|
|
311
|
+
const assetTypeParam = mediaTypeFilter.value === 'ALL' ? undefined : mediaTypeFilter.value
|
|
312
|
+
let rawItems: any[] = []
|
|
313
|
+
|
|
314
|
+
if (activeSourceSubTab.value === 'ai') {
|
|
315
|
+
// 1. AI 创作历史记录 (/jvs-dam/ai/record/page)
|
|
316
|
+
const res = await damFetchJson('/ai/record/page', {
|
|
317
|
+
params: {
|
|
318
|
+
current: page,
|
|
319
|
+
size: pageSize,
|
|
320
|
+
mediaType: assetTypeParam || 'IMAGE',
|
|
321
|
+
operationType: 'GENERATE'
|
|
322
|
+
}
|
|
323
|
+
})
|
|
324
|
+
rawItems = extractRecordsFromResponse(res)
|
|
325
|
+
} else if (activeSourceSubTab.value === 'uploads') {
|
|
326
|
+
// 2. 本地已上传文件列表 (/jvs-dam/upload/file/list)
|
|
327
|
+
const res = await damFetchJson('/upload/file/list', {
|
|
328
|
+
params: {
|
|
329
|
+
current: page,
|
|
330
|
+
size: pageSize,
|
|
331
|
+
projectId: selectedProjectId.value || undefined,
|
|
332
|
+
folderId: selectedFolderId.value || undefined,
|
|
333
|
+
name: kw || undefined
|
|
334
|
+
}
|
|
335
|
+
})
|
|
336
|
+
rawItems = extractRecordsFromResponse(res)
|
|
337
|
+
} else {
|
|
338
|
+
// 3. 最近资产 / 项目文件夹筛选 / 语义检索
|
|
339
|
+
if (kw && !selectedFolderId.value) {
|
|
340
|
+
// 有搜索词且未限定具体子文件夹时,优先走语义检索接口(后端自带关键词降级)
|
|
341
|
+
try {
|
|
342
|
+
const semRes = await damFetchJson('/asset/semantic/search', {
|
|
343
|
+
params: {
|
|
344
|
+
query: kw,
|
|
345
|
+
assetType: assetTypeParam,
|
|
346
|
+
projectId: selectedProjectId.value || undefined,
|
|
347
|
+
current: page,
|
|
348
|
+
size: pageSize
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
rawItems = extractRecordsFromResponse(semRes)
|
|
352
|
+
} catch {
|
|
353
|
+
// 降级到 recent 接口
|
|
354
|
+
const recRes = await damFetchJson('/asset/recent', {
|
|
355
|
+
params: {
|
|
356
|
+
projectId: selectedProjectId.value || undefined,
|
|
357
|
+
folderId: selectedFolderId.value || undefined,
|
|
358
|
+
name: kw,
|
|
359
|
+
assetType: assetTypeParam,
|
|
360
|
+
current: page,
|
|
361
|
+
size: pageSize
|
|
362
|
+
}
|
|
363
|
+
})
|
|
364
|
+
rawItems = extractRecordsFromResponse(recRes)
|
|
365
|
+
}
|
|
366
|
+
} else if (selectedProjectId.value && selectedFolderId.value) {
|
|
367
|
+
// 选中了具体文件夹时,走 /asset/page
|
|
368
|
+
const pageRes = await damFetchJson('/asset/page', {
|
|
369
|
+
params: {
|
|
370
|
+
projectId: selectedProjectId.value,
|
|
371
|
+
folderId: selectedFolderId.value,
|
|
372
|
+
name: kw || undefined,
|
|
373
|
+
current: page,
|
|
374
|
+
size: pageSize
|
|
375
|
+
}
|
|
376
|
+
})
|
|
377
|
+
rawItems = extractRecordsFromResponse(pageRes)
|
|
378
|
+
} else {
|
|
379
|
+
// 默认浏览最近资产(支持全部项目或单个 projectId)
|
|
380
|
+
const recRes = await damFetchJson('/asset/recent', {
|
|
381
|
+
params: {
|
|
382
|
+
projectId: selectedProjectId.value || undefined,
|
|
383
|
+
folderId: selectedFolderId.value || undefined,
|
|
384
|
+
name: kw || undefined,
|
|
385
|
+
assetType: assetTypeParam,
|
|
386
|
+
current: page,
|
|
387
|
+
size: pageSize
|
|
388
|
+
}
|
|
389
|
+
})
|
|
390
|
+
rawItems = extractRecordsFromResponse(recRes)
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const normalized = rawItems
|
|
395
|
+
.map(normalizeDamAsset)
|
|
396
|
+
.filter((item): item is MaterialItem => Boolean(item))
|
|
397
|
+
.filter(item => {
|
|
398
|
+
if (mediaTypeFilter.value === 'IMAGE') return item.type !== 'video'
|
|
399
|
+
if (mediaTypeFilter.value === 'VIDEO') return item.type === 'video'
|
|
400
|
+
if (kw && activeSourceSubTab.value === 'ai') {
|
|
401
|
+
return item.title.toLowerCase().includes(kw.toLowerCase())
|
|
402
|
+
}
|
|
403
|
+
return true
|
|
404
|
+
})
|
|
405
|
+
|
|
406
|
+
if (rawItems.length < pageSize) {
|
|
407
|
+
reachEnd.value = true
|
|
408
|
+
} else {
|
|
409
|
+
reachEnd.value = false
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
if (append) {
|
|
413
|
+
const existingIds = new Set(assetList.value.map(i => i.id))
|
|
414
|
+
const uniqueNew = normalized.filter(i => !existingIds.has(i.id))
|
|
415
|
+
assetList.value = [...assetList.value, ...uniqueNew]
|
|
416
|
+
} else {
|
|
417
|
+
assetList.value = normalized
|
|
418
|
+
}
|
|
419
|
+
currentPage.value = page
|
|
420
|
+
} catch (err: any) {
|
|
421
|
+
console.warn('[MyAssets] 加载个人资产异常:', err)
|
|
422
|
+
if (!append) {
|
|
423
|
+
assetList.value = []
|
|
424
|
+
}
|
|
425
|
+
reachEnd.value = true
|
|
426
|
+
} finally {
|
|
427
|
+
loading.value = false
|
|
428
|
+
loadingMore.value = false
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
function reloadAssets() {
|
|
433
|
+
currentPage.value = 1
|
|
434
|
+
reachEnd.value = false
|
|
435
|
+
fetchMyAssets(1, false)
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function handleSearchEnter() {
|
|
439
|
+
reloadAssets()
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function clearSearch() {
|
|
443
|
+
searchKeyword.value = ''
|
|
444
|
+
reloadAssets()
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
function switchMediaType(type: 'ALL' | 'IMAGE' | 'VIDEO') {
|
|
448
|
+
if (mediaTypeFilter.value === type) return
|
|
449
|
+
mediaTypeFilter.value = type
|
|
450
|
+
reloadAssets()
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
function switchSourceSubTab(sub: 'recent' | 'ai' | 'uploads') {
|
|
454
|
+
if (activeSourceSubTab.value === sub) return
|
|
455
|
+
activeSourceSubTab.value = sub
|
|
456
|
+
reloadAssets()
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
function loadMoreAssets() {
|
|
460
|
+
if (loading.value || loadingMore.value || reachEnd.value) return
|
|
461
|
+
fetchMyAssets(currentPage.value + 1, true)
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
// 双列贪心高度平衡瀑布流
|
|
465
|
+
const waterfallColumns = computed<[MaterialItem[], MaterialItem[]]>(() => {
|
|
466
|
+
const left: MaterialItem[] = []
|
|
467
|
+
const right: MaterialItem[] = []
|
|
468
|
+
let leftH = 0
|
|
469
|
+
let rightH = 0
|
|
470
|
+
|
|
471
|
+
assetList.value.forEach((item, idx) => {
|
|
472
|
+
let ratio = 0.85
|
|
473
|
+
const w = Number(item.originalWidth || 0)
|
|
474
|
+
const h = Number(item.originalHeight || 0)
|
|
475
|
+
if (w > 0 && h > 0) {
|
|
476
|
+
ratio = Math.max(0.55, Math.min(1.6, h / w))
|
|
477
|
+
} else if (item.type === 'video') {
|
|
478
|
+
ratio = 0.65
|
|
479
|
+
} else if (idx % 3 === 1) {
|
|
480
|
+
ratio = 1.1
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
if (leftH <= rightH) {
|
|
484
|
+
left.push(item)
|
|
485
|
+
leftH += ratio
|
|
486
|
+
} else {
|
|
487
|
+
right.push(item)
|
|
488
|
+
rightH += ratio
|
|
489
|
+
}
|
|
490
|
+
})
|
|
491
|
+
|
|
492
|
+
return [left, right]
|
|
493
|
+
})
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* 触发本地文件选择上传
|
|
497
|
+
*/
|
|
498
|
+
function triggerUploadClick() {
|
|
499
|
+
fileInputRef.value?.click()
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
function extractUploadedUrl(res: any): string {
|
|
503
|
+
if (!res) return ''
|
|
504
|
+
const body = res.data !== undefined ? res.data : res
|
|
505
|
+
if (typeof body === 'string') return body
|
|
506
|
+
const inner = body?.data !== undefined ? body.data : body
|
|
507
|
+
if (typeof inner === 'string') return inner
|
|
508
|
+
return (
|
|
509
|
+
inner?.ossUrl ||
|
|
510
|
+
inner?.fileLink ||
|
|
511
|
+
inner?.fileUrl ||
|
|
512
|
+
inner?.url ||
|
|
513
|
+
inner?.link ||
|
|
514
|
+
body?.ossUrl ||
|
|
515
|
+
body?.fileLink ||
|
|
516
|
+
body?.fileUrl ||
|
|
517
|
+
body?.url ||
|
|
518
|
+
''
|
|
519
|
+
)
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
async function handleFileUploadChange(e: Event) {
|
|
523
|
+
const input = e.target as HTMLInputElement
|
|
524
|
+
const files = input.files ? Array.from(input.files) : []
|
|
525
|
+
input.value = ''
|
|
526
|
+
if (files.length === 0) return
|
|
527
|
+
|
|
528
|
+
isUploading.value = true
|
|
529
|
+
try {
|
|
530
|
+
// 确保获取到默认项目 ID
|
|
531
|
+
let targetProjId = selectedProjectId.value
|
|
532
|
+
if (!targetProjId) {
|
|
533
|
+
if (projects.value.length === 0) {
|
|
534
|
+
await fetchProjectsAndFolders()
|
|
535
|
+
}
|
|
536
|
+
const personal = projects.value.find(p => p.type === 'PERSONAL') || projects.value[0]
|
|
537
|
+
targetProjId = personal?.id || ''
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
let uploadedCount = 0
|
|
541
|
+
for (const file of files) {
|
|
542
|
+
const isVid = file.type.startsWith('video/')
|
|
543
|
+
const formData = new FormData()
|
|
544
|
+
formData.append('file', file)
|
|
545
|
+
formData.append('path', '/dam/media/')
|
|
546
|
+
formData.append('fileName', file.name)
|
|
547
|
+
formData.append('id', String(Date.now()))
|
|
548
|
+
if (targetProjId) formData.append('projectId', targetProjId)
|
|
549
|
+
if (selectedFolderId.value) formData.append('folderId', selectedFolderId.value)
|
|
550
|
+
formData.append('assetType', isVid ? 'VIDEO' : 'IMAGE')
|
|
551
|
+
|
|
552
|
+
const uploadRes = await damFetchJson('/upload/file', {
|
|
553
|
+
method: 'POST',
|
|
554
|
+
body: formData
|
|
555
|
+
})
|
|
556
|
+
const fileUrl = extractUploadedUrl(uploadRes)
|
|
557
|
+
if (fileUrl) {
|
|
558
|
+
uploadedCount++
|
|
559
|
+
// 同步登记为数字资产(若后端 upload/file 未自动入库 asset 表,则补偿调用 POST /asset)
|
|
560
|
+
if (targetProjId) {
|
|
561
|
+
try {
|
|
562
|
+
await damFetchJson('/asset', {
|
|
563
|
+
method: 'POST',
|
|
564
|
+
body: JSON.stringify({
|
|
565
|
+
projectId: targetProjId,
|
|
566
|
+
folderId: selectedFolderId.value || undefined,
|
|
567
|
+
name: file.name,
|
|
568
|
+
assetType: isVid ? 'VIDEO' : 'IMAGE',
|
|
569
|
+
sourceType: 'UPLOAD',
|
|
570
|
+
fileUrl,
|
|
571
|
+
fileExtension: file.name.split('.').pop()?.toLowerCase() || (isVid ? 'mp4' : 'png')
|
|
572
|
+
})
|
|
573
|
+
})
|
|
574
|
+
} catch {
|
|
575
|
+
// 忽略重复登记异常
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if (uploadedCount > 0) {
|
|
582
|
+
notify(`已成功上传 ${uploadedCount} 个素材到我的资产库`)
|
|
583
|
+
reloadAssets()
|
|
584
|
+
} else {
|
|
585
|
+
notify('上传未返回有效文件地址')
|
|
586
|
+
}
|
|
587
|
+
} catch (err: any) {
|
|
588
|
+
notify(`上传素材失败: ${err.message || '网络异常'}`)
|
|
589
|
+
} finally {
|
|
590
|
+
isUploading.value = false
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
function handleOutsideClick(e: MouseEvent) {
|
|
595
|
+
if (!treePopoverVisible.value) return
|
|
596
|
+
const target = e.target as Node
|
|
597
|
+
if (treeTriggerRef.value && !treeTriggerRef.value.contains(target)) {
|
|
598
|
+
treePopoverVisible.value = false
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
onMounted(() => {
|
|
603
|
+
fetchProjectsAndFolders()
|
|
604
|
+
fetchMyAssets(1, false)
|
|
605
|
+
window.addEventListener('click', handleOutsideClick)
|
|
606
|
+
})
|
|
607
|
+
|
|
608
|
+
onUnmounted(() => {
|
|
609
|
+
window.removeEventListener('click', handleOutsideClick)
|
|
610
|
+
})
|
|
611
|
+
|
|
612
|
+
watch(isDamLoggedIn, (logged) => {
|
|
613
|
+
if (logged) {
|
|
614
|
+
fetchProjectsAndFolders()
|
|
615
|
+
fetchMyAssets(1, false)
|
|
616
|
+
} else {
|
|
617
|
+
assetList.value = []
|
|
618
|
+
}
|
|
619
|
+
})
|
|
620
|
+
|
|
621
|
+
defineExpose({
|
|
622
|
+
reloadAssets
|
|
623
|
+
})
|
|
624
|
+
</script>
|
|
625
|
+
|
|
626
|
+
<template>
|
|
627
|
+
<div class="my-assets-panel">
|
|
628
|
+
<!-- 隐藏的文件上传控件 -->
|
|
629
|
+
<input
|
|
630
|
+
ref="fileInputRef"
|
|
631
|
+
type="file"
|
|
632
|
+
multiple
|
|
633
|
+
accept="image/*,video/*"
|
|
634
|
+
style="display: none"
|
|
635
|
+
@change="handleFileUploadChange"
|
|
636
|
+
/>
|
|
637
|
+
|
|
638
|
+
<!-- 1. 顶部搜索框 + 本地上传按钮 -->
|
|
639
|
+
<div class="mine-top-search-row">
|
|
640
|
+
<div class="mine-search-box">
|
|
641
|
+
<el-icon class="mine-search-icon" @click="handleSearchEnter">
|
|
642
|
+
<Search />
|
|
643
|
+
</el-icon>
|
|
644
|
+
<input
|
|
645
|
+
v-model="searchKeyword"
|
|
646
|
+
type="text"
|
|
647
|
+
placeholder="语义搜索我的资产/描述词..."
|
|
648
|
+
class="mine-search-input"
|
|
649
|
+
@keyup.enter="handleSearchEnter"
|
|
650
|
+
/>
|
|
651
|
+
<el-icon
|
|
652
|
+
v-if="searchKeyword"
|
|
653
|
+
class="mine-search-clear"
|
|
654
|
+
@click="clearSearch"
|
|
655
|
+
>
|
|
656
|
+
<CircleCloseFilled />
|
|
657
|
+
</el-icon>
|
|
658
|
+
</div>
|
|
659
|
+
|
|
660
|
+
<button
|
|
661
|
+
type="button"
|
|
662
|
+
class="mine-upload-btn"
|
|
663
|
+
:disabled="isUploading"
|
|
664
|
+
title="上传本地图片或视频至我的资产库"
|
|
665
|
+
@click="triggerUploadClick"
|
|
666
|
+
>
|
|
667
|
+
<span v-if="isUploading" class="mini-spin-ring"></span>
|
|
668
|
+
<span v-else>+</span>
|
|
669
|
+
<span>{{ isUploading ? '上传中' : '上传' }}</span>
|
|
670
|
+
</button>
|
|
671
|
+
</div>
|
|
672
|
+
|
|
673
|
+
<!-- 2. 项目/文件夹树级联选择器 + 媒介类型过滤胶囊 -->
|
|
674
|
+
<div class="mine-filter-bar">
|
|
675
|
+
<div ref="treeTriggerRef" class="project-tree-selector-wrap">
|
|
676
|
+
<button
|
|
677
|
+
type="button"
|
|
678
|
+
class="project-tree-trigger"
|
|
679
|
+
:class="{ active: treePopoverVisible || selectedProjectId }"
|
|
680
|
+
@click.stop="treePopoverVisible = !treePopoverVisible"
|
|
681
|
+
>
|
|
682
|
+
<span class="proj-dot" :class="{ 'is-filtered': !!selectedProjectId }"></span>
|
|
683
|
+
<span class="proj-label" :title="selectedTreeLabel">{{ selectedTreeLabel }}</span>
|
|
684
|
+
<svg class="chevron-svg" viewBox="0 0 24 24" width="11" height="11" fill="none" stroke="currentColor" stroke-width="2.2">
|
|
685
|
+
<polyline points="6 9 12 15 18 9" />
|
|
686
|
+
</svg>
|
|
687
|
+
</button>
|
|
688
|
+
|
|
689
|
+
<!-- 项目 -> 多级文件夹树弹出面板 -->
|
|
690
|
+
<transition name="pop-fade">
|
|
691
|
+
<div v-if="treePopoverVisible" class="project-tree-popover" @click.stop>
|
|
692
|
+
<div class="popover-section-header">选择项目或子文件夹</div>
|
|
693
|
+
|
|
694
|
+
<div
|
|
695
|
+
class="tree-node-row all-node"
|
|
696
|
+
:class="{ active: !selectedProjectId && !selectedFolderId }"
|
|
697
|
+
@click="selectAllAssets"
|
|
698
|
+
>
|
|
699
|
+
<span class="node-icon">🌐</span>
|
|
700
|
+
<span class="node-name">全部可访问资产</span>
|
|
701
|
+
</div>
|
|
702
|
+
|
|
703
|
+
<div class="tree-projects-scroll">
|
|
704
|
+
<div
|
|
705
|
+
v-for="(proj, pIdx) in projects"
|
|
706
|
+
:key="proj.id"
|
|
707
|
+
class="tree-project-block"
|
|
708
|
+
>
|
|
709
|
+
<div
|
|
710
|
+
class="tree-node-row project-node"
|
|
711
|
+
:class="{ active: selectedProjectId === proj.id && !selectedFolderId }"
|
|
712
|
+
@click="selectProjectNode(proj)"
|
|
713
|
+
>
|
|
714
|
+
<button
|
|
715
|
+
type="button"
|
|
716
|
+
class="tree-expand-btn"
|
|
717
|
+
:class="{ expanded: expandedProjectIds[proj.id] }"
|
|
718
|
+
@click="toggleProjectExpand(proj.id, $event)"
|
|
719
|
+
>
|
|
720
|
+
<svg viewBox="0 0 24 24" width="10" height="10" fill="none" stroke="currentColor" stroke-width="2.5">
|
|
721
|
+
<polyline points="9 18 15 12 9 6" />
|
|
722
|
+
</svg>
|
|
723
|
+
</button>
|
|
724
|
+
<span class="project-color-sq" :style="{ backgroundColor: getProjectColor(proj, pIdx) }"></span>
|
|
725
|
+
<span class="node-name">{{ getProjectDisplayName(proj) }}</span>
|
|
726
|
+
<span v-if="proj.type === 'TEAM'" class="team-tag">团队</span>
|
|
727
|
+
</div>
|
|
728
|
+
|
|
729
|
+
<!-- 展开项目下的文件夹列表 -->
|
|
730
|
+
<div v-if="expandedProjectIds[proj.id]" class="tree-folders-children">
|
|
731
|
+
<template v-if="folderTrees[proj.id] && folderTrees[proj.id].length > 0">
|
|
732
|
+
<template v-for="folder in folderTrees[proj.id]" :key="folder.id">
|
|
733
|
+
<div
|
|
734
|
+
class="tree-node-row folder-node"
|
|
735
|
+
:class="{ active: selectedFolderId === folder.id }"
|
|
736
|
+
@click="selectFolderNode(proj, folder)"
|
|
737
|
+
>
|
|
738
|
+
<span class="folder-icon">📁</span>
|
|
739
|
+
<span class="node-name">{{ folder.name }}</span>
|
|
740
|
+
</div>
|
|
741
|
+
<!-- 二级子文件夹 -->
|
|
742
|
+
<template v-if="folder.children && folder.children.length > 0">
|
|
743
|
+
<div
|
|
744
|
+
v-for="sub in folder.children"
|
|
745
|
+
:key="sub.id"
|
|
746
|
+
class="tree-node-row folder-node level-2"
|
|
747
|
+
:class="{ active: selectedFolderId === sub.id }"
|
|
748
|
+
@click="selectFolderNode(proj, sub)"
|
|
749
|
+
>
|
|
750
|
+
<span class="folder-icon">📁</span>
|
|
751
|
+
<span class="node-name">{{ sub.name }}</span>
|
|
752
|
+
</div>
|
|
753
|
+
</template>
|
|
754
|
+
</template>
|
|
755
|
+
</template>
|
|
756
|
+
<div v-else class="tree-empty-folder-tip">默认目录</div>
|
|
757
|
+
</div>
|
|
758
|
+
</div>
|
|
759
|
+
</div>
|
|
760
|
+
</div>
|
|
761
|
+
</transition>
|
|
762
|
+
</div>
|
|
763
|
+
|
|
764
|
+
<!-- 媒介类型胶囊 (全部 / 图片 / 视频) -->
|
|
765
|
+
<div class="media-type-pills">
|
|
766
|
+
<button
|
|
767
|
+
type="button"
|
|
768
|
+
class="media-pill"
|
|
769
|
+
:class="{ active: mediaTypeFilter === 'ALL' }"
|
|
770
|
+
@click="switchMediaType('ALL')"
|
|
771
|
+
>
|
|
772
|
+
全部
|
|
773
|
+
</button>
|
|
774
|
+
<button
|
|
775
|
+
type="button"
|
|
776
|
+
class="media-pill"
|
|
777
|
+
:class="{ active: mediaTypeFilter === 'IMAGE' }"
|
|
778
|
+
@click="switchMediaType('IMAGE')"
|
|
779
|
+
>
|
|
780
|
+
图片
|
|
781
|
+
</button>
|
|
782
|
+
<button
|
|
783
|
+
type="button"
|
|
784
|
+
class="media-pill"
|
|
785
|
+
:class="{ active: mediaTypeFilter === 'VIDEO' }"
|
|
786
|
+
@click="switchMediaType('VIDEO')"
|
|
787
|
+
>
|
|
788
|
+
视频
|
|
789
|
+
</button>
|
|
790
|
+
</div>
|
|
791
|
+
</div>
|
|
792
|
+
|
|
793
|
+
<!-- 3. 二级来源切换栏 (最近资产 / AI 创作记录 / 已上传) -->
|
|
794
|
+
<div class="mine-sub-tabs">
|
|
795
|
+
<button
|
|
796
|
+
type="button"
|
|
797
|
+
class="mine-sub-tab"
|
|
798
|
+
:class="{ active: activeSourceSubTab === 'recent' }"
|
|
799
|
+
@click="switchSourceSubTab('recent')"
|
|
800
|
+
>
|
|
801
|
+
最近资产
|
|
802
|
+
</button>
|
|
803
|
+
<button
|
|
804
|
+
type="button"
|
|
805
|
+
class="mine-sub-tab"
|
|
806
|
+
:class="{ active: activeSourceSubTab === 'ai' }"
|
|
807
|
+
@click="switchSourceSubTab('ai')"
|
|
808
|
+
>
|
|
809
|
+
AI 创作记录
|
|
810
|
+
</button>
|
|
811
|
+
<button
|
|
812
|
+
type="button"
|
|
813
|
+
class="mine-sub-tab"
|
|
814
|
+
:class="{ active: activeSourceSubTab === 'uploads' }"
|
|
815
|
+
@click="switchSourceSubTab('uploads')"
|
|
816
|
+
>
|
|
817
|
+
已上传
|
|
818
|
+
</button>
|
|
819
|
+
</div>
|
|
820
|
+
|
|
821
|
+
<!-- 4. 资产瀑布流列表区 -->
|
|
822
|
+
<div v-if="loading && assetList.length === 0" class="mine-loading-box">
|
|
823
|
+
<div class="loading-ring-spinner"></div>
|
|
824
|
+
<span class="loading-tip-text">正在加载我的资产...</span>
|
|
825
|
+
</div>
|
|
826
|
+
|
|
827
|
+
<div v-else class="mine-waterfall-scroll">
|
|
828
|
+
<div v-if="assetList.length > 0" class="mine-masonry-wrapper">
|
|
829
|
+
<div class="mine-masonry-columns">
|
|
830
|
+
<div
|
|
831
|
+
v-for="(colItems, colIdx) in waterfallColumns"
|
|
832
|
+
:key="colIdx"
|
|
833
|
+
class="mine-masonry-col"
|
|
834
|
+
>
|
|
835
|
+
<div
|
|
836
|
+
v-for="item in colItems"
|
|
837
|
+
:key="item.id"
|
|
838
|
+
class="mine-asset-card"
|
|
839
|
+
@click="emit('select', item)"
|
|
840
|
+
>
|
|
841
|
+
<video
|
|
842
|
+
v-if="item.type === 'video'"
|
|
843
|
+
:src="item.url"
|
|
844
|
+
muted
|
|
845
|
+
preload="metadata"
|
|
846
|
+
playsinline
|
|
847
|
+
class="mine-card-media"
|
|
848
|
+
@mouseenter="($event.target as HTMLVideoElement)?.play?.()"
|
|
849
|
+
@mouseleave="($event.target as HTMLVideoElement)?.pause?.()"
|
|
850
|
+
/>
|
|
851
|
+
<img
|
|
852
|
+
v-else
|
|
853
|
+
:src="item.previewUrl || item.url"
|
|
854
|
+
:alt="item.title"
|
|
855
|
+
loading="lazy"
|
|
856
|
+
class="mine-card-media"
|
|
857
|
+
/>
|
|
858
|
+
|
|
859
|
+
<!-- 左上角来源徽标 -->
|
|
860
|
+
<span
|
|
861
|
+
class="mine-card-badge"
|
|
862
|
+
:class="{
|
|
863
|
+
'is-ai': item.badgeLabel === 'AI 生成',
|
|
864
|
+
'is-video': item.type === 'video'
|
|
865
|
+
}"
|
|
866
|
+
>
|
|
867
|
+
{{ item.badgeLabel || '资产' }}
|
|
868
|
+
</span>
|
|
869
|
+
|
|
870
|
+
<!-- 视频播放角标 -->
|
|
871
|
+
<span v-if="item.type === 'video'" class="video-play-badge">
|
|
872
|
+
<el-icon><VideoPlay /></el-icon>
|
|
873
|
+
</span>
|
|
874
|
+
|
|
875
|
+
<!-- 右上角悬浮按钮组:设为参考图 + 大图预览 -->
|
|
876
|
+
<div class="mine-card-actions">
|
|
877
|
+
<button
|
|
878
|
+
v-if="item.type !== 'video'"
|
|
879
|
+
type="button"
|
|
880
|
+
class="card-act-btn ref-btn"
|
|
881
|
+
title="作为 AI 生图参考素材"
|
|
882
|
+
@click.stop="emit('use-as-ref', item)"
|
|
883
|
+
>
|
|
884
|
+
<span>@参考</span>
|
|
885
|
+
</button>
|
|
886
|
+
<button
|
|
887
|
+
type="button"
|
|
888
|
+
class="card-act-btn icon-btn"
|
|
889
|
+
title="大图预览"
|
|
890
|
+
@click.stop="emit('preview', item, assetList, $event)"
|
|
891
|
+
>
|
|
892
|
+
<el-icon><View /></el-icon>
|
|
893
|
+
</button>
|
|
894
|
+
</div>
|
|
895
|
+
|
|
896
|
+
<!-- 底部标题渐隐层 -->
|
|
897
|
+
<div class="mine-card-bottom">
|
|
898
|
+
<span class="mine-card-title" :title="item.title">{{ item.title }}</span>
|
|
899
|
+
</div>
|
|
900
|
+
</div>
|
|
901
|
+
</div>
|
|
902
|
+
</div>
|
|
903
|
+
|
|
904
|
+
<!-- 底部加载更多 -->
|
|
905
|
+
<div class="mine-footer-status">
|
|
906
|
+
<div v-if="loadingMore" class="loading-more-row">
|
|
907
|
+
<span class="mini-spin-ring blue"></span>
|
|
908
|
+
<span>正在加载更多...</span>
|
|
909
|
+
</div>
|
|
910
|
+
<button
|
|
911
|
+
v-else-if="!reachEnd"
|
|
912
|
+
type="button"
|
|
913
|
+
class="load-more-action-btn"
|
|
914
|
+
@click="loadMoreAssets"
|
|
915
|
+
>
|
|
916
|
+
加载更多
|
|
917
|
+
</button>
|
|
918
|
+
<div v-else class="all-loaded-divider">
|
|
919
|
+
<span>— 已展示全部资产 —</span>
|
|
920
|
+
</div>
|
|
921
|
+
</div>
|
|
922
|
+
</div>
|
|
923
|
+
|
|
924
|
+
<!-- 空状态 -->
|
|
925
|
+
<div v-else class="mine-empty-state">
|
|
926
|
+
<svg viewBox="0 0 24 24" width="38" height="38" fill="none" stroke="#cbd5e1" stroke-width="1.3">
|
|
927
|
+
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z" />
|
|
928
|
+
</svg>
|
|
929
|
+
<p class="empty-title">
|
|
930
|
+
{{ searchKeyword ? `未找到与 "${searchKeyword}" 匹配的资产` : '当前目录下暂无资产' }}
|
|
931
|
+
</p>
|
|
932
|
+
<button type="button" class="empty-upload-cta" @click="triggerUploadClick">
|
|
933
|
+
+ 上传本地素材
|
|
934
|
+
</button>
|
|
935
|
+
</div>
|
|
936
|
+
</div>
|
|
937
|
+
</div>
|
|
938
|
+
</template>
|
|
939
|
+
|
|
940
|
+
<style scoped lang="scss">
|
|
941
|
+
.my-assets-panel {
|
|
942
|
+
flex: 1;
|
|
943
|
+
min-height: 0;
|
|
944
|
+
display: flex;
|
|
945
|
+
flex-direction: column;
|
|
946
|
+
overflow: hidden;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
.mine-top-search-row {
|
|
950
|
+
display: flex;
|
|
951
|
+
align-items: center;
|
|
952
|
+
gap: 6px;
|
|
953
|
+
padding: 10px 14px 6px;
|
|
954
|
+
flex-shrink: 0;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.mine-search-box {
|
|
958
|
+
flex: 1;
|
|
959
|
+
min-width: 0;
|
|
960
|
+
display: flex;
|
|
961
|
+
align-items: center;
|
|
962
|
+
height: 34px;
|
|
963
|
+
background: #f5f6f7;
|
|
964
|
+
border: 1px solid #e2e8f0;
|
|
965
|
+
border-radius: 7px;
|
|
966
|
+
padding: 0 9px;
|
|
967
|
+
gap: 6px;
|
|
968
|
+
transition: all 0.2s ease;
|
|
969
|
+
|
|
970
|
+
&:focus-within {
|
|
971
|
+
background: #ffffff;
|
|
972
|
+
border-color: #1e6fff;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
.mine-search-icon {
|
|
977
|
+
font-size: 14px;
|
|
978
|
+
color: #64748b;
|
|
979
|
+
cursor: pointer;
|
|
980
|
+
flex-shrink: 0;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.mine-search-input {
|
|
984
|
+
flex: 1;
|
|
985
|
+
min-width: 0;
|
|
986
|
+
border: none;
|
|
987
|
+
outline: none;
|
|
988
|
+
background: transparent;
|
|
989
|
+
font-size: 12.5px;
|
|
990
|
+
color: #1e293b;
|
|
991
|
+
|
|
992
|
+
&::placeholder {
|
|
993
|
+
color: #94a3b8;
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.mine-search-clear {
|
|
998
|
+
font-size: 13px;
|
|
999
|
+
color: #94a3b8;
|
|
1000
|
+
cursor: pointer;
|
|
1001
|
+
flex-shrink: 0;
|
|
1002
|
+
|
|
1003
|
+
&:hover {
|
|
1004
|
+
color: #475569;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.mine-upload-btn {
|
|
1009
|
+
height: 34px;
|
|
1010
|
+
padding: 0 10px;
|
|
1011
|
+
border-radius: 7px;
|
|
1012
|
+
border: none;
|
|
1013
|
+
background: #0f172a;
|
|
1014
|
+
color: #ffffff;
|
|
1015
|
+
font-size: 12px;
|
|
1016
|
+
font-weight: 500;
|
|
1017
|
+
display: inline-flex;
|
|
1018
|
+
align-items: center;
|
|
1019
|
+
gap: 4px;
|
|
1020
|
+
cursor: pointer;
|
|
1021
|
+
flex-shrink: 0;
|
|
1022
|
+
transition: background 0.15s ease;
|
|
1023
|
+
|
|
1024
|
+
&:hover:not(:disabled) {
|
|
1025
|
+
background: #1e293b;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
&:disabled {
|
|
1029
|
+
opacity: 0.65;
|
|
1030
|
+
cursor: not-allowed;
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.mine-filter-bar {
|
|
1035
|
+
display: flex;
|
|
1036
|
+
align-items: center;
|
|
1037
|
+
justify-content: space-between;
|
|
1038
|
+
gap: 6px;
|
|
1039
|
+
padding: 4px 14px 6px;
|
|
1040
|
+
flex-shrink: 0;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.project-tree-selector-wrap {
|
|
1044
|
+
position: relative;
|
|
1045
|
+
min-width: 0;
|
|
1046
|
+
flex: 1;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.project-tree-trigger {
|
|
1050
|
+
display: inline-flex;
|
|
1051
|
+
align-items: center;
|
|
1052
|
+
gap: 5px;
|
|
1053
|
+
max-width: 100%;
|
|
1054
|
+
height: 26px;
|
|
1055
|
+
padding: 0 8px;
|
|
1056
|
+
border-radius: 6px;
|
|
1057
|
+
border: 1px solid #e2e8f0;
|
|
1058
|
+
background: #f8fafc;
|
|
1059
|
+
color: #334155;
|
|
1060
|
+
font-size: 12px;
|
|
1061
|
+
cursor: pointer;
|
|
1062
|
+
transition: all 0.15s ease;
|
|
1063
|
+
|
|
1064
|
+
&:hover,
|
|
1065
|
+
&.active {
|
|
1066
|
+
border-color: #93c5fd;
|
|
1067
|
+
background: #eff6ff;
|
|
1068
|
+
color: #1d4ed8;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
.proj-dot {
|
|
1072
|
+
width: 7px;
|
|
1073
|
+
height: 7px;
|
|
1074
|
+
border-radius: 2px;
|
|
1075
|
+
background: #3b82f6;
|
|
1076
|
+
flex-shrink: 0;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
.proj-label {
|
|
1080
|
+
overflow: hidden;
|
|
1081
|
+
text-overflow: ellipsis;
|
|
1082
|
+
white-space: nowrap;
|
|
1083
|
+
font-weight: 500;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.chevron-svg {
|
|
1087
|
+
flex-shrink: 0;
|
|
1088
|
+
color: #64748b;
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
.project-tree-popover {
|
|
1093
|
+
position: absolute;
|
|
1094
|
+
top: 30px;
|
|
1095
|
+
left: 0;
|
|
1096
|
+
width: 244px;
|
|
1097
|
+
background: #ffffff;
|
|
1098
|
+
border: 1px solid #e2e8f0;
|
|
1099
|
+
border-radius: 10px;
|
|
1100
|
+
box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
|
|
1101
|
+
padding: 6px;
|
|
1102
|
+
z-index: 40;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
.popover-section-header {
|
|
1106
|
+
font-size: 11px;
|
|
1107
|
+
font-weight: 600;
|
|
1108
|
+
color: #94a3b8;
|
|
1109
|
+
padding: 4px 8px;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
.tree-projects-scroll {
|
|
1113
|
+
max-height: 220px;
|
|
1114
|
+
overflow-y: auto;
|
|
1115
|
+
margin-top: 2px;
|
|
1116
|
+
|
|
1117
|
+
&::-webkit-scrollbar {
|
|
1118
|
+
width: 4px;
|
|
1119
|
+
}
|
|
1120
|
+
&::-webkit-scrollbar-thumb {
|
|
1121
|
+
background: #cbd5e1;
|
|
1122
|
+
border-radius: 2px;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
.tree-project-block {
|
|
1127
|
+
border-top: 1px solid #f1f5f9;
|
|
1128
|
+
padding-top: 3px;
|
|
1129
|
+
margin-top: 3px;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
.tree-node-row {
|
|
1133
|
+
display: flex;
|
|
1134
|
+
align-items: center;
|
|
1135
|
+
gap: 6px;
|
|
1136
|
+
height: 28px;
|
|
1137
|
+
padding: 0 8px;
|
|
1138
|
+
border-radius: 6px;
|
|
1139
|
+
font-size: 12px;
|
|
1140
|
+
color: #334155;
|
|
1141
|
+
cursor: pointer;
|
|
1142
|
+
transition: background 0.12s ease;
|
|
1143
|
+
|
|
1144
|
+
&:hover {
|
|
1145
|
+
background: #f1f5f9;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
&.active {
|
|
1149
|
+
background: #eff6ff;
|
|
1150
|
+
color: #1e6fff;
|
|
1151
|
+
font-weight: 600;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
.node-name {
|
|
1155
|
+
flex: 1;
|
|
1156
|
+
min-width: 0;
|
|
1157
|
+
overflow: hidden;
|
|
1158
|
+
text-overflow: ellipsis;
|
|
1159
|
+
white-space: nowrap;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
.tree-expand-btn {
|
|
1164
|
+
width: 16px;
|
|
1165
|
+
height: 16px;
|
|
1166
|
+
border: none;
|
|
1167
|
+
background: transparent;
|
|
1168
|
+
color: #64748b;
|
|
1169
|
+
display: inline-flex;
|
|
1170
|
+
align-items: center;
|
|
1171
|
+
justify-content: center;
|
|
1172
|
+
padding: 0;
|
|
1173
|
+
cursor: pointer;
|
|
1174
|
+
transition: transform 0.15s ease;
|
|
1175
|
+
|
|
1176
|
+
&.expanded {
|
|
1177
|
+
transform: rotate(90deg);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
.project-color-sq {
|
|
1182
|
+
width: 8px;
|
|
1183
|
+
height: 8px;
|
|
1184
|
+
border-radius: 2px;
|
|
1185
|
+
flex-shrink: 0;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.team-tag {
|
|
1189
|
+
font-size: 10px;
|
|
1190
|
+
padding: 1px 4px;
|
|
1191
|
+
border-radius: 4px;
|
|
1192
|
+
background: #ecfdf5;
|
|
1193
|
+
color: #059669;
|
|
1194
|
+
flex-shrink: 0;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
.tree-folders-children {
|
|
1198
|
+
padding-left: 16px;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.folder-node {
|
|
1202
|
+
height: 26px;
|
|
1203
|
+
font-size: 11.5px;
|
|
1204
|
+
color: #475569;
|
|
1205
|
+
|
|
1206
|
+
&.level-2 {
|
|
1207
|
+
padding-left: 18px;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.tree-empty-folder-tip {
|
|
1212
|
+
font-size: 11px;
|
|
1213
|
+
color: #94a3b8;
|
|
1214
|
+
padding: 3px 8px 4px 20px;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
.media-type-pills {
|
|
1218
|
+
display: flex;
|
|
1219
|
+
align-items: center;
|
|
1220
|
+
gap: 4px;
|
|
1221
|
+
flex-shrink: 0;
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
.media-pill {
|
|
1225
|
+
height: 24px;
|
|
1226
|
+
padding: 0 8px;
|
|
1227
|
+
border-radius: 12px;
|
|
1228
|
+
border: none;
|
|
1229
|
+
background: #f1f5f9;
|
|
1230
|
+
color: #64748b;
|
|
1231
|
+
font-size: 11.5px;
|
|
1232
|
+
cursor: pointer;
|
|
1233
|
+
transition: all 0.15s ease;
|
|
1234
|
+
|
|
1235
|
+
&:hover {
|
|
1236
|
+
color: #1e293b;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
&.active {
|
|
1240
|
+
background: #ebf3ff;
|
|
1241
|
+
color: #1e6fff;
|
|
1242
|
+
font-weight: 600;
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
.mine-sub-tabs {
|
|
1247
|
+
display: flex;
|
|
1248
|
+
align-items: center;
|
|
1249
|
+
gap: 14px;
|
|
1250
|
+
padding: 0 14px;
|
|
1251
|
+
border-bottom: 1px solid #f1f5f9;
|
|
1252
|
+
flex-shrink: 0;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.mine-sub-tab {
|
|
1256
|
+
border: none;
|
|
1257
|
+
background: transparent;
|
|
1258
|
+
padding: 6px 0;
|
|
1259
|
+
font-size: 12px;
|
|
1260
|
+
color: #64748b;
|
|
1261
|
+
cursor: pointer;
|
|
1262
|
+
position: relative;
|
|
1263
|
+
transition: color 0.15s ease;
|
|
1264
|
+
|
|
1265
|
+
&:hover {
|
|
1266
|
+
color: #1e293b;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
&.active {
|
|
1270
|
+
color: #1e6fff;
|
|
1271
|
+
font-weight: 600;
|
|
1272
|
+
|
|
1273
|
+
&::after {
|
|
1274
|
+
content: '';
|
|
1275
|
+
position: absolute;
|
|
1276
|
+
left: 0;
|
|
1277
|
+
right: 0;
|
|
1278
|
+
bottom: -1px;
|
|
1279
|
+
height: 2px;
|
|
1280
|
+
background: #1e6fff;
|
|
1281
|
+
border-radius: 1px;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
.mine-waterfall-scroll {
|
|
1287
|
+
flex: 1;
|
|
1288
|
+
min-height: 0;
|
|
1289
|
+
overflow-y: auto;
|
|
1290
|
+
padding: 10px 14px 16px;
|
|
1291
|
+
|
|
1292
|
+
&::-webkit-scrollbar {
|
|
1293
|
+
width: 4px;
|
|
1294
|
+
}
|
|
1295
|
+
&::-webkit-scrollbar-thumb {
|
|
1296
|
+
background: #cbd5e1;
|
|
1297
|
+
border-radius: 2px;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.mine-masonry-columns {
|
|
1302
|
+
display: flex;
|
|
1303
|
+
align-items: flex-start;
|
|
1304
|
+
gap: 8px;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.mine-masonry-col {
|
|
1308
|
+
flex: 1;
|
|
1309
|
+
min-width: 0;
|
|
1310
|
+
display: flex;
|
|
1311
|
+
flex-direction: column;
|
|
1312
|
+
gap: 8px;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.mine-asset-card {
|
|
1316
|
+
position: relative;
|
|
1317
|
+
width: 100%;
|
|
1318
|
+
border-radius: 8px;
|
|
1319
|
+
overflow: hidden;
|
|
1320
|
+
background: #f1f5f9;
|
|
1321
|
+
border: 1px solid #f1f5f9;
|
|
1322
|
+
cursor: pointer;
|
|
1323
|
+
|
|
1324
|
+
&:hover .mine-card-media {
|
|
1325
|
+
transform: scale(1.03);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
&:hover .mine-card-actions {
|
|
1329
|
+
opacity: 1;
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
.mine-card-media {
|
|
1334
|
+
width: 100%;
|
|
1335
|
+
height: auto;
|
|
1336
|
+
min-height: 64px;
|
|
1337
|
+
max-height: 210px;
|
|
1338
|
+
object-fit: cover;
|
|
1339
|
+
display: block;
|
|
1340
|
+
transition: transform 0.22s ease;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
.mine-card-badge {
|
|
1344
|
+
position: absolute;
|
|
1345
|
+
top: 6px;
|
|
1346
|
+
left: 6px;
|
|
1347
|
+
padding: 1px 6px;
|
|
1348
|
+
border-radius: 4px;
|
|
1349
|
+
background: rgba(15, 23, 42, 0.65);
|
|
1350
|
+
color: #ffffff;
|
|
1351
|
+
font-size: 10.5px;
|
|
1352
|
+
font-weight: 500;
|
|
1353
|
+
pointer-events: none;
|
|
1354
|
+
|
|
1355
|
+
&.is-ai {
|
|
1356
|
+
background: rgba(79, 70, 229, 0.85);
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
&.is-video {
|
|
1360
|
+
background: rgba(5, 150, 105, 0.85);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
.video-play-badge {
|
|
1365
|
+
position: absolute;
|
|
1366
|
+
left: 6px;
|
|
1367
|
+
bottom: 24px;
|
|
1368
|
+
width: 20px;
|
|
1369
|
+
height: 20px;
|
|
1370
|
+
border-radius: 50%;
|
|
1371
|
+
background: rgba(15, 23, 42, 0.6);
|
|
1372
|
+
color: #ffffff;
|
|
1373
|
+
display: flex;
|
|
1374
|
+
align-items: center;
|
|
1375
|
+
justify-content: center;
|
|
1376
|
+
font-size: 12px;
|
|
1377
|
+
pointer-events: none;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
.mine-card-actions {
|
|
1381
|
+
position: absolute;
|
|
1382
|
+
top: 6px;
|
|
1383
|
+
right: 6px;
|
|
1384
|
+
display: flex;
|
|
1385
|
+
align-items: center;
|
|
1386
|
+
gap: 4px;
|
|
1387
|
+
opacity: 0;
|
|
1388
|
+
transition: opacity 0.15s ease;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
.card-act-btn {
|
|
1392
|
+
border: none;
|
|
1393
|
+
background: rgba(15, 23, 42, 0.65);
|
|
1394
|
+
color: #ffffff;
|
|
1395
|
+
height: 22px;
|
|
1396
|
+
border-radius: 11px;
|
|
1397
|
+
display: inline-flex;
|
|
1398
|
+
align-items: center;
|
|
1399
|
+
justify-content: center;
|
|
1400
|
+
font-size: 11px;
|
|
1401
|
+
cursor: pointer;
|
|
1402
|
+
padding: 0 6px;
|
|
1403
|
+
transition: background 0.15s ease;
|
|
1404
|
+
|
|
1405
|
+
&.icon-btn {
|
|
1406
|
+
width: 22px;
|
|
1407
|
+
padding: 0;
|
|
1408
|
+
border-radius: 50%;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
&:hover {
|
|
1412
|
+
background: #1e6fff;
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.mine-card-bottom {
|
|
1417
|
+
position: absolute;
|
|
1418
|
+
left: 0;
|
|
1419
|
+
right: 0;
|
|
1420
|
+
bottom: 0;
|
|
1421
|
+
padding: 12px 6px 4px;
|
|
1422
|
+
background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.72) 100%);
|
|
1423
|
+
pointer-events: none;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
.mine-card-title {
|
|
1427
|
+
display: block;
|
|
1428
|
+
font-size: 11px;
|
|
1429
|
+
color: #ffffff;
|
|
1430
|
+
overflow: hidden;
|
|
1431
|
+
text-overflow: ellipsis;
|
|
1432
|
+
white-space: nowrap;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
.mine-loading-box {
|
|
1436
|
+
display: flex;
|
|
1437
|
+
flex-direction: column;
|
|
1438
|
+
align-items: center;
|
|
1439
|
+
justify-content: center;
|
|
1440
|
+
padding: 56px 0;
|
|
1441
|
+
gap: 10px;
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
.loading-ring-spinner {
|
|
1445
|
+
width: 22px;
|
|
1446
|
+
height: 22px;
|
|
1447
|
+
border: 2.5px solid #e2e8f0;
|
|
1448
|
+
border-top-color: #1e6fff;
|
|
1449
|
+
border-radius: 50%;
|
|
1450
|
+
animation: spin 0.8s linear infinite;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
.mini-spin-ring {
|
|
1454
|
+
width: 12px;
|
|
1455
|
+
height: 12px;
|
|
1456
|
+
border: 2px solid rgba(255, 255, 255, 0.35);
|
|
1457
|
+
border-top-color: #ffffff;
|
|
1458
|
+
border-radius: 50%;
|
|
1459
|
+
animation: spin 0.8s linear infinite;
|
|
1460
|
+
|
|
1461
|
+
&.blue {
|
|
1462
|
+
border-color: rgba(30, 111, 255, 0.25);
|
|
1463
|
+
border-top-color: #1e6fff;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
.loading-tip-text {
|
|
1468
|
+
font-size: 12px;
|
|
1469
|
+
color: #64748b;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
.mine-footer-status {
|
|
1473
|
+
padding: 12px 0 6px;
|
|
1474
|
+
display: flex;
|
|
1475
|
+
align-items: center;
|
|
1476
|
+
justify-content: center;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
.loading-more-row {
|
|
1480
|
+
display: flex;
|
|
1481
|
+
align-items: center;
|
|
1482
|
+
gap: 6px;
|
|
1483
|
+
font-size: 12px;
|
|
1484
|
+
color: #64748b;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
.load-more-action-btn {
|
|
1488
|
+
width: 100%;
|
|
1489
|
+
height: 32px;
|
|
1490
|
+
border-radius: 6px;
|
|
1491
|
+
border: 1px solid #e2e8f0;
|
|
1492
|
+
background: #f8fafc;
|
|
1493
|
+
color: #334155;
|
|
1494
|
+
font-size: 12px;
|
|
1495
|
+
font-weight: 500;
|
|
1496
|
+
cursor: pointer;
|
|
1497
|
+
|
|
1498
|
+
&:hover {
|
|
1499
|
+
background: #eff6ff;
|
|
1500
|
+
border-color: #bfdbfe;
|
|
1501
|
+
color: #1e6fff;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
.all-loaded-divider {
|
|
1506
|
+
font-size: 11px;
|
|
1507
|
+
color: #94a3b8;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
.mine-empty-state {
|
|
1511
|
+
display: flex;
|
|
1512
|
+
flex-direction: column;
|
|
1513
|
+
align-items: center;
|
|
1514
|
+
justify-content: center;
|
|
1515
|
+
padding: 48px 16px;
|
|
1516
|
+
gap: 8px;
|
|
1517
|
+
text-align: center;
|
|
1518
|
+
|
|
1519
|
+
.empty-title {
|
|
1520
|
+
font-size: 12px;
|
|
1521
|
+
color: #64748b;
|
|
1522
|
+
margin: 0;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
.empty-upload-cta {
|
|
1526
|
+
margin-top: 4px;
|
|
1527
|
+
height: 30px;
|
|
1528
|
+
padding: 0 12px;
|
|
1529
|
+
border-radius: 6px;
|
|
1530
|
+
border: 1px solid #cbd5e1;
|
|
1531
|
+
background: #ffffff;
|
|
1532
|
+
color: #1e293b;
|
|
1533
|
+
font-size: 12px;
|
|
1534
|
+
font-weight: 500;
|
|
1535
|
+
cursor: pointer;
|
|
1536
|
+
|
|
1537
|
+
&:hover {
|
|
1538
|
+
border-color: #1e6fff;
|
|
1539
|
+
color: #1e6fff;
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
@keyframes spin {
|
|
1545
|
+
from { transform: rotate(0deg); }
|
|
1546
|
+
to { transform: rotate(360deg); }
|
|
1547
|
+
}
|
|
1548
|
+
</style>
|