jvs-ppt-ui 0.0.24 → 0.0.26
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 +15062 -14398
- package/dist/lib/jvs-ppt-ui.umd.js +29 -29
- package/dist/lib/style.css +1 -1
- package/package.json +2 -2
- package/src/components/TemplateGallery.vue +2040 -391
|
@@ -64,6 +64,9 @@ export type StockSubType =
|
|
|
64
64
|
| 'Photos'
|
|
65
65
|
| 'Illustrations'
|
|
66
66
|
| 'Videos'
|
|
67
|
+
| 'Icons'
|
|
68
|
+
| 'Music'
|
|
69
|
+
| 'Sound_Effects'
|
|
67
70
|
|
|
68
71
|
interface OverviewCategoryConfig {
|
|
69
72
|
key: StockSubType
|
|
@@ -72,7 +75,7 @@ interface OverviewCategoryConfig {
|
|
|
72
75
|
tags: string[]
|
|
73
76
|
}
|
|
74
77
|
|
|
75
|
-
// 图二:固定
|
|
78
|
+
// 图二:固定 7 大核心分类区块配置(矢量图 / 照片 / 插画 / 高清视频 / 图标元素 / 背景音乐 / 音效),每个分类对应后端 subType 参数独立请求一次接口
|
|
76
79
|
const overviewCategories: OverviewCategoryConfig[] = [
|
|
77
80
|
{
|
|
78
81
|
key: 'Vectors',
|
|
@@ -97,6 +100,24 @@ const overviewCategories: OverviewCategoryConfig[] = [
|
|
|
97
100
|
label: '高清视频',
|
|
98
101
|
subType: 'Videos',
|
|
99
102
|
tags: ['风景', '商务', '科技', '自然', '城市', '航拍', '办公']
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
key: 'Icons',
|
|
106
|
+
label: '图标元素',
|
|
107
|
+
subType: 'Icons',
|
|
108
|
+
tags: ['箭头', '商务', '科技', '办公', '社交', '图表', '医疗']
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: 'Music',
|
|
112
|
+
label: '背景音乐',
|
|
113
|
+
subType: 'Music',
|
|
114
|
+
tags: ['轻快', '商务', '舒缓', '科技', '钢琴', '振奋', '环境']
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: 'Sound_Effects',
|
|
118
|
+
label: '音效',
|
|
119
|
+
subType: 'Sound_Effects',
|
|
120
|
+
tags: ['点击', '转场', '提示音', '掌声', '倒计时', '自然', '科技']
|
|
100
121
|
}
|
|
101
122
|
]
|
|
102
123
|
|
|
@@ -104,7 +125,21 @@ const subTypeNameMap: Record<StockSubType, string> = {
|
|
|
104
125
|
Vectors: '矢量图',
|
|
105
126
|
Photos: '照片',
|
|
106
127
|
Illustrations: '插画',
|
|
107
|
-
Videos: '高清视频'
|
|
128
|
+
Videos: '高清视频',
|
|
129
|
+
Icons: '图标元素',
|
|
130
|
+
Music: '背景音乐',
|
|
131
|
+
Sound_Effects: '音效'
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 后端 /jvs-dam/stock/search 在未输入搜索词时的默认分类回退词(对齐 jvs-material-ui)
|
|
135
|
+
const defaultCategoryKeywordMap: Record<StockSubType, string> = {
|
|
136
|
+
Vectors: 'vectors',
|
|
137
|
+
Photos: 'photos',
|
|
138
|
+
Illustrations: 'illustrations',
|
|
139
|
+
Videos: 'videos',
|
|
140
|
+
Icons: 'icons',
|
|
141
|
+
Music: 'music',
|
|
142
|
+
Sound_Effects: 'sound-effects'
|
|
108
143
|
}
|
|
109
144
|
|
|
110
145
|
// 顶层 3-Tab 状态(联网搜索 / AI生成 / 我的空间)与 jvs_session_v3 鉴权
|
|
@@ -157,39 +192,226 @@ watch(isDamLoggedIn, (loggedIn) => {
|
|
|
157
192
|
const viewMode = ref<'overview' | 'detail'>('overview')
|
|
158
193
|
const overviewQuery = ref('')
|
|
159
194
|
const baseDetailTitle = ref('素材库')
|
|
160
|
-
const baseSearchQuery = ref('')
|
|
161
|
-
const activeTag = ref('')
|
|
162
195
|
|
|
163
|
-
//
|
|
196
|
+
// 统一筛选与搜索模型(对齐 jvs-material-ui StockSearchParams 4大筛选维度)
|
|
197
|
+
export type StockColor =
|
|
198
|
+
| 'red'
|
|
199
|
+
| 'orange'
|
|
200
|
+
| 'yellow'
|
|
201
|
+
| 'green'
|
|
202
|
+
| 'turquoise'
|
|
203
|
+
| 'blue'
|
|
204
|
+
| 'lilac'
|
|
205
|
+
| 'pink'
|
|
206
|
+
| 'brown'
|
|
207
|
+
| 'black'
|
|
208
|
+
| 'gray'
|
|
209
|
+
| 'white'
|
|
210
|
+
| 'grayscale'
|
|
211
|
+
|
|
212
|
+
export type StockOrientation = 'horizontal' | 'vertical'
|
|
213
|
+
|
|
214
|
+
export type StockTopicCategory =
|
|
215
|
+
| 'backgrounds'
|
|
216
|
+
| 'fashion'
|
|
217
|
+
| 'nature'
|
|
218
|
+
| 'science'
|
|
219
|
+
| 'education'
|
|
220
|
+
| 'feelings'
|
|
221
|
+
| 'health'
|
|
222
|
+
| 'people'
|
|
223
|
+
| 'religion'
|
|
224
|
+
| 'places'
|
|
225
|
+
| 'animals'
|
|
226
|
+
| 'industry'
|
|
227
|
+
| 'computer'
|
|
228
|
+
| 'food'
|
|
229
|
+
| 'sports'
|
|
230
|
+
| 'transportation'
|
|
231
|
+
| 'travel'
|
|
232
|
+
| 'buildings'
|
|
233
|
+
| 'business'
|
|
234
|
+
| 'music'
|
|
235
|
+
|
|
236
|
+
const COLOR_OPTIONS: { value: StockColor | ''; label: string; hex: string }[] = [
|
|
237
|
+
{ value: '', label: '全部颜色', hex: 'none' },
|
|
238
|
+
{ value: 'red', label: '红色', hex: '#ef4444' },
|
|
239
|
+
{ value: 'orange', label: '橙色', hex: '#f97316' },
|
|
240
|
+
{ value: 'yellow', label: '黄色', hex: '#eab308' },
|
|
241
|
+
{ value: 'green', label: '绿色', hex: '#22c55e' },
|
|
242
|
+
{ value: 'turquoise', label: '青绿', hex: '#14b8a6' },
|
|
243
|
+
{ value: 'blue', label: '蓝色', hex: '#3b82f6' },
|
|
244
|
+
{ value: 'lilac', label: '紫丁香', hex: '#a855f7' },
|
|
245
|
+
{ value: 'pink', label: '粉色', hex: '#ec4899' },
|
|
246
|
+
{ value: 'brown', label: '棕色', hex: '#92400e' },
|
|
247
|
+
{ value: 'black', label: '黑色', hex: '#000000' },
|
|
248
|
+
{ value: 'gray', label: '灰色', hex: '#6b7280' },
|
|
249
|
+
{ value: 'white', label: '白色', hex: '#ffffff' },
|
|
250
|
+
{ value: 'grayscale', label: '黑白灰', hex: 'linear-gradient(135deg, #1e293b 0%, #64748b 50%, #f8fafc 100%)' }
|
|
251
|
+
]
|
|
252
|
+
|
|
253
|
+
const ORIENTATION_OPTIONS: { value: StockOrientation | '' | 'square'; label: string; disabled: boolean }[] = [
|
|
254
|
+
{ value: '', label: '全部画幅', disabled: false },
|
|
255
|
+
{ value: 'horizontal', label: '横版画幅', disabled: false },
|
|
256
|
+
{ value: 'vertical', label: '竖版画幅', disabled: false },
|
|
257
|
+
{ value: 'square', label: '正方形', disabled: true }
|
|
258
|
+
]
|
|
259
|
+
|
|
260
|
+
const TOPIC_OPTIONS: { value: StockTopicCategory | ''; label: string }[] = [
|
|
261
|
+
{ value: '', label: '全部题材' },
|
|
262
|
+
{ value: 'backgrounds', label: '背景底纹' },
|
|
263
|
+
{ value: 'business', label: '商务办公' },
|
|
264
|
+
{ value: 'science', label: '科学科技' },
|
|
265
|
+
{ value: 'nature', label: '自然风光' },
|
|
266
|
+
{ value: 'education', label: '教育学习' },
|
|
267
|
+
{ value: 'computer', label: '电脑数码' },
|
|
268
|
+
{ value: 'buildings', label: '建筑空间' },
|
|
269
|
+
{ value: 'people', label: '人物肖像' },
|
|
270
|
+
{ value: 'fashion', label: '时尚潮流' },
|
|
271
|
+
{ value: 'health', label: '医疗健康' },
|
|
272
|
+
{ value: 'industry', label: '工业制造' },
|
|
273
|
+
{ value: 'food', label: '餐饮美食' },
|
|
274
|
+
{ value: 'travel', label: '旅行度假' },
|
|
275
|
+
{ value: 'transportation', label: '交通工具' },
|
|
276
|
+
{ value: 'sports', label: '体育运动' },
|
|
277
|
+
{ value: 'music', label: '音乐艺术' },
|
|
278
|
+
{ value: 'animals', label: '动物生灵' },
|
|
279
|
+
{ value: 'feelings', label: '情感表达' },
|
|
280
|
+
{ value: 'places', label: '地标名胜' },
|
|
281
|
+
{ value: 'religion', label: '宗教文化' }
|
|
282
|
+
]
|
|
283
|
+
|
|
284
|
+
interface SizePresetItem {
|
|
285
|
+
id: '' | 'hd' | 'fhd' | 'qhd' | 'uhd'
|
|
286
|
+
label: string
|
|
287
|
+
sub: string
|
|
288
|
+
minWidth?: number
|
|
289
|
+
minHeight?: number
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const SIZE_PRESETS: SizePresetItem[] = [
|
|
293
|
+
{ id: '', label: '全部尺寸', sub: '不限', minWidth: undefined, minHeight: undefined },
|
|
294
|
+
{ id: 'hd', label: '高清 HD', sub: '≥1280×720', minWidth: 1280, minHeight: 720 },
|
|
295
|
+
{ id: 'fhd', label: '全高清 FHD', sub: '≥1920×1080', minWidth: 1920, minHeight: 1080 },
|
|
296
|
+
{ id: 'qhd', label: '2K 超清', sub: '≥2560×1440', minWidth: 2560, minHeight: 1440 },
|
|
297
|
+
{ id: 'uhd', label: '4K 原画', sub: '≥3840×2160', minWidth: 3840, minHeight: 2160 }
|
|
298
|
+
]
|
|
299
|
+
|
|
300
|
+
const filterPopoverOpen = ref(false)
|
|
301
|
+
const showAllTopics = ref(false)
|
|
302
|
+
const customMinWidthInput = ref('')
|
|
303
|
+
const customMinHeightInput = ref('')
|
|
304
|
+
let customSizeDebounceTimer: ReturnType<typeof setTimeout> | null = null
|
|
305
|
+
|
|
164
306
|
const filterParams = reactive<{
|
|
165
307
|
query: string
|
|
166
308
|
activeSubType: StockSubType
|
|
309
|
+
color: StockColor | ''
|
|
310
|
+
orientation: StockOrientation | ''
|
|
311
|
+
category: StockTopicCategory | ''
|
|
312
|
+
sizePresetId: '' | 'hd' | 'fhd' | 'qhd' | 'uhd' | 'custom'
|
|
313
|
+
minWidth?: number
|
|
314
|
+
minHeight?: number
|
|
167
315
|
}>({
|
|
168
316
|
query: '',
|
|
169
|
-
activeSubType: 'Vectors'
|
|
317
|
+
activeSubType: 'Vectors',
|
|
318
|
+
color: '',
|
|
319
|
+
orientation: '',
|
|
320
|
+
category: '',
|
|
321
|
+
sizePresetId: '',
|
|
322
|
+
minWidth: undefined,
|
|
323
|
+
minHeight: undefined
|
|
324
|
+
})
|
|
325
|
+
|
|
326
|
+
const currentColorOption = computed(() => {
|
|
327
|
+
return COLOR_OPTIONS.find(c => c.value === filterParams.color) || COLOR_OPTIONS[0]
|
|
328
|
+
})
|
|
329
|
+
|
|
330
|
+
const currentOrientationOption = computed(() => {
|
|
331
|
+
return ORIENTATION_OPTIONS.find(o => o.value === filterParams.orientation) || ORIENTATION_OPTIONS[0]
|
|
332
|
+
})
|
|
333
|
+
|
|
334
|
+
const currentTopicOption = computed(() => {
|
|
335
|
+
return TOPIC_OPTIONS.find(t => t.value === filterParams.category) || TOPIC_OPTIONS[0]
|
|
336
|
+
})
|
|
337
|
+
|
|
338
|
+
const visibleTopicOptions = computed(() => {
|
|
339
|
+
return showAllTopics.value ? TOPIC_OPTIONS : TOPIC_OPTIONS.slice(0, 9)
|
|
340
|
+
})
|
|
341
|
+
|
|
342
|
+
const currentSizeLabelHint = computed(() => {
|
|
343
|
+
if (filterParams.minWidth || filterParams.minHeight) {
|
|
344
|
+
return `≥ ${filterParams.minWidth || 0}×${filterParams.minHeight || 0}`
|
|
345
|
+
}
|
|
346
|
+
return '全部尺寸'
|
|
347
|
+
})
|
|
348
|
+
|
|
349
|
+
const activeFilterCount = computed(() => {
|
|
350
|
+
let count = 0
|
|
351
|
+
if (filterParams.color) count++
|
|
352
|
+
if (filterParams.orientation) count++
|
|
353
|
+
if (filterParams.category) count++
|
|
354
|
+
if (filterParams.minWidth || filterParams.minHeight) count++
|
|
355
|
+
return count
|
|
170
356
|
})
|
|
171
357
|
|
|
172
358
|
// 图三顶部返回栏显示的标题
|
|
173
359
|
const detailHeaderTitle = computed(() => {
|
|
174
|
-
if (activeTag.value) return activeTag.value
|
|
175
|
-
if (baseSearchQuery.value) return baseSearchQuery.value
|
|
176
360
|
return baseDetailTitle.value || subTypeNameMap[filterParams.activeSubType] || '素材库'
|
|
177
361
|
})
|
|
178
362
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
363
|
+
function normalizeIconifyUrl(rawUrl?: string): string {
|
|
364
|
+
if (!rawUrl) return ''
|
|
365
|
+
if (rawUrl.includes('api.iconify.design') && rawUrl.includes('.svg')) {
|
|
366
|
+
if (!rawUrl.includes('width=') && !rawUrl.includes('height=')) {
|
|
367
|
+
const sep = rawUrl.includes('?') ? '&' : '?'
|
|
368
|
+
return `${rawUrl}${sep}width=256&height=256`
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return rawUrl
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
function isAudioUrl(url?: string): boolean {
|
|
375
|
+
if (!url) return false
|
|
376
|
+
const clean = url.split('?')[0].split('#')[0].toLowerCase()
|
|
377
|
+
return (
|
|
378
|
+
clean.endsWith('.mp3') ||
|
|
379
|
+
clean.endsWith('.wav') ||
|
|
380
|
+
clean.endsWith('.flac') ||
|
|
381
|
+
clean.endsWith('.aac') ||
|
|
382
|
+
clean.endsWith('.m4a')
|
|
383
|
+
)
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
function isAudioMaterial(item: MaterialItem): boolean {
|
|
387
|
+
return (
|
|
388
|
+
item.type === 'audio' ||
|
|
389
|
+
String(item.assetType || '').toUpperCase() === 'AUDIO' ||
|
|
390
|
+
item.assetSubType === 'Music' ||
|
|
391
|
+
item.assetSubType === 'Sound_Effects' ||
|
|
392
|
+
item.subType === 'Music' ||
|
|
393
|
+
item.subType === 'Sound_Effects' ||
|
|
394
|
+
isAudioUrl(item.sourceUrl || item.url || item.downloadUrl)
|
|
395
|
+
)
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function isIconMaterial(item: MaterialItem): boolean {
|
|
399
|
+
return (
|
|
400
|
+
item.assetSubType === 'Icons' ||
|
|
401
|
+
item.subType === 'Icons' ||
|
|
402
|
+
String(item.sourcePlatform || '').toUpperCase() === 'ICONIFY' ||
|
|
403
|
+
String(item.previewUrl || item.url || '').includes('api.iconify.design')
|
|
404
|
+
)
|
|
405
|
+
}
|
|
185
406
|
|
|
186
407
|
function isVideoUrl(url?: string): boolean {
|
|
187
408
|
if (!url) return false
|
|
188
409
|
const clean = url.split('?')[0].toLowerCase()
|
|
189
|
-
return clean.endsWith('.mp4') || clean.endsWith('.webm') || clean.endsWith('.mov') || clean.endsWith('.m4v')
|
|
410
|
+
return clean.endsWith('.mp4') || clean.endsWith('.webm') || clean.endsWith('.mov') || clean.endsWith('.m4v')
|
|
190
411
|
}
|
|
191
412
|
|
|
192
413
|
function isVideoMaterial(item: MaterialItem): boolean {
|
|
414
|
+
if (isAudioMaterial(item)) return false
|
|
193
415
|
return (
|
|
194
416
|
item.type === 'video' ||
|
|
195
417
|
item.assetType === 'VIDEO' ||
|
|
@@ -199,16 +421,44 @@ function isVideoMaterial(item: MaterialItem): boolean {
|
|
|
199
421
|
)
|
|
200
422
|
}
|
|
201
423
|
|
|
424
|
+
function getAudioCoverImg(item: MaterialItem): string {
|
|
425
|
+
const candidates = [item.coverUrl, item.image, item.thumbnail, item.previewUrl]
|
|
426
|
+
for (const c of candidates) {
|
|
427
|
+
if (c && typeof c === 'string' && !isAudioUrl(c) && !isVideoUrl(c) && !c.split('?')[0].toLowerCase().endsWith('.ogg')) {
|
|
428
|
+
return c
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return ''
|
|
432
|
+
}
|
|
433
|
+
|
|
202
434
|
function getMaterialThumb(item: MaterialItem): string {
|
|
203
|
-
|
|
435
|
+
if (isAudioMaterial(item)) {
|
|
436
|
+
return getAudioCoverImg(item)
|
|
437
|
+
}
|
|
438
|
+
const raw = item.previewUrl || item.image || item.coverUrl || item.thumbnail || item.url || item.sourceUrl || item.downloadUrl || ''
|
|
439
|
+
return normalizeIconifyUrl(raw)
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function formatAudioDuration(seconds?: number | string): string {
|
|
443
|
+
const num = Number(seconds)
|
|
444
|
+
if (!Number.isFinite(num) || num <= 0) return ''
|
|
445
|
+
const totalSec = Math.max(1, Math.round(num))
|
|
446
|
+
const mins = Math.floor(totalSec / 60)
|
|
447
|
+
const secs = totalSec % 60
|
|
448
|
+
return `${mins}:${secs < 10 ? '0' : ''}${secs}`
|
|
204
449
|
}
|
|
205
450
|
|
|
206
451
|
function getItemFormat(item: MaterialItem): string {
|
|
207
452
|
if (item.format) return item.format.toUpperCase()
|
|
208
453
|
const u = (item.sourceUrl || item.url || item.previewUrl || item.fileName || '').toLowerCase()
|
|
454
|
+
if (u.includes('.mp3')) return 'MP3'
|
|
455
|
+
if (u.includes('.wav')) return 'WAV'
|
|
456
|
+
if (u.includes('.flac')) return 'FLAC'
|
|
457
|
+
if (u.includes('.m4a') || u.includes('.aac')) return 'AAC'
|
|
458
|
+
if (isAudioMaterial(item)) return 'MP3'
|
|
209
459
|
if (u.includes('.mp4')) return 'MP4'
|
|
210
460
|
if (u.includes('.mov') || u.includes('.webm')) return 'VIDEO'
|
|
211
|
-
if (u.includes('.svg')) return 'SVG'
|
|
461
|
+
if (u.includes('.svg') || isIconMaterial(item)) return 'SVG'
|
|
212
462
|
if (u.includes('.png')) return 'PNG'
|
|
213
463
|
if (u.includes('.gif')) return 'GIF'
|
|
214
464
|
if (item.assetSubType === 'Videos' || item.type === 'video') return 'MP4'
|
|
@@ -216,10 +466,55 @@ function getItemFormat(item: MaterialItem): string {
|
|
|
216
466
|
return 'JPG'
|
|
217
467
|
}
|
|
218
468
|
|
|
219
|
-
//
|
|
469
|
+
// 抽屉内联音频试听控制(背景音乐 / 音效卡片直接点击播放按钮即可试听)
|
|
470
|
+
const playingAudioId = ref<string | number | null>(null)
|
|
471
|
+
let inlineAudioPlayer: HTMLAudioElement | null = null
|
|
472
|
+
|
|
473
|
+
function stopInlineAudio() {
|
|
474
|
+
if (inlineAudioPlayer) {
|
|
475
|
+
inlineAudioPlayer.pause()
|
|
476
|
+
inlineAudioPlayer.currentTime = 0
|
|
477
|
+
}
|
|
478
|
+
playingAudioId.value = null
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
function toggleInlineAudioPlay(item: MaterialItem, e?: Event) {
|
|
482
|
+
if (e) {
|
|
483
|
+
e.stopPropagation()
|
|
484
|
+
e.preventDefault()
|
|
485
|
+
}
|
|
486
|
+
const audioSrc = item.sourceUrl || item.url || item.downloadUrl || item.previewUrl || ''
|
|
487
|
+
if (!audioSrc) {
|
|
488
|
+
notify('该音频暂无可用试听地址')
|
|
489
|
+
return
|
|
490
|
+
}
|
|
491
|
+
if (playingAudioId.value === item.id && inlineAudioPlayer && !inlineAudioPlayer.paused) {
|
|
492
|
+
stopInlineAudio()
|
|
493
|
+
return
|
|
494
|
+
}
|
|
495
|
+
if (!inlineAudioPlayer) {
|
|
496
|
+
inlineAudioPlayer = new Audio()
|
|
497
|
+
inlineAudioPlayer.addEventListener('ended', () => {
|
|
498
|
+
playingAudioId.value = null
|
|
499
|
+
})
|
|
500
|
+
inlineAudioPlayer.addEventListener('error', () => {
|
|
501
|
+
playingAudioId.value = null
|
|
502
|
+
})
|
|
503
|
+
}
|
|
504
|
+
inlineAudioPlayer.pause()
|
|
505
|
+
inlineAudioPlayer.src = audioSrc
|
|
506
|
+
playingAudioId.value = item.id
|
|
507
|
+
inlineAudioPlayer.play().catch(() => {
|
|
508
|
+
playingAudioId.value = null
|
|
509
|
+
notify('音频加载失败或暂不支持在线试听')
|
|
510
|
+
})
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// 全屏大图/视频/音频预览状态
|
|
220
514
|
interface PreviewItem {
|
|
221
515
|
url: string
|
|
222
516
|
isVideo: boolean
|
|
517
|
+
isAudio: boolean
|
|
223
518
|
title: string
|
|
224
519
|
format: string
|
|
225
520
|
meta: MaterialItem
|
|
@@ -240,9 +535,12 @@ function openPreview(item: MaterialItem, e?: Event) {
|
|
|
240
535
|
e.stopPropagation()
|
|
241
536
|
e.preventDefault()
|
|
242
537
|
}
|
|
538
|
+
stopInlineAudio()
|
|
243
539
|
|
|
244
|
-
const
|
|
245
|
-
|
|
540
|
+
const isAud = isAudioMaterial(item)
|
|
541
|
+
const isVid = !isAud && isVideoMaterial(item)
|
|
542
|
+
const currentUrl = (isAud || isVid)
|
|
543
|
+
? (item.sourceUrl || item.url || item.downloadUrl || item.previewUrl || getMaterialThumb(item))
|
|
246
544
|
: getMaterialThumb(item)
|
|
247
545
|
|
|
248
546
|
if (!currentUrl) {
|
|
@@ -257,14 +555,16 @@ function openPreview(item: MaterialItem, e?: Event) {
|
|
|
257
555
|
|
|
258
556
|
const validItems: PreviewItem[] = []
|
|
259
557
|
sourceList.forEach(m => {
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
|
|
558
|
+
const mAud = isAudioMaterial(m)
|
|
559
|
+
const mVid = !mAud && isVideoMaterial(m)
|
|
560
|
+
const u = (mAud || mVid)
|
|
561
|
+
? (m.sourceUrl || m.url || m.downloadUrl || m.previewUrl || getMaterialThumb(m))
|
|
263
562
|
: getMaterialThumb(m)
|
|
264
563
|
if (u) {
|
|
265
564
|
validItems.push({
|
|
266
565
|
url: u,
|
|
267
|
-
isVideo:
|
|
566
|
+
isVideo: mVid && isVideoUrl(u),
|
|
567
|
+
isAudio: mAud,
|
|
268
568
|
title: m.title || '素材预览',
|
|
269
569
|
format: getItemFormat(m),
|
|
270
570
|
meta: m
|
|
@@ -278,7 +578,8 @@ function openPreview(item: MaterialItem, e?: Event) {
|
|
|
278
578
|
} else {
|
|
279
579
|
validItems.unshift({
|
|
280
580
|
url: currentUrl,
|
|
281
|
-
isVideo:
|
|
581
|
+
isVideo: isVid && isVideoUrl(currentUrl),
|
|
582
|
+
isAudio: isAud,
|
|
282
583
|
title: item.title || '素材预览',
|
|
283
584
|
format: getItemFormat(item),
|
|
284
585
|
meta: item
|
|
@@ -298,15 +599,18 @@ function openPreview(item: MaterialItem, e?: Event) {
|
|
|
298
599
|
previewVisible.value = true
|
|
299
600
|
}
|
|
300
601
|
|
|
301
|
-
//
|
|
602
|
+
// 供「我的素材」与「创建素材」子面板复用的全屏大图/视频/音频预览
|
|
302
603
|
function openCustomListPreview(item: MaterialItem, list: MaterialItem[], e?: Event) {
|
|
303
604
|
if (e) {
|
|
304
605
|
e.stopPropagation()
|
|
305
606
|
e.preventDefault()
|
|
306
607
|
}
|
|
608
|
+
stopInlineAudio()
|
|
307
609
|
|
|
308
|
-
const
|
|
309
|
-
|
|
610
|
+
const isAud = isAudioMaterial(item)
|
|
611
|
+
const isVid = !isAud && isVideoMaterial(item)
|
|
612
|
+
const currentUrl = (isAud || isVid)
|
|
613
|
+
? (item.sourceUrl || item.url || item.downloadUrl || item.previewUrl || getMaterialThumb(item))
|
|
310
614
|
: getMaterialThumb(item)
|
|
311
615
|
|
|
312
616
|
if (!currentUrl) {
|
|
@@ -318,14 +622,16 @@ function openCustomListPreview(item: MaterialItem, list: MaterialItem[], e?: Eve
|
|
|
318
622
|
const validItems: PreviewItem[] = []
|
|
319
623
|
|
|
320
624
|
sourceList.forEach(m => {
|
|
321
|
-
const
|
|
322
|
-
const
|
|
323
|
-
|
|
625
|
+
const mAud = isAudioMaterial(m)
|
|
626
|
+
const mVid = !mAud && isVideoMaterial(m)
|
|
627
|
+
const u = (mAud || mVid)
|
|
628
|
+
? (m.sourceUrl || m.url || m.downloadUrl || m.previewUrl || getMaterialThumb(m))
|
|
324
629
|
: getMaterialThumb(m)
|
|
325
630
|
if (u) {
|
|
326
631
|
validItems.push({
|
|
327
632
|
url: u,
|
|
328
|
-
isVideo:
|
|
633
|
+
isVideo: mVid && isVideoUrl(u),
|
|
634
|
+
isAudio: mAud,
|
|
329
635
|
title: m.title || '素材预览',
|
|
330
636
|
format: getItemFormat(m),
|
|
331
637
|
meta: m
|
|
@@ -339,7 +645,8 @@ function openCustomListPreview(item: MaterialItem, list: MaterialItem[], e?: Eve
|
|
|
339
645
|
} else {
|
|
340
646
|
validItems.unshift({
|
|
341
647
|
url: currentUrl,
|
|
342
|
-
isVideo:
|
|
648
|
+
isVideo: isVid && isVideoUrl(currentUrl),
|
|
649
|
+
isAudio: isAud,
|
|
343
650
|
title: item.title || '素材预览',
|
|
344
651
|
format: getItemFormat(item),
|
|
345
652
|
meta: item
|
|
@@ -464,13 +771,21 @@ function normalizeMaterialItem(item: any, defaultSubType: StockSubType = 'Photos
|
|
|
464
771
|
const subType = (item.assetSubType || item.subType || defaultSubType) as StockSubType
|
|
465
772
|
let type = item.type || ''
|
|
466
773
|
if (!type) {
|
|
467
|
-
if (subType === '
|
|
468
|
-
|
|
469
|
-
else
|
|
774
|
+
if (subType === 'Music' || subType === 'Sound_Effects' || String(item.assetType || '').toUpperCase() === 'AUDIO') {
|
|
775
|
+
type = 'audio'
|
|
776
|
+
} else if (subType === 'Videos' || item.assetType === 'VIDEO') {
|
|
777
|
+
type = 'video'
|
|
778
|
+
} else if (subType === 'Vectors' || subType === 'Icons') {
|
|
779
|
+
type = 'svg'
|
|
780
|
+
} else {
|
|
781
|
+
type = 'image'
|
|
782
|
+
}
|
|
470
783
|
}
|
|
471
784
|
|
|
472
|
-
const
|
|
473
|
-
const
|
|
785
|
+
const rawPreviewUrl = item.previewUrl || item.image || item.coverUrl || item.thumbnail || item.url || item.downloadUrl || item.sourceUrl || ''
|
|
786
|
+
const rawSourceUrl = item.sourceUrl || item.downloadUrl || item.url || rawPreviewUrl
|
|
787
|
+
const previewUrl = normalizeIconifyUrl(rawPreviewUrl)
|
|
788
|
+
const sourceUrl = normalizeIconifyUrl(rawSourceUrl)
|
|
474
789
|
const url = sourceUrl || previewUrl
|
|
475
790
|
|
|
476
791
|
const platform = item.sourcePlatform || (item.id && typeof item.id === 'string' && item.id.includes('_') ? item.id.split('_')[0].toUpperCase() : '')
|
|
@@ -480,6 +795,9 @@ function normalizeMaterialItem(item: any, defaultSubType: StockSubType = 'Photos
|
|
|
480
795
|
if (!ratio && item.width && item.height) {
|
|
481
796
|
ratio = `${item.width} / ${item.height}`
|
|
482
797
|
}
|
|
798
|
+
if (subType === 'Icons') {
|
|
799
|
+
ratio = '1 / 1'
|
|
800
|
+
}
|
|
483
801
|
|
|
484
802
|
return {
|
|
485
803
|
...item,
|
|
@@ -497,8 +815,8 @@ function normalizeMaterialItem(item: any, defaultSubType: StockSubType = 'Photos
|
|
|
497
815
|
color: item.color || item.primaryColor || '',
|
|
498
816
|
primaryColor: item.primaryColor || item.color || '',
|
|
499
817
|
aspectRatio: ratio || '4 / 3',
|
|
500
|
-
originalWidth: item.width || item.originalWidth,
|
|
501
|
-
originalHeight: item.height || item.originalHeight,
|
|
818
|
+
originalWidth: item.width || item.originalWidth || (subType === 'Icons' ? 256 : undefined),
|
|
819
|
+
originalHeight: item.height || item.originalHeight || (subType === 'Icons' ? 256 : undefined),
|
|
502
820
|
tags: Array.isArray(item.tags) ? item.tags : []
|
|
503
821
|
}
|
|
504
822
|
}
|
|
@@ -523,32 +841,63 @@ function parseMaterialList(data: any, defaultSubType: StockSubType = 'Photos'):
|
|
|
523
841
|
}
|
|
524
842
|
|
|
525
843
|
// ============================================================================
|
|
526
|
-
// 图二:概览页
|
|
844
|
+
// 图二:概览页 7 大固定类型(Vectors / Photos / Illustrations / Videos / Icons / Music / Sound_Effects),每个类型独立请求一次接口
|
|
527
845
|
// ============================================================================
|
|
528
846
|
const overviewItemsMap = reactive<Record<StockSubType, MaterialItem[]>>({
|
|
529
847
|
Vectors: [],
|
|
530
848
|
Photos: [],
|
|
531
849
|
Illustrations: [],
|
|
532
|
-
Videos: []
|
|
850
|
+
Videos: [],
|
|
851
|
+
Icons: [],
|
|
852
|
+
Music: [],
|
|
853
|
+
Sound_Effects: []
|
|
533
854
|
})
|
|
534
855
|
|
|
535
856
|
const overviewLoadingMap = reactive<Record<StockSubType, boolean>>({
|
|
536
857
|
Vectors: false,
|
|
537
858
|
Photos: false,
|
|
538
859
|
Illustrations: false,
|
|
539
|
-
Videos: false
|
|
860
|
+
Videos: false,
|
|
861
|
+
Icons: false,
|
|
862
|
+
Music: false,
|
|
863
|
+
Sound_Effects: false
|
|
540
864
|
})
|
|
541
865
|
|
|
542
|
-
const rowRefs
|
|
866
|
+
const rowRefs: Record<string, HTMLElement | null> = {}
|
|
543
867
|
const rowScrollState = reactive<Record<StockSubType, { canLeft: boolean; canRight: boolean }>>({
|
|
544
868
|
Vectors: { canLeft: false, canRight: false },
|
|
545
869
|
Photos: { canLeft: false, canRight: false },
|
|
546
870
|
Illustrations: { canLeft: false, canRight: false },
|
|
547
|
-
Videos: { canLeft: false, canRight: false }
|
|
871
|
+
Videos: { canLeft: false, canRight: false },
|
|
872
|
+
Icons: { canLeft: false, canRight: false },
|
|
873
|
+
Music: { canLeft: false, canRight: false },
|
|
874
|
+
Sound_Effects: { canLeft: false, canRight: false }
|
|
548
875
|
})
|
|
549
876
|
|
|
877
|
+
let trackResizeObserver: ResizeObserver | null = null
|
|
878
|
+
|
|
879
|
+
function ensureTrackObservers() {
|
|
880
|
+
if (typeof window === 'undefined') return
|
|
881
|
+
if (!trackResizeObserver && typeof ResizeObserver !== 'undefined') {
|
|
882
|
+
trackResizeObserver = new ResizeObserver(() => {
|
|
883
|
+
updateAllRowScrollStates()
|
|
884
|
+
})
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
550
888
|
function setRowRef(key: StockSubType, el: any) {
|
|
551
|
-
rowRefs[key]
|
|
889
|
+
const prevEl = rowRefs[key] || null
|
|
890
|
+
const nextEl = (el as HTMLElement | null) || null
|
|
891
|
+
if (prevEl === nextEl) return
|
|
892
|
+
if (prevEl && trackResizeObserver) {
|
|
893
|
+
trackResizeObserver.unobserve(prevEl)
|
|
894
|
+
}
|
|
895
|
+
rowRefs[key] = nextEl
|
|
896
|
+
if (nextEl) {
|
|
897
|
+
ensureTrackObservers()
|
|
898
|
+
trackResizeObserver?.observe(nextEl)
|
|
899
|
+
requestAnimationFrame(() => updateRowScrollState(key))
|
|
900
|
+
}
|
|
552
901
|
}
|
|
553
902
|
|
|
554
903
|
function updateRowScrollState(key: StockSubType) {
|
|
@@ -556,7 +905,17 @@ function updateRowScrollState(key: StockSubType) {
|
|
|
556
905
|
if (!el) return
|
|
557
906
|
const canLeft = el.scrollLeft > 4
|
|
558
907
|
const canRight = el.scrollWidth - el.clientWidth - el.scrollLeft > 4
|
|
559
|
-
rowScrollState[key]
|
|
908
|
+
const state = rowScrollState[key]
|
|
909
|
+
if (state) {
|
|
910
|
+
if (state.canLeft !== canLeft) state.canLeft = canLeft
|
|
911
|
+
if (state.canRight !== canRight) state.canRight = canRight
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
function updateAllRowScrollStates() {
|
|
916
|
+
overviewCategories.forEach(cat => {
|
|
917
|
+
updateRowScrollState(cat.key)
|
|
918
|
+
})
|
|
560
919
|
}
|
|
561
920
|
|
|
562
921
|
function scrollCategoryRow(key: StockSubType, dir: 'left' | 'right') {
|
|
@@ -567,6 +926,50 @@ function scrollCategoryRow(key: StockSubType, dir: 'left' | 'right') {
|
|
|
567
926
|
setTimeout(() => updateRowScrollState(key), 260)
|
|
568
927
|
}
|
|
569
928
|
|
|
929
|
+
// 高清视频、背景音乐、音效不支持颜色/画幅/题材/尺寸筛选条件
|
|
930
|
+
function isNonImageFilterSubType(subType: StockSubType): boolean {
|
|
931
|
+
return (
|
|
932
|
+
subType === 'Videos' ||
|
|
933
|
+
subType === 'Music' ||
|
|
934
|
+
subType === 'Sound_Effects'
|
|
935
|
+
)
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
const isCurrentDetailFilterDisabled = computed(() => {
|
|
939
|
+
return viewMode.value === 'detail' && isNonImageFilterSubType(filterParams.activeSubType)
|
|
940
|
+
})
|
|
941
|
+
|
|
942
|
+
function resolveEffectiveKeyword(rawKeyword: string, subType: StockSubType): string {
|
|
943
|
+
const trimmed = (rawKeyword || '').trim()
|
|
944
|
+
if (trimmed) return trimmed
|
|
945
|
+
if (!isNonImageFilterSubType(subType) && filterParams.category) {
|
|
946
|
+
return filterParams.category
|
|
947
|
+
}
|
|
948
|
+
return defaultCategoryKeywordMap[subType] || 'wallpaper'
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// 统一追加筛选条件到 URLSearchParams(与 jvs-material-ui StockSearchParams 1:1 对齐,非图片类型不传图片专属过滤项)
|
|
952
|
+
function appendStockFilterParams(params: URLSearchParams, subType: StockSubType) {
|
|
953
|
+
if (isNonImageFilterSubType(subType)) {
|
|
954
|
+
return
|
|
955
|
+
}
|
|
956
|
+
if (filterParams.color) {
|
|
957
|
+
params.append('color', filterParams.color)
|
|
958
|
+
}
|
|
959
|
+
if (filterParams.orientation) {
|
|
960
|
+
params.append('orientation', filterParams.orientation)
|
|
961
|
+
}
|
|
962
|
+
if (filterParams.category) {
|
|
963
|
+
params.append('category', filterParams.category)
|
|
964
|
+
}
|
|
965
|
+
if (filterParams.minWidth && filterParams.minWidth > 0) {
|
|
966
|
+
params.append('minWidth', String(filterParams.minWidth))
|
|
967
|
+
}
|
|
968
|
+
if (filterParams.minHeight && filterParams.minHeight > 0) {
|
|
969
|
+
params.append('minHeight', String(filterParams.minHeight))
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
|
|
570
973
|
// 针对单个 subType 发起独立 API 请求
|
|
571
974
|
async function fetchOverviewCategory(cat: OverviewCategoryConfig, keyword = '') {
|
|
572
975
|
overviewLoadingMap[cat.key] = true
|
|
@@ -581,10 +984,8 @@ async function fetchOverviewCategory(cat: OverviewCategoryConfig, keyword = '')
|
|
|
581
984
|
params.append('current', '1')
|
|
582
985
|
params.append('size', '12')
|
|
583
986
|
params.append('subType', cat.subType)
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
params.append('keyword', trimmedKeyword)
|
|
587
|
-
}
|
|
987
|
+
params.append('keyword', resolveEffectiveKeyword(keyword, cat.subType))
|
|
988
|
+
appendStockFilterParams(params, cat.subType)
|
|
588
989
|
|
|
589
990
|
const fullUrl = `${stockUrl}${stockUrl.includes('?') ? '&' : '?'}${params.toString()}`
|
|
590
991
|
const data = await safeFetchJson(fullUrl, {
|
|
@@ -604,90 +1005,184 @@ async function fetchOverviewCategory(cat: OverviewCategoryConfig, keyword = '')
|
|
|
604
1005
|
overviewLoadingMap[cat.key] = false
|
|
605
1006
|
nextTick(() => {
|
|
606
1007
|
updateRowScrollState(cat.key)
|
|
607
|
-
|
|
1008
|
+
requestAnimationFrame(() => updateRowScrollState(cat.key))
|
|
1009
|
+
setTimeout(() => updateRowScrollState(cat.key), 120)
|
|
1010
|
+
setTimeout(() => updateRowScrollState(cat.key), 350)
|
|
608
1011
|
})
|
|
609
1012
|
}
|
|
610
1013
|
}
|
|
611
1014
|
|
|
612
|
-
// 遍历
|
|
1015
|
+
// 遍历 7 种固定类型,每一个类型单独请求一次接口
|
|
613
1016
|
function fetchAllOverviewCategories(keyword = overviewQuery.value) {
|
|
614
1017
|
overviewCategories.forEach(cat => {
|
|
615
1018
|
fetchOverviewCategory(cat, keyword)
|
|
616
1019
|
})
|
|
617
1020
|
}
|
|
618
1021
|
|
|
619
|
-
//
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}
|
|
1022
|
+
// 仅刷新支持图片筛选条件的分类(不对高清视频、背景音乐、音效生效)
|
|
1023
|
+
function fetchImageOnlyOverviewCategories(keyword = overviewQuery.value) {
|
|
1024
|
+
overviewCategories.forEach(cat => {
|
|
1025
|
+
if (!isNonImageFilterSubType(cat.subType)) {
|
|
1026
|
+
fetchOverviewCategory(cat, keyword)
|
|
1027
|
+
}
|
|
1028
|
+
})
|
|
1029
|
+
}
|
|
627
1030
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
1031
|
+
// 关键词搜索触发(概览页刷新全部 7 类,详情页刷新当前类)
|
|
1032
|
+
function triggerSearchNow() {
|
|
1033
|
+
filterParams.query = overviewQuery.value.trim()
|
|
1034
|
+
if (viewMode.value === 'detail') {
|
|
1035
|
+
currentPage.value = 1
|
|
1036
|
+
pagedMaterials.value = []
|
|
1037
|
+
reachEnd.value = false
|
|
1038
|
+
loadFailed.value = false
|
|
1039
|
+
fetchMaterials(1, false)
|
|
1040
|
+
} else {
|
|
1041
|
+
fetchAllOverviewCategories(overviewQuery.value)
|
|
1042
|
+
}
|
|
633
1043
|
}
|
|
634
1044
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
1045
|
+
// 筛选条件变更触发(对高清视频、背景音乐、音效不生效)
|
|
1046
|
+
function triggerFilterChange() {
|
|
1047
|
+
filterParams.query = overviewQuery.value.trim()
|
|
1048
|
+
if (viewMode.value === 'detail') {
|
|
1049
|
+
if (isNonImageFilterSubType(filterParams.activeSubType)) {
|
|
1050
|
+
return
|
|
1051
|
+
}
|
|
1052
|
+
currentPage.value = 1
|
|
1053
|
+
pagedMaterials.value = []
|
|
1054
|
+
reachEnd.value = false
|
|
1055
|
+
loadFailed.value = false
|
|
1056
|
+
fetchMaterials(1, false)
|
|
1057
|
+
} else {
|
|
1058
|
+
fetchImageOnlyOverviewCategories(overviewQuery.value)
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
function toggleFilterPopover(forceState?: boolean) {
|
|
1063
|
+
if (isCurrentDetailFilterDisabled.value) {
|
|
1064
|
+
filterPopoverOpen.value = false
|
|
1065
|
+
return
|
|
1066
|
+
}
|
|
1067
|
+
filterPopoverOpen.value = typeof forceState === 'boolean' ? forceState : !filterPopoverOpen.value
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
function selectColorFilter(val: StockColor | '') {
|
|
1071
|
+
if (isCurrentDetailFilterDisabled.value) return
|
|
1072
|
+
filterParams.color = filterParams.color === val ? '' : val
|
|
1073
|
+
triggerFilterChange()
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
function selectOrientationFilter(val: StockOrientation | '') {
|
|
1077
|
+
if (isCurrentDetailFilterDisabled.value) return
|
|
1078
|
+
filterParams.orientation = filterParams.orientation === val ? '' : val
|
|
1079
|
+
triggerFilterChange()
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
function selectTopicFilter(val: StockTopicCategory | '') {
|
|
1083
|
+
if (isCurrentDetailFilterDisabled.value) return
|
|
1084
|
+
filterParams.category = filterParams.category === val ? '' : val
|
|
1085
|
+
triggerFilterChange()
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
function toggleShowAllTopics() {
|
|
1089
|
+
showAllTopics.value = !showAllTopics.value
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
function selectSizePresetFilter(id: '' | 'hd' | 'fhd' | 'qhd' | 'uhd') {
|
|
1093
|
+
if (isCurrentDetailFilterDisabled.value) return
|
|
1094
|
+
const preset = SIZE_PRESETS.find(p => p.id === id)
|
|
1095
|
+
if (!preset || id === '' || filterParams.sizePresetId === id) {
|
|
1096
|
+
filterParams.sizePresetId = ''
|
|
1097
|
+
filterParams.minWidth = undefined
|
|
1098
|
+
filterParams.minHeight = undefined
|
|
1099
|
+
customMinWidthInput.value = ''
|
|
1100
|
+
customMinHeightInput.value = ''
|
|
1101
|
+
} else {
|
|
1102
|
+
filterParams.sizePresetId = preset.id
|
|
1103
|
+
filterParams.minWidth = preset.minWidth
|
|
1104
|
+
filterParams.minHeight = preset.minHeight
|
|
1105
|
+
customMinWidthInput.value = preset.minWidth ? String(preset.minWidth) : ''
|
|
1106
|
+
customMinHeightInput.value = preset.minHeight ? String(preset.minHeight) : ''
|
|
1107
|
+
}
|
|
1108
|
+
triggerFilterChange()
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
function handleCustomSizeInput() {
|
|
1112
|
+
if (isCurrentDetailFilterDisabled.value) return
|
|
1113
|
+
const wVal = parseInt(customMinWidthInput.value, 10)
|
|
1114
|
+
const hVal = parseInt(customMinHeightInput.value, 10)
|
|
1115
|
+
filterParams.minWidth = !Number.isNaN(wVal) && wVal > 0 ? wVal : undefined
|
|
1116
|
+
filterParams.minHeight = !Number.isNaN(hVal) && hVal > 0 ? hVal : undefined
|
|
1117
|
+
|
|
1118
|
+
const matched = SIZE_PRESETS.find(
|
|
1119
|
+
p => p.id !== '' && p.minWidth === filterParams.minWidth && p.minHeight === filterParams.minHeight
|
|
1120
|
+
)
|
|
1121
|
+
if (!filterParams.minWidth && !filterParams.minHeight) {
|
|
1122
|
+
filterParams.sizePresetId = ''
|
|
1123
|
+
} else {
|
|
1124
|
+
filterParams.sizePresetId = matched ? matched.id : 'custom'
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
if (customSizeDebounceTimer) clearTimeout(customSizeDebounceTimer)
|
|
1128
|
+
customSizeDebounceTimer = setTimeout(() => {
|
|
1129
|
+
triggerFilterChange()
|
|
1130
|
+
}, 380)
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
function clearAllFilters() {
|
|
1134
|
+
if (activeFilterCount.value === 0) return
|
|
1135
|
+
filterParams.color = ''
|
|
1136
|
+
filterParams.orientation = ''
|
|
1137
|
+
filterParams.category = ''
|
|
1138
|
+
filterParams.sizePresetId = ''
|
|
1139
|
+
filterParams.minWidth = undefined
|
|
1140
|
+
filterParams.minHeight = undefined
|
|
1141
|
+
customMinWidthInput.value = ''
|
|
1142
|
+
customMinHeightInput.value = ''
|
|
1143
|
+
triggerFilterChange()
|
|
641
1144
|
}
|
|
642
1145
|
|
|
643
|
-
//
|
|
1146
|
+
// 从图二点击「查看全部」进入图三(保留当前搜索词与筛选条件)
|
|
644
1147
|
async function openCategoryDetail(subType: StockSubType) {
|
|
1148
|
+
stopInlineAudio()
|
|
645
1149
|
const cat = overviewCategories.find(c => c.subType === subType)
|
|
646
1150
|
filterParams.activeSubType = subType
|
|
647
1151
|
const q = overviewQuery.value.trim()
|
|
648
1152
|
baseDetailTitle.value = cat ? cat.label : subTypeNameMap[subType]
|
|
649
|
-
baseSearchQuery.value = q
|
|
650
|
-
activeTag.value = ''
|
|
651
1153
|
filterParams.query = q
|
|
1154
|
+
filterPopoverOpen.value = false
|
|
652
1155
|
viewMode.value = 'detail'
|
|
653
1156
|
currentPage.value = 1
|
|
654
1157
|
pagedMaterials.value = []
|
|
655
1158
|
reachEnd.value = false
|
|
656
1159
|
loadFailed.value = false
|
|
657
1160
|
await nextTick()
|
|
658
|
-
updateTagScrollState()
|
|
659
1161
|
await fetchMaterials(1, false)
|
|
660
1162
|
}
|
|
661
1163
|
|
|
662
|
-
//
|
|
1164
|
+
// 顶部搜索框回车
|
|
663
1165
|
function handleOverviewSearch() {
|
|
664
|
-
|
|
1166
|
+
filterPopoverOpen.value = false
|
|
1167
|
+
triggerSearchNow()
|
|
665
1168
|
}
|
|
666
1169
|
|
|
667
1170
|
function clearOverviewQuery() {
|
|
668
1171
|
overviewQuery.value = ''
|
|
669
|
-
|
|
1172
|
+
triggerSearchNow()
|
|
670
1173
|
}
|
|
671
1174
|
|
|
672
1175
|
// 图三点击左上角返回箭头回到图二
|
|
673
1176
|
function backToOverview() {
|
|
1177
|
+
stopInlineAudio()
|
|
1178
|
+
filterPopoverOpen.value = false
|
|
674
1179
|
viewMode.value = 'overview'
|
|
1180
|
+
fetchAllOverviewCategories(overviewQuery.value)
|
|
675
1181
|
nextTick(() => {
|
|
676
1182
|
overviewCategories.forEach(cat => updateRowScrollState(cat.key))
|
|
677
1183
|
})
|
|
678
1184
|
}
|
|
679
1185
|
|
|
680
|
-
// 图三点击细分标签胶囊
|
|
681
|
-
async function selectDetailTag(tag: string) {
|
|
682
|
-
activeTag.value = tag
|
|
683
|
-
filterParams.query = tag ? tag : baseSearchQuery.value
|
|
684
|
-
currentPage.value = 1
|
|
685
|
-
pagedMaterials.value = []
|
|
686
|
-
reachEnd.value = false
|
|
687
|
-
loadFailed.value = false
|
|
688
|
-
await fetchMaterials(1, false)
|
|
689
|
-
}
|
|
690
|
-
|
|
691
1186
|
const loading = ref(false)
|
|
692
1187
|
const pagedMaterials = ref<MaterialItem[]>([])
|
|
693
1188
|
const currentPage = ref(1)
|
|
@@ -698,7 +1193,7 @@ const loadFailed = ref(false)
|
|
|
698
1193
|
const loadErrorMsg = ref('')
|
|
699
1194
|
const reachEnd = ref(false)
|
|
700
1195
|
|
|
701
|
-
// 图三分页加载:始终携带 subType
|
|
1196
|
+
// 图三分页加载:始终携带 subType 与筛选请求参数
|
|
702
1197
|
async function fetchMaterials(page = 1, append = false) {
|
|
703
1198
|
const stockUrl = getEffectiveStockUrl()
|
|
704
1199
|
if (!stockUrl) {
|
|
@@ -719,11 +1214,8 @@ async function fetchMaterials(page = 1, append = false) {
|
|
|
719
1214
|
params.append('current', String(page))
|
|
720
1215
|
params.append('size', String(pageSize))
|
|
721
1216
|
params.append('subType', filterParams.activeSubType)
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
if (q) {
|
|
725
|
-
params.append('keyword', q)
|
|
726
|
-
}
|
|
1217
|
+
params.append('keyword', resolveEffectiveKeyword(filterParams.query, filterParams.activeSubType))
|
|
1218
|
+
appendStockFilterParams(params, filterParams.activeSubType)
|
|
727
1219
|
|
|
728
1220
|
const fullUrl = `${stockUrl}${stockUrl.includes('?') ? '&' : '?'}${params.toString()}`
|
|
729
1221
|
const data = await safeFetchJson(fullUrl, {
|
|
@@ -786,14 +1278,20 @@ const waterfallColumns = computed<[MaterialItem[], MaterialItem[]]>(() => {
|
|
|
786
1278
|
|
|
787
1279
|
displayedMaterials.value.forEach((item, idx) => {
|
|
788
1280
|
let ratio = 0.75
|
|
789
|
-
|
|
790
|
-
const h = Number(item.originalHeight || item.height)
|
|
791
|
-
if (w > 0 && h > 0) {
|
|
792
|
-
ratio = Math.max(0.45, Math.min(1.8, h / w))
|
|
793
|
-
} else if (idx % 3 === 1) {
|
|
794
|
-
ratio = 1.25
|
|
795
|
-
} else if (idx % 4 === 2) {
|
|
1281
|
+
if (isAudioMaterial(item)) {
|
|
796
1282
|
ratio = 0.65
|
|
1283
|
+
} else if (isIconMaterial(item)) {
|
|
1284
|
+
ratio = 1
|
|
1285
|
+
} else {
|
|
1286
|
+
const w = Number(item.originalWidth || item.width)
|
|
1287
|
+
const h = Number(item.originalHeight || item.height)
|
|
1288
|
+
if (w > 0 && h > 0) {
|
|
1289
|
+
ratio = Math.max(0.45, Math.min(1.8, h / w))
|
|
1290
|
+
} else if (idx % 3 === 1) {
|
|
1291
|
+
ratio = 1.25
|
|
1292
|
+
} else if (idx % 4 === 2) {
|
|
1293
|
+
ratio = 0.65
|
|
1294
|
+
}
|
|
797
1295
|
}
|
|
798
1296
|
|
|
799
1297
|
if (leftHeight <= rightHeight) {
|
|
@@ -831,9 +1329,10 @@ function formatMaterialTitle(title?: string, fallback = '素材', maxLen = 12):
|
|
|
831
1329
|
return text.length > maxLen ? `${text.slice(0, maxLen)}...` : text
|
|
832
1330
|
}
|
|
833
1331
|
|
|
834
|
-
//
|
|
1332
|
+
// 点击素材卡片插入画布(区分音频、视频与图片/矢量/插画/图标,若当前处于图片占位符替换状态则优先替换占位符)
|
|
835
1333
|
function handleSelectMaterial(meta: MaterialItem) {
|
|
836
|
-
const
|
|
1334
|
+
const isAud = isAudioMaterial(meta)
|
|
1335
|
+
const isVid = !isAud && isVideoMaterial(meta)
|
|
837
1336
|
const targetUrl = meta.sourceUrl || meta.url || meta.downloadUrl || meta.previewUrl
|
|
838
1337
|
|
|
839
1338
|
if (!targetUrl) {
|
|
@@ -841,6 +1340,17 @@ function handleSelectMaterial(meta: MaterialItem) {
|
|
|
841
1340
|
return
|
|
842
1341
|
}
|
|
843
1342
|
|
|
1343
|
+
if (isAud) {
|
|
1344
|
+
stopInlineAudio()
|
|
1345
|
+
addElement('audio', targetUrl)
|
|
1346
|
+
const audioTypeLabel =
|
|
1347
|
+
meta.subType === 'Sound_Effects' || meta.assetSubType === 'Sound_Effects'
|
|
1348
|
+
? '音效'
|
|
1349
|
+
: '背景音乐'
|
|
1350
|
+
notify(`已成功添加${audioTypeLabel} "${formatMaterialTitle(meta.title, audioTypeLabel, 12)}" 到画布`)
|
|
1351
|
+
return
|
|
1352
|
+
}
|
|
1353
|
+
|
|
844
1354
|
const rawW = meta.originalWidth || meta.width
|
|
845
1355
|
const rawH = meta.originalHeight || meta.height
|
|
846
1356
|
|
|
@@ -871,7 +1381,9 @@ function handleSelectMaterial(meta: MaterialItem) {
|
|
|
871
1381
|
}
|
|
872
1382
|
|
|
873
1383
|
let initialDimensions: { width?: number; height?: number } | undefined = undefined
|
|
874
|
-
if (
|
|
1384
|
+
if (isIconMaterial(meta)) {
|
|
1385
|
+
initialDimensions = { width: 120, height: 120 }
|
|
1386
|
+
} else if (rawW && rawH && rawW > 0 && rawH > 0) {
|
|
875
1387
|
const maxWidth = 480
|
|
876
1388
|
const maxHeight = 360
|
|
877
1389
|
const scale = Math.min(maxWidth / rawW, maxHeight / rawH, 1)
|
|
@@ -886,11 +1398,12 @@ function handleSelectMaterial(meta: MaterialItem) {
|
|
|
886
1398
|
notify(`已成功添加视频 "${formatMaterialTitle(meta.title, '高清视频', 12)}" 到画布`)
|
|
887
1399
|
} else {
|
|
888
1400
|
addElement('image', targetUrl, undefined, undefined, undefined, initialDimensions)
|
|
889
|
-
notify(`已成功添加素材 "${formatMaterialTitle(meta.title, '图片', 12)}" 到画布`)
|
|
1401
|
+
notify(`已成功添加素材 "${formatMaterialTitle(meta.title, isIconMaterial(meta) ? '图标' : '图片', 12)}" 到画布`)
|
|
890
1402
|
}
|
|
891
1403
|
}
|
|
892
1404
|
|
|
893
1405
|
function handleCloseDrawer() {
|
|
1406
|
+
stopInlineAudio()
|
|
894
1407
|
activeTab.value = null
|
|
895
1408
|
}
|
|
896
1409
|
|
|
@@ -901,15 +1414,42 @@ function handleDrawerContainerClick(e: MouseEvent) {
|
|
|
901
1414
|
}
|
|
902
1415
|
}
|
|
903
1416
|
|
|
1417
|
+
function handleGlobalMouseDown(e: MouseEvent) {
|
|
1418
|
+
if (!filterPopoverOpen.value) return
|
|
1419
|
+
const target = e.target as HTMLElement | null
|
|
1420
|
+
if (!target) return
|
|
1421
|
+
if (
|
|
1422
|
+
target.closest('.stock-filter-popover') ||
|
|
1423
|
+
target.closest('.stock-filter-trigger-btn')
|
|
1424
|
+
) {
|
|
1425
|
+
return
|
|
1426
|
+
}
|
|
1427
|
+
filterPopoverOpen.value = false
|
|
1428
|
+
}
|
|
1429
|
+
|
|
904
1430
|
onMounted(() => {
|
|
905
1431
|
fetchAllOverviewCategories()
|
|
906
1432
|
window.addEventListener('keydown', handleKeydown)
|
|
1433
|
+
window.addEventListener('mousedown', handleGlobalMouseDown, true)
|
|
907
1434
|
})
|
|
908
1435
|
|
|
909
1436
|
onUnmounted(() => {
|
|
1437
|
+
stopInlineAudio()
|
|
1438
|
+
trackResizeObserver?.disconnect()
|
|
910
1439
|
window.removeEventListener('keydown', handleKeydown)
|
|
1440
|
+
window.removeEventListener('mousedown', handleGlobalMouseDown, true)
|
|
911
1441
|
})
|
|
912
1442
|
|
|
1443
|
+
watch(
|
|
1444
|
+
[() => materialPopoverVisible?.value, () => activeTab?.value, () => activeMainTab.value, () => viewMode.value],
|
|
1445
|
+
() => {
|
|
1446
|
+
nextTick(() => {
|
|
1447
|
+
updateAllRowScrollStates()
|
|
1448
|
+
setTimeout(() => updateAllRowScrollStates(), 140)
|
|
1449
|
+
})
|
|
1450
|
+
}
|
|
1451
|
+
)
|
|
1452
|
+
|
|
913
1453
|
watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => materialTreeApiUrl?.value], () => {
|
|
914
1454
|
fetchAllOverviewCategories()
|
|
915
1455
|
if (viewMode.value === 'detail') {
|
|
@@ -1022,219 +1562,540 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1022
1562
|
</div>
|
|
1023
1563
|
</div>
|
|
1024
1564
|
|
|
1025
|
-
<!-- ==================== Tab 1:检索(公网素材分类概览 &
|
|
1565
|
+
<!-- ==================== Tab 1:检索(公网素材分类概览 & 详情瀑布流,共用顶部搜索与复合筛选器) ==================== -->
|
|
1026
1566
|
<template v-if="activeMainTab === 'search'">
|
|
1027
|
-
<!--
|
|
1028
|
-
<div
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1567
|
+
<!-- 顶部共用搜索框 + 筛选按钮 + 已选标签条 + 悬浮复合筛选面板 -->
|
|
1568
|
+
<div class="stock-search-filter-header">
|
|
1569
|
+
<div class="stock-search-bar-wrapper">
|
|
1570
|
+
<div class="stock-search-box" :class="{ 'is-filter-open': filterPopoverOpen && !isCurrentDetailFilterDisabled }">
|
|
1571
|
+
<el-icon class="stock-search-icon" @click="handleOverviewSearch">
|
|
1572
|
+
<Search />
|
|
1573
|
+
</el-icon>
|
|
1574
|
+
<input
|
|
1575
|
+
v-model="overviewQuery"
|
|
1576
|
+
type="text"
|
|
1577
|
+
placeholder="搜索图片、插画、图标、视频、音乐、音效..."
|
|
1578
|
+
class="stock-search-input"
|
|
1579
|
+
@keyup.enter="handleOverviewSearch"
|
|
1580
|
+
/>
|
|
1581
|
+
<button
|
|
1582
|
+
v-if="overviewQuery"
|
|
1583
|
+
type="button"
|
|
1584
|
+
class="stock-clear-kw-btn"
|
|
1585
|
+
title="清空搜索词"
|
|
1586
|
+
@click="clearOverviewQuery"
|
|
1587
|
+
>
|
|
1588
|
+
×
|
|
1589
|
+
</button>
|
|
1590
|
+
<div class="stock-search-divider"></div>
|
|
1591
|
+
<button
|
|
1592
|
+
type="button"
|
|
1593
|
+
class="stock-filter-trigger-btn"
|
|
1594
|
+
:disabled="isCurrentDetailFilterDisabled"
|
|
1595
|
+
:class="{
|
|
1596
|
+
'is-active': !isCurrentDetailFilterDisabled && (filterPopoverOpen || activeFilterCount > 0),
|
|
1597
|
+
'is-disabled': isCurrentDetailFilterDisabled
|
|
1598
|
+
}"
|
|
1599
|
+
:title="isCurrentDetailFilterDisabled ? '高清视频、背景音乐、音效不支持该筛选条件' : '筛选条件'"
|
|
1600
|
+
@click.stop="toggleFilterPopover()"
|
|
1601
|
+
>
|
|
1602
|
+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1603
|
+
<line x1="4" y1="6" x2="20" y2="6" />
|
|
1604
|
+
<circle cx="9" cy="6" r="2" fill="#fff" />
|
|
1605
|
+
<line x1="4" y1="12" x2="20" y2="12" />
|
|
1606
|
+
<circle cx="15" cy="12" r="2" fill="#fff" />
|
|
1607
|
+
<line x1="4" y1="18" x2="20" y2="18" />
|
|
1608
|
+
<circle cx="10" cy="18" r="2" fill="#fff" />
|
|
1609
|
+
</svg>
|
|
1610
|
+
<span v-if="!isCurrentDetailFilterDisabled && activeFilterCount > 0" class="stock-filter-count-dot">
|
|
1611
|
+
{{ activeFilterCount }}
|
|
1612
|
+
</span>
|
|
1063
1613
|
</button>
|
|
1064
1614
|
</div>
|
|
1065
1615
|
|
|
1066
|
-
|
|
1616
|
+
<!-- 已选筛选条件胶囊条 -->
|
|
1617
|
+
<div v-if="!isCurrentDetailFilterDisabled && activeFilterCount > 0" class="stock-active-filter-chips">
|
|
1067
1618
|
<div
|
|
1068
|
-
|
|
1069
|
-
class="
|
|
1070
|
-
|
|
1619
|
+
v-if="filterParams.color"
|
|
1620
|
+
class="stock-filter-chip"
|
|
1621
|
+
title="点击移除颜色筛选"
|
|
1622
|
+
@click="selectColorFilter('')"
|
|
1071
1623
|
>
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
@click.stop="handleSelectMaterial(item)"
|
|
1084
|
-
>
|
|
1085
|
-
<VideoCoverThumb
|
|
1086
|
-
v-if="cat.subType === 'Videos' || isVideoMaterial(item) || isVideoUrl(getMaterialThumb(item))"
|
|
1087
|
-
:video-url="item.sourceUrl || item.url || getMaterialThumb(item)"
|
|
1088
|
-
:cover-url="item.coverUrl || item.image || item.thumbnail || (!isVideoUrl(item.previewUrl) ? item.previewUrl : '')"
|
|
1089
|
-
:alt="item.title || cat.label"
|
|
1090
|
-
class="overview-thumb-img"
|
|
1091
|
-
@loaded="updateRowScrollState(cat.key)"
|
|
1092
|
-
/>
|
|
1093
|
-
<img
|
|
1094
|
-
v-else-if="getMaterialThumb(item)"
|
|
1095
|
-
:src="getMaterialThumb(item)"
|
|
1096
|
-
:alt="item.title || cat.label"
|
|
1097
|
-
loading="lazy"
|
|
1098
|
-
class="overview-thumb-img"
|
|
1099
|
-
@load="updateRowScrollState(cat.key)"
|
|
1100
|
-
/>
|
|
1101
|
-
<span v-if="cat.subType === 'Videos' || isVideoMaterial(item)" class="video-badge-icon">
|
|
1102
|
-
<el-icon><VideoPlay /></el-icon>
|
|
1103
|
-
</span>
|
|
1104
|
-
<button
|
|
1105
|
-
v-if="isDamLoggedIn && cat.subType !== 'Videos' && !isVideoMaterial(item) && getMaterialThumb(item)"
|
|
1106
|
-
type="button"
|
|
1107
|
-
class="overview-card-ref-btn"
|
|
1108
|
-
title="作为参考图发送到「AI生成」"
|
|
1109
|
-
@click.stop.prevent="handleSendToCreateRef(item, $event)"
|
|
1110
|
-
>
|
|
1111
|
-
@参考
|
|
1112
|
-
</button>
|
|
1113
|
-
</div>
|
|
1114
|
-
</template>
|
|
1624
|
+
<span
|
|
1625
|
+
class="stock-chip-color-dot"
|
|
1626
|
+
:style="
|
|
1627
|
+
currentColorOption.hex.startsWith('linear-gradient')
|
|
1628
|
+
? { backgroundImage: currentColorOption.hex }
|
|
1629
|
+
: { backgroundColor: currentColorOption.hex }
|
|
1630
|
+
"
|
|
1631
|
+
></span>
|
|
1632
|
+
<span>{{ currentColorOption.label }}</span>
|
|
1633
|
+
<span class="stock-chip-close">×</span>
|
|
1634
|
+
</div>
|
|
1115
1635
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1636
|
+
<div
|
|
1637
|
+
v-if="filterParams.orientation"
|
|
1638
|
+
class="stock-filter-chip"
|
|
1639
|
+
title="点击移除画幅筛选"
|
|
1640
|
+
@click="selectOrientationFilter('')"
|
|
1641
|
+
>
|
|
1642
|
+
<span>{{ currentOrientationOption.label }}</span>
|
|
1643
|
+
<span class="stock-chip-close">×</span>
|
|
1120
1644
|
</div>
|
|
1121
1645
|
|
|
1122
|
-
<!-- 左侧渐变与左滑箭头 -->
|
|
1123
1646
|
<div
|
|
1124
|
-
v-if="
|
|
1125
|
-
class="
|
|
1126
|
-
|
|
1647
|
+
v-if="filterParams.category"
|
|
1648
|
+
class="stock-filter-chip"
|
|
1649
|
+
title="点击移除题材筛选"
|
|
1650
|
+
@click="selectTopicFilter('')"
|
|
1127
1651
|
>
|
|
1128
|
-
<
|
|
1129
|
-
|
|
1130
|
-
<polyline points="15 18 9 12 15 6" />
|
|
1131
|
-
</svg>
|
|
1652
|
+
<span>{{ currentTopicOption.label }}</span>
|
|
1653
|
+
<span class="stock-chip-close">×</span>
|
|
1132
1654
|
</div>
|
|
1133
1655
|
|
|
1134
|
-
<!-- 右侧渐变与右滑箭头 -->
|
|
1135
1656
|
<div
|
|
1136
|
-
v-if="
|
|
1137
|
-
class="
|
|
1138
|
-
|
|
1657
|
+
v-if="filterParams.minWidth || filterParams.minHeight"
|
|
1658
|
+
class="stock-filter-chip"
|
|
1659
|
+
title="点击移除尺寸筛选"
|
|
1660
|
+
@click="selectSizePresetFilter('')"
|
|
1139
1661
|
>
|
|
1140
|
-
<
|
|
1141
|
-
|
|
1142
|
-
<polyline points="9 18 15 12 9 6" />
|
|
1143
|
-
</svg>
|
|
1662
|
+
<span>{{ currentSizeLabelHint }}</span>
|
|
1663
|
+
<span class="stock-chip-close">×</span>
|
|
1144
1664
|
</div>
|
|
1145
1665
|
</div>
|
|
1146
|
-
</div>
|
|
1147
|
-
</div>
|
|
1148
|
-
</div>
|
|
1149
|
-
|
|
1150
|
-
<!-- ==================== 图三:分类/搜索详情瀑布流视图 ==================== -->
|
|
1151
|
-
<div v-else class="material-detail-body">
|
|
1152
|
-
<!-- 顶部横向细分标签栏 -->
|
|
1153
|
-
<div class="detail-tags-bar-wrap">
|
|
1154
|
-
<div
|
|
1155
|
-
ref="tagTrackRef"
|
|
1156
|
-
class="detail-tags-track"
|
|
1157
|
-
@scroll="updateTagScrollState"
|
|
1158
|
-
>
|
|
1159
|
-
<button
|
|
1160
|
-
type="button"
|
|
1161
|
-
class="detail-tag-pill"
|
|
1162
|
-
:class="{ active: activeTag === '' }"
|
|
1163
|
-
@click="selectDetailTag('')"
|
|
1164
|
-
>
|
|
1165
|
-
全部
|
|
1166
|
-
</button>
|
|
1167
|
-
<button
|
|
1168
|
-
v-for="tag in currentCategoryTags"
|
|
1169
|
-
:key="tag"
|
|
1170
|
-
type="button"
|
|
1171
|
-
class="detail-tag-pill"
|
|
1172
|
-
:class="{ active: activeTag === tag }"
|
|
1173
|
-
@click="selectDetailTag(tag)"
|
|
1174
|
-
>
|
|
1175
|
-
{{ tag }}
|
|
1176
|
-
</button>
|
|
1177
|
-
</div>
|
|
1178
1666
|
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1667
|
+
<!-- 悬浮复合筛选面板 Popover -->
|
|
1668
|
+
<div v-if="filterPopoverOpen && !isCurrentDetailFilterDisabled" class="stock-filter-popover" @click.stop>
|
|
1669
|
+
<div class="stock-filter-popover-body">
|
|
1670
|
+
<div class="stock-filter-scope-tip">
|
|
1671
|
+
<span>仅对矢量图、照片、插画、图标生效(对视频、音乐、音效不生效)</span>
|
|
1672
|
+
</div>
|
|
1673
|
+
<!-- 1. 颜色 -->
|
|
1674
|
+
<div class="stock-filter-section">
|
|
1675
|
+
<div class="stock-filter-section-header">
|
|
1676
|
+
<span class="stock-filter-section-title">颜色</span>
|
|
1677
|
+
<span class="stock-filter-section-sub">{{ currentColorOption.label }}</span>
|
|
1678
|
+
</div>
|
|
1679
|
+
<div class="stock-color-grid">
|
|
1680
|
+
<div
|
|
1681
|
+
v-for="c in COLOR_OPTIONS"
|
|
1682
|
+
:key="c.value || 'all'"
|
|
1683
|
+
class="stock-color-swatch"
|
|
1684
|
+
:class="{
|
|
1685
|
+
'is-none': c.value === '',
|
|
1686
|
+
'is-white': c.value === 'white',
|
|
1687
|
+
'is-grayscale': c.value === 'grayscale',
|
|
1688
|
+
selected: filterParams.color === c.value
|
|
1689
|
+
}"
|
|
1690
|
+
:style="
|
|
1691
|
+
c.value === ''
|
|
1692
|
+
? undefined
|
|
1693
|
+
: c.hex.startsWith('linear-gradient')
|
|
1694
|
+
? { backgroundImage: c.hex }
|
|
1695
|
+
: { backgroundColor: c.hex }
|
|
1696
|
+
"
|
|
1697
|
+
:title="c.label"
|
|
1698
|
+
@click="selectColorFilter(c.value)"
|
|
1699
|
+
>
|
|
1700
|
+
<svg
|
|
1701
|
+
v-if="c.value === ''"
|
|
1702
|
+
width="14"
|
|
1703
|
+
height="14"
|
|
1704
|
+
viewBox="0 0 24 24"
|
|
1705
|
+
fill="none"
|
|
1706
|
+
stroke="currentColor"
|
|
1707
|
+
stroke-width="2"
|
|
1708
|
+
>
|
|
1709
|
+
<line x1="4" y1="20" x2="20" y2="4" />
|
|
1710
|
+
</svg>
|
|
1711
|
+
<svg
|
|
1712
|
+
v-else-if="filterParams.color === c.value"
|
|
1713
|
+
width="11"
|
|
1714
|
+
height="11"
|
|
1715
|
+
viewBox="0 0 12 12"
|
|
1716
|
+
fill="none"
|
|
1717
|
+
:stroke="c.value === 'white' || c.value === 'yellow' ? '#0f172a' : '#ffffff'"
|
|
1718
|
+
stroke-width="2.2"
|
|
1719
|
+
>
|
|
1720
|
+
<path d="M2.5 6.2l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round" />
|
|
1721
|
+
</svg>
|
|
1722
|
+
</div>
|
|
1723
|
+
</div>
|
|
1724
|
+
</div>
|
|
1190
1725
|
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1726
|
+
<!-- 2. 画幅比例 -->
|
|
1727
|
+
<div class="stock-filter-section">
|
|
1728
|
+
<div class="stock-filter-section-header">
|
|
1729
|
+
<span class="stock-filter-section-title">画幅比例</span>
|
|
1730
|
+
</div>
|
|
1731
|
+
<div class="stock-orientation-grid">
|
|
1732
|
+
<div
|
|
1733
|
+
v-for="o in ORIENTATION_OPTIONS"
|
|
1734
|
+
:key="o.value || 'all'"
|
|
1735
|
+
class="stock-radio-item"
|
|
1736
|
+
:class="{
|
|
1737
|
+
selected: !o.disabled && filterParams.orientation === o.value,
|
|
1738
|
+
disabled: o.disabled
|
|
1739
|
+
}"
|
|
1740
|
+
:title="o.disabled ? '公网接口暂不支持正方形过滤' : o.label"
|
|
1741
|
+
@click="!o.disabled && selectOrientationFilter(o.value as StockOrientation | '')"
|
|
1742
|
+
>
|
|
1743
|
+
<div class="stock-radio-circle"></div>
|
|
1744
|
+
<span class="stock-radio-label">{{ o.label }}</span>
|
|
1745
|
+
</div>
|
|
1746
|
+
</div>
|
|
1747
|
+
</div>
|
|
1203
1748
|
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1749
|
+
<!-- 3. 题材分类 -->
|
|
1750
|
+
<div class="stock-filter-section">
|
|
1751
|
+
<div class="stock-filter-section-header">
|
|
1752
|
+
<span class="stock-filter-section-title">题材分类</span>
|
|
1753
|
+
<span class="stock-filter-section-sub">{{ currentTopicOption.label }}</span>
|
|
1754
|
+
</div>
|
|
1755
|
+
<div class="stock-topic-pills-wrap">
|
|
1756
|
+
<div
|
|
1757
|
+
v-for="t in visibleTopicOptions"
|
|
1758
|
+
:key="t.value || 'all'"
|
|
1759
|
+
class="stock-topic-pill"
|
|
1760
|
+
:class="{ selected: filterParams.category === t.value }"
|
|
1761
|
+
@click="selectTopicFilter(t.value)"
|
|
1762
|
+
>
|
|
1763
|
+
{{ t.label }}
|
|
1764
|
+
</div>
|
|
1765
|
+
<button type="button" class="stock-topic-expand-btn" @click="toggleShowAllTopics">
|
|
1766
|
+
<span>{{ showAllTopics ? '收起更多题材 ▲' : '展开全部 20 类题材 ▼' }}</span>
|
|
1767
|
+
</button>
|
|
1768
|
+
</div>
|
|
1769
|
+
</div>
|
|
1209
1770
|
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1771
|
+
<!-- 4. 尺寸大小 -->
|
|
1772
|
+
<div class="stock-filter-section">
|
|
1773
|
+
<div class="stock-filter-section-header">
|
|
1774
|
+
<span class="stock-filter-section-title">尺寸大小</span>
|
|
1775
|
+
<span class="stock-filter-section-sub">{{ currentSizeLabelHint }}</span>
|
|
1776
|
+
</div>
|
|
1777
|
+
<div class="stock-size-presets-grid">
|
|
1778
|
+
<div
|
|
1779
|
+
v-for="p in SIZE_PRESETS"
|
|
1780
|
+
:key="p.id || 'all'"
|
|
1781
|
+
class="stock-size-pill"
|
|
1782
|
+
:class="{
|
|
1783
|
+
'is-all-size': p.id === '',
|
|
1784
|
+
selected:
|
|
1785
|
+
filterParams.sizePresetId === p.id &&
|
|
1786
|
+
(p.id !== '' || (!filterParams.minWidth && !filterParams.minHeight))
|
|
1787
|
+
}"
|
|
1788
|
+
@click="selectSizePresetFilter(p.id)"
|
|
1789
|
+
>
|
|
1790
|
+
<span class="stock-size-pill-title">{{ p.label }}</span>
|
|
1791
|
+
<span class="stock-size-pill-sub">{{ p.sub }}</span>
|
|
1792
|
+
</div>
|
|
1793
|
+
</div>
|
|
1794
|
+
<div class="stock-custom-size-row">
|
|
1795
|
+
<input
|
|
1796
|
+
v-model="customMinWidthInput"
|
|
1797
|
+
type="number"
|
|
1798
|
+
min="1"
|
|
1799
|
+
placeholder="最小宽 (px)"
|
|
1800
|
+
class="stock-size-input"
|
|
1801
|
+
@input="handleCustomSizeInput"
|
|
1802
|
+
/>
|
|
1803
|
+
<span class="stock-size-mul">×</span>
|
|
1804
|
+
<input
|
|
1805
|
+
v-model="customMinHeightInput"
|
|
1806
|
+
type="number"
|
|
1807
|
+
min="1"
|
|
1808
|
+
placeholder="最小高 (px)"
|
|
1809
|
+
class="stock-size-input"
|
|
1810
|
+
@input="handleCustomSizeInput"
|
|
1811
|
+
/>
|
|
1812
|
+
</div>
|
|
1813
|
+
</div>
|
|
1814
|
+
</div>
|
|
1815
|
+
|
|
1816
|
+
<!-- 底部清除全部按钮 -->
|
|
1817
|
+
<div class="stock-filter-popover-footer">
|
|
1818
|
+
<button
|
|
1819
|
+
type="button"
|
|
1820
|
+
class="stock-clear-all-btn"
|
|
1821
|
+
:class="{ 'has-active': activeFilterCount > 0 }"
|
|
1822
|
+
@click="clearAllFilters"
|
|
1823
|
+
>
|
|
1824
|
+
{{ activeFilterCount > 0 ? `清除全部 (${activeFilterCount})` : '清除全部' }}
|
|
1825
|
+
</button>
|
|
1826
|
+
</div>
|
|
1827
|
+
</div>
|
|
1828
|
+
</div>
|
|
1829
|
+
</div>
|
|
1830
|
+
|
|
1831
|
+
<!-- 图二:素材库分类概览视图 -->
|
|
1832
|
+
<div v-if="viewMode === 'overview'" class="material-overview-body">
|
|
1833
|
+
<!-- 7大固定分类横向预览列表(Vectors / Photos / Illustrations / Videos / Icons / Music / Sound_Effects) -->
|
|
1834
|
+
<div class="overview-sections-scroll" @scroll.passive="updateAllRowScrollStates">
|
|
1835
|
+
<div
|
|
1836
|
+
v-for="cat in overviewCategories"
|
|
1837
|
+
:key="cat.key"
|
|
1838
|
+
class="overview-category-section"
|
|
1839
|
+
>
|
|
1840
|
+
<div class="section-header-row">
|
|
1841
|
+
<span class="section-cat-title">{{ cat.label }}</span>
|
|
1842
|
+
<button type="button" class="section-view-all-btn" @click="openCategoryDetail(cat.subType)">
|
|
1843
|
+
查看全部
|
|
1844
|
+
</button>
|
|
1845
|
+
</div>
|
|
1846
|
+
|
|
1847
|
+
<div class="section-carousel-container" @mouseenter="updateRowScrollState(cat.key)">
|
|
1848
|
+
<div
|
|
1849
|
+
:ref="el => setRowRef(cat.key, el)"
|
|
1850
|
+
class="section-carousel-track"
|
|
1851
|
+
@scroll="updateRowScrollState(cat.key)"
|
|
1852
|
+
>
|
|
1853
|
+
<!-- 加载占位骨架 -->
|
|
1854
|
+
<template v-if="overviewLoadingMap[cat.key] && (!overviewItemsMap[cat.key] || overviewItemsMap[cat.key].length === 0)">
|
|
1855
|
+
<div v-for="n in 3" :key="n" class="overview-skeleton-card"></div>
|
|
1856
|
+
</template>
|
|
1857
|
+
|
|
1858
|
+
<!-- 横向缩略图卡片 -->
|
|
1859
|
+
<template v-else-if="overviewItemsMap[cat.key] && overviewItemsMap[cat.key].length > 0">
|
|
1860
|
+
<div
|
|
1861
|
+
v-for="(item, idx) in overviewItemsMap[cat.key]"
|
|
1862
|
+
:key="item.id || idx"
|
|
1863
|
+
class="overview-thumb-card"
|
|
1864
|
+
:class="{
|
|
1865
|
+
'is-icon-card': cat.subType === 'Icons' || isIconMaterial(item),
|
|
1866
|
+
'is-audio-card': cat.subType === 'Music' || cat.subType === 'Sound_Effects' || isAudioMaterial(item)
|
|
1867
|
+
}"
|
|
1868
|
+
@click.stop="handleSelectMaterial(item)"
|
|
1869
|
+
>
|
|
1870
|
+
<!-- 音频/音效横向卡片 -->
|
|
1871
|
+
<div
|
|
1872
|
+
v-if="cat.subType === 'Music' || cat.subType === 'Sound_Effects' || isAudioMaterial(item)"
|
|
1873
|
+
class="overview-audio-inner"
|
|
1874
|
+
:class="{
|
|
1875
|
+
'is-sfx': cat.subType === 'Sound_Effects' || item.assetSubType === 'Sound_Effects' || item.subType === 'Sound_Effects',
|
|
1876
|
+
'is-playing': playingAudioId === item.id
|
|
1877
|
+
}"
|
|
1878
|
+
>
|
|
1879
|
+
<div class="overview-audio-top">
|
|
1880
|
+
<button
|
|
1881
|
+
type="button"
|
|
1882
|
+
class="audio-play-toggle-btn"
|
|
1883
|
+
:title="playingAudioId === item.id ? '暂停试听' : '试听音频'"
|
|
1884
|
+
@click.stop="toggleInlineAudioPlay(item, $event)"
|
|
1885
|
+
>
|
|
1886
|
+
<svg
|
|
1887
|
+
v-if="playingAudioId === item.id"
|
|
1888
|
+
viewBox="0 0 24 24"
|
|
1889
|
+
width="12"
|
|
1890
|
+
height="12"
|
|
1891
|
+
fill="currentColor"
|
|
1892
|
+
>
|
|
1893
|
+
<rect x="6" y="5" width="4" height="14" rx="1" />
|
|
1894
|
+
<rect x="14" y="5" width="4" height="14" rx="1" />
|
|
1895
|
+
</svg>
|
|
1896
|
+
<svg
|
|
1897
|
+
v-else
|
|
1898
|
+
viewBox="0 0 24 24"
|
|
1899
|
+
width="12"
|
|
1900
|
+
height="12"
|
|
1901
|
+
fill="currentColor"
|
|
1902
|
+
>
|
|
1903
|
+
<polygon points="7 4 20 12 7 20 7 4" />
|
|
1904
|
+
</svg>
|
|
1905
|
+
</button>
|
|
1906
|
+
<div class="audio-wave-bars" :class="{ active: playingAudioId === item.id }">
|
|
1907
|
+
<span></span>
|
|
1908
|
+
<span></span>
|
|
1909
|
+
<span></span>
|
|
1910
|
+
<span></span>
|
|
1911
|
+
<span></span>
|
|
1912
|
+
</div>
|
|
1913
|
+
<span class="audio-duration-tag">
|
|
1914
|
+
{{ formatAudioDuration(item.duration) || (cat.subType === 'Sound_Effects' ? 'SFX' : 'BGM') }}
|
|
1915
|
+
</span>
|
|
1916
|
+
</div>
|
|
1917
|
+
<div class="overview-audio-title" :title="item.title">
|
|
1918
|
+
{{ item.title || cat.label }}
|
|
1919
|
+
</div>
|
|
1920
|
+
</div>
|
|
1921
|
+
|
|
1922
|
+
<!-- 视频卡片 -->
|
|
1923
|
+
<VideoCoverThumb
|
|
1924
|
+
v-else-if="cat.subType === 'Videos' || isVideoMaterial(item) || isVideoUrl(getMaterialThumb(item))"
|
|
1925
|
+
:video-url="item.sourceUrl || item.url || getMaterialThumb(item)"
|
|
1926
|
+
:cover-url="item.coverUrl || item.image || item.thumbnail || (!isVideoUrl(item.previewUrl) ? item.previewUrl : '')"
|
|
1927
|
+
:alt="item.title || cat.label"
|
|
1928
|
+
class="overview-thumb-img"
|
|
1929
|
+
@loaded="updateRowScrollState(cat.key)"
|
|
1930
|
+
/>
|
|
1931
|
+
|
|
1932
|
+
<!-- 图片 / 矢量 / 插画 / 图标卡片 -->
|
|
1933
|
+
<img
|
|
1934
|
+
v-else-if="getMaterialThumb(item)"
|
|
1935
|
+
:src="getMaterialThumb(item)"
|
|
1936
|
+
:alt="item.title || cat.label"
|
|
1937
|
+
loading="lazy"
|
|
1938
|
+
class="overview-thumb-img"
|
|
1939
|
+
:class="{ 'is-icon-img': cat.subType === 'Icons' || isIconMaterial(item) }"
|
|
1940
|
+
@load="updateRowScrollState(cat.key)"
|
|
1941
|
+
/>
|
|
1942
|
+
<span v-if="cat.subType === 'Videos' || isVideoMaterial(item)" class="video-badge-icon">
|
|
1943
|
+
<el-icon><VideoPlay /></el-icon>
|
|
1944
|
+
</span>
|
|
1945
|
+
<button
|
|
1946
|
+
v-if="
|
|
1947
|
+
isDamLoggedIn &&
|
|
1948
|
+
cat.subType !== 'Videos' &&
|
|
1949
|
+
cat.subType !== 'Music' &&
|
|
1950
|
+
cat.subType !== 'Sound_Effects' &&
|
|
1951
|
+
!isVideoMaterial(item) &&
|
|
1952
|
+
!isAudioMaterial(item) &&
|
|
1953
|
+
getMaterialThumb(item)
|
|
1954
|
+
"
|
|
1955
|
+
type="button"
|
|
1956
|
+
class="overview-card-ref-btn"
|
|
1957
|
+
title="作为参考图发送到「AI生成」"
|
|
1958
|
+
@click.stop.prevent="handleSendToCreateRef(item, $event)"
|
|
1959
|
+
>
|
|
1960
|
+
@参考
|
|
1961
|
+
</button>
|
|
1962
|
+
</div>
|
|
1963
|
+
</template>
|
|
1964
|
+
|
|
1965
|
+
<!-- 空状态兜底 -->
|
|
1966
|
+
<div v-else class="overview-empty-row" @click="openCategoryDetail(cat.subType)">
|
|
1967
|
+
<span>暂无{{ cat.label }}数据</span>
|
|
1968
|
+
</div>
|
|
1969
|
+
</div>
|
|
1970
|
+
|
|
1971
|
+
<!-- 左侧渐变与左滑箭头 -->
|
|
1972
|
+
<div
|
|
1973
|
+
v-if="rowScrollState[cat.key]?.canLeft"
|
|
1974
|
+
class="carousel-edge-mask left-mask"
|
|
1975
|
+
@click.stop="scrollCategoryRow(cat.key, 'left')"
|
|
1976
|
+
>
|
|
1977
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2"
|
|
1978
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
1979
|
+
<polyline points="15 18 9 12 15 6" />
|
|
1980
|
+
</svg>
|
|
1981
|
+
</div>
|
|
1982
|
+
|
|
1983
|
+
<!-- 右侧渐变与右滑箭头 -->
|
|
1984
|
+
<div
|
|
1985
|
+
v-if="rowScrollState[cat.key]?.canRight"
|
|
1986
|
+
class="carousel-edge-mask right-mask"
|
|
1987
|
+
@click.stop="scrollCategoryRow(cat.key, 'right')"
|
|
1988
|
+
>
|
|
1989
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2"
|
|
1990
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
1991
|
+
<polyline points="9 18 15 12 9 6" />
|
|
1992
|
+
</svg>
|
|
1993
|
+
</div>
|
|
1994
|
+
</div>
|
|
1995
|
+
</div>
|
|
1996
|
+
</div>
|
|
1997
|
+
</div>
|
|
1998
|
+
|
|
1999
|
+
<!-- ==================== 图三:分类/搜索详情瀑布流视图(共用顶部搜索与筛选,移除旧分类胶囊) ==================== -->
|
|
2000
|
+
<div v-else class="material-detail-body">
|
|
2001
|
+
<!-- 加载中状态 -->
|
|
2002
|
+
<div v-if="loading && displayedMaterials.length === 0" class="gallery-loading-box">
|
|
2003
|
+
<div class="loading-ring-spinner"></div>
|
|
2004
|
+
<span class="loading-tip-text">正在加载{{ subTypeNameMap[filterParams.activeSubType] }}...</span>
|
|
2005
|
+
</div>
|
|
2006
|
+
|
|
2007
|
+
<!-- 双列瀑布流列表 -->
|
|
2008
|
+
<div v-else class="detail-waterfall-scroll">
|
|
2009
|
+
<div v-if="displayedMaterials.length > 0" class="detail-masonry-wrapper">
|
|
2010
|
+
<div class="detail-masonry-columns">
|
|
2011
|
+
<div
|
|
2012
|
+
v-for="(colItems, colIdx) in waterfallColumns"
|
|
2013
|
+
:key="colIdx"
|
|
1217
2014
|
class="detail-masonry-col"
|
|
1218
2015
|
>
|
|
1219
2016
|
<div
|
|
1220
2017
|
v-for="(item, idx) in colItems"
|
|
1221
2018
|
:key="item.id || idx"
|
|
1222
2019
|
class="detail-masonry-card"
|
|
2020
|
+
:class="{
|
|
2021
|
+
'is-icon-card': filterParams.activeSubType === 'Icons' || isIconMaterial(item),
|
|
2022
|
+
'is-audio-card': filterParams.activeSubType === 'Music' || filterParams.activeSubType === 'Sound_Effects' || isAudioMaterial(item)
|
|
2023
|
+
}"
|
|
1223
2024
|
@click.stop="handleSelectMaterial(item)"
|
|
1224
2025
|
>
|
|
2026
|
+
<!-- 详情页音频/音效卡片 -->
|
|
2027
|
+
<div
|
|
2028
|
+
v-if="filterParams.activeSubType === 'Music' || filterParams.activeSubType === 'Sound_Effects' || isAudioMaterial(item)"
|
|
2029
|
+
class="detail-audio-inner"
|
|
2030
|
+
:class="{
|
|
2031
|
+
'is-sfx': filterParams.activeSubType === 'Sound_Effects' || item.assetSubType === 'Sound_Effects' || item.subType === 'Sound_Effects',
|
|
2032
|
+
'is-playing': playingAudioId === item.id
|
|
2033
|
+
}"
|
|
2034
|
+
>
|
|
2035
|
+
<div class="detail-audio-header">
|
|
2036
|
+
<button
|
|
2037
|
+
type="button"
|
|
2038
|
+
class="audio-play-toggle-btn"
|
|
2039
|
+
:title="playingAudioId === item.id ? '暂停试听' : '点击试听'"
|
|
2040
|
+
@click.stop="toggleInlineAudioPlay(item, $event)"
|
|
2041
|
+
>
|
|
2042
|
+
<svg
|
|
2043
|
+
v-if="playingAudioId === item.id"
|
|
2044
|
+
viewBox="0 0 24 24"
|
|
2045
|
+
width="13"
|
|
2046
|
+
height="13"
|
|
2047
|
+
fill="currentColor"
|
|
2048
|
+
>
|
|
2049
|
+
<rect x="6" y="5" width="4" height="14" rx="1" />
|
|
2050
|
+
<rect x="14" y="5" width="4" height="14" rx="1" />
|
|
2051
|
+
</svg>
|
|
2052
|
+
<svg
|
|
2053
|
+
v-else
|
|
2054
|
+
viewBox="0 0 24 24"
|
|
2055
|
+
width="13"
|
|
2056
|
+
height="13"
|
|
2057
|
+
fill="currentColor"
|
|
2058
|
+
>
|
|
2059
|
+
<polygon points="7 4 20 12 7 20 7 4" />
|
|
2060
|
+
</svg>
|
|
2061
|
+
</button>
|
|
2062
|
+
<div class="audio-wave-bars" :class="{ active: playingAudioId === item.id }">
|
|
2063
|
+
<span></span>
|
|
2064
|
+
<span></span>
|
|
2065
|
+
<span></span>
|
|
2066
|
+
<span></span>
|
|
2067
|
+
<span></span>
|
|
2068
|
+
<span></span>
|
|
2069
|
+
</div>
|
|
2070
|
+
</div>
|
|
2071
|
+
<div class="detail-audio-title" :title="item.title">
|
|
2072
|
+
{{ item.title || subTypeNameMap[filterParams.activeSubType] }}
|
|
2073
|
+
</div>
|
|
2074
|
+
<div class="detail-audio-meta">
|
|
2075
|
+
<span class="detail-audio-badge">{{ getItemFormat(item) }}</span>
|
|
2076
|
+
<span v-if="formatAudioDuration(item.duration)" class="detail-audio-dur">
|
|
2077
|
+
{{ formatAudioDuration(item.duration) }}
|
|
2078
|
+
</span>
|
|
2079
|
+
</div>
|
|
2080
|
+
</div>
|
|
2081
|
+
|
|
2082
|
+
<!-- 详情页视频卡片 -->
|
|
1225
2083
|
<VideoCoverThumb
|
|
1226
|
-
v-if="filterParams.activeSubType === 'Videos' || isVideoMaterial(item) || isVideoUrl(getMaterialThumb(item))"
|
|
2084
|
+
v-else-if="filterParams.activeSubType === 'Videos' || isVideoMaterial(item) || isVideoUrl(getMaterialThumb(item))"
|
|
1227
2085
|
:video-url="item.sourceUrl || item.url || getMaterialThumb(item)"
|
|
1228
2086
|
:cover-url="item.coverUrl || item.image || item.thumbnail || (!isVideoUrl(item.previewUrl) ? item.previewUrl : '')"
|
|
1229
2087
|
:alt="item.title || '素材'"
|
|
1230
2088
|
class="detail-card-img"
|
|
1231
2089
|
/>
|
|
2090
|
+
|
|
2091
|
+
<!-- 详情页图片 / 矢量 / 插画 / 图标卡片 -->
|
|
1232
2092
|
<img
|
|
1233
2093
|
v-else-if="getMaterialThumb(item)"
|
|
1234
2094
|
:src="getMaterialThumb(item)"
|
|
1235
2095
|
:alt="item.title || '素材'"
|
|
1236
2096
|
loading="lazy"
|
|
1237
2097
|
class="detail-card-img"
|
|
2098
|
+
:class="{ 'is-icon-img': filterParams.activeSubType === 'Icons' || isIconMaterial(item) }"
|
|
1238
2099
|
/>
|
|
1239
2100
|
<div v-else class="detail-card-placeholder">
|
|
1240
2101
|
<svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="#94a3b8" stroke-width="1.5">
|
|
@@ -1250,7 +2111,15 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1250
2111
|
|
|
1251
2112
|
<!-- 悬浮设为参考图按钮 -->
|
|
1252
2113
|
<button
|
|
1253
|
-
v-if="
|
|
2114
|
+
v-if="
|
|
2115
|
+
isDamLoggedIn &&
|
|
2116
|
+
filterParams.activeSubType !== 'Videos' &&
|
|
2117
|
+
filterParams.activeSubType !== 'Music' &&
|
|
2118
|
+
filterParams.activeSubType !== 'Sound_Effects' &&
|
|
2119
|
+
!isVideoMaterial(item) &&
|
|
2120
|
+
!isAudioMaterial(item) &&
|
|
2121
|
+
getMaterialThumb(item)
|
|
2122
|
+
"
|
|
1254
2123
|
type="button"
|
|
1255
2124
|
class="detail-card-ref-btn"
|
|
1256
2125
|
title="作为参考图发送到「AI生成」"
|
|
@@ -1261,10 +2130,10 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1261
2130
|
|
|
1262
2131
|
<!-- 悬浮预览小按钮 -->
|
|
1263
2132
|
<button
|
|
1264
|
-
v-if="getMaterialThumb(item)"
|
|
2133
|
+
v-if="getMaterialThumb(item) || isAudioMaterial(item)"
|
|
1265
2134
|
type="button"
|
|
1266
2135
|
class="detail-card-preview-btn"
|
|
1267
|
-
title="大图预览"
|
|
2136
|
+
:title="isAudioMaterial(item) ? '全屏试听' : '大图预览'"
|
|
1268
2137
|
@click.stop.prevent="openPreview(item, $event)"
|
|
1269
2138
|
>
|
|
1270
2139
|
<el-icon><View /></el-icon>
|
|
@@ -1373,8 +2242,27 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1373
2242
|
</button>
|
|
1374
2243
|
|
|
1375
2244
|
<div class="preview-stage-viewport" @click.self="closePreview">
|
|
2245
|
+
<div
|
|
2246
|
+
v-if="currentPreviewItem?.isAudio && currentPreviewItem?.url"
|
|
2247
|
+
class="preview-audio-stage-card"
|
|
2248
|
+
>
|
|
2249
|
+
<div class="preview-audio-disc">
|
|
2250
|
+
<svg viewBox="0 0 24 24" width="38" height="38" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
2251
|
+
<path d="M9 18V5l12-2v13" />
|
|
2252
|
+
<circle cx="6" cy="18" r="3" />
|
|
2253
|
+
<circle cx="18" cy="16" r="3" />
|
|
2254
|
+
</svg>
|
|
2255
|
+
</div>
|
|
2256
|
+
<div class="preview-audio-stage-title">{{ currentPreviewItem.title }}</div>
|
|
2257
|
+
<audio
|
|
2258
|
+
:src="currentPreviewItem.url"
|
|
2259
|
+
controls
|
|
2260
|
+
autoplay
|
|
2261
|
+
class="preview-stage-audio-el"
|
|
2262
|
+
/>
|
|
2263
|
+
</div>
|
|
1376
2264
|
<video
|
|
1377
|
-
v-if="currentPreviewItem?.isVideo && currentPreviewItem?.url"
|
|
2265
|
+
v-else-if="currentPreviewItem?.isVideo && currentPreviewItem?.url"
|
|
1378
2266
|
:src="currentPreviewItem.url"
|
|
1379
2267
|
controls
|
|
1380
2268
|
autoplay
|
|
@@ -1580,68 +2468,597 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1580
2468
|
}
|
|
1581
2469
|
}
|
|
1582
2470
|
|
|
1583
|
-
/* ====================
|
|
1584
|
-
.
|
|
2471
|
+
/* ==================== 联网搜索:共用搜索栏 + 复合悬浮筛选面板 ==================== */
|
|
2472
|
+
.stock-search-filter-header {
|
|
2473
|
+
padding: 10px 14px 6px;
|
|
2474
|
+
flex-shrink: 0;
|
|
2475
|
+
position: relative;
|
|
2476
|
+
z-index: 40;
|
|
2477
|
+
background: #ffffff;
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
.stock-search-bar-wrapper {
|
|
2481
|
+
position: relative;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
.stock-search-box {
|
|
2485
|
+
display: flex;
|
|
2486
|
+
align-items: center;
|
|
2487
|
+
height: 34px;
|
|
2488
|
+
background: #f8fafc;
|
|
2489
|
+
border: 1px solid #cbd5e1;
|
|
2490
|
+
border-radius: 8px;
|
|
2491
|
+
padding: 0 6px 0 10px;
|
|
2492
|
+
box-sizing: border-box;
|
|
2493
|
+
transition: all 0.18s ease;
|
|
2494
|
+
|
|
2495
|
+
&:focus-within,
|
|
2496
|
+
&.is-filter-open {
|
|
2497
|
+
background: #ffffff;
|
|
2498
|
+
border-color: #2563eb;
|
|
2499
|
+
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
.stock-search-icon {
|
|
2504
|
+
font-size: 14px;
|
|
2505
|
+
color: #94a3b8;
|
|
2506
|
+
cursor: pointer;
|
|
2507
|
+
flex-shrink: 0;
|
|
2508
|
+
margin-right: 6px;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
.stock-search-input {
|
|
1585
2512
|
flex: 1;
|
|
1586
|
-
min-
|
|
2513
|
+
min-width: 0;
|
|
2514
|
+
border: none;
|
|
2515
|
+
outline: none;
|
|
2516
|
+
background: transparent;
|
|
2517
|
+
font-size: 12.5px;
|
|
2518
|
+
color: #1e293b;
|
|
2519
|
+
|
|
2520
|
+
&::placeholder {
|
|
2521
|
+
color: #94a3b8;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
.stock-clear-kw-btn {
|
|
2526
|
+
width: 18px;
|
|
2527
|
+
height: 18px;
|
|
2528
|
+
border-radius: 50%;
|
|
2529
|
+
border: none;
|
|
2530
|
+
background: #e2e8f0;
|
|
2531
|
+
color: #64748b;
|
|
2532
|
+
display: inline-flex;
|
|
2533
|
+
align-items: center;
|
|
2534
|
+
justify-content: center;
|
|
2535
|
+
cursor: pointer;
|
|
2536
|
+
margin-right: 4px;
|
|
2537
|
+
padding: 0;
|
|
2538
|
+
font-size: 12px;
|
|
2539
|
+
line-height: 1;
|
|
2540
|
+
flex-shrink: 0;
|
|
2541
|
+
|
|
2542
|
+
&:hover {
|
|
2543
|
+
background: #cbd5e1;
|
|
2544
|
+
color: #1e293b;
|
|
2545
|
+
}
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
.stock-search-divider {
|
|
2549
|
+
width: 1px;
|
|
2550
|
+
height: 16px;
|
|
2551
|
+
background: #e2e8f0;
|
|
2552
|
+
margin: 0 4px;
|
|
2553
|
+
flex-shrink: 0;
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
.stock-filter-trigger-btn {
|
|
2557
|
+
position: relative;
|
|
2558
|
+
width: 26px;
|
|
2559
|
+
height: 24px;
|
|
2560
|
+
border: none;
|
|
2561
|
+
background: transparent;
|
|
2562
|
+
color: #64748b;
|
|
2563
|
+
border-radius: 6px;
|
|
2564
|
+
cursor: pointer;
|
|
2565
|
+
display: flex;
|
|
2566
|
+
align-items: center;
|
|
2567
|
+
justify-content: center;
|
|
2568
|
+
padding: 0;
|
|
2569
|
+
transition: all 0.15s;
|
|
2570
|
+
flex-shrink: 0;
|
|
2571
|
+
|
|
2572
|
+
&:hover:not(.is-disabled) {
|
|
2573
|
+
color: #1e293b;
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
&.is-active {
|
|
2577
|
+
background: transparent;
|
|
2578
|
+
color: #2563eb;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
&.is-disabled {
|
|
2582
|
+
color: #cbd5e1;
|
|
2583
|
+
cursor: not-allowed;
|
|
2584
|
+
opacity: 0.55;
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
.stock-filter-count-dot {
|
|
2589
|
+
position: absolute;
|
|
2590
|
+
top: -3px;
|
|
2591
|
+
right: -3px;
|
|
2592
|
+
min-width: 14px;
|
|
2593
|
+
height: 14px;
|
|
2594
|
+
padding: 0 3px;
|
|
2595
|
+
border-radius: 999px;
|
|
2596
|
+
background: #2563eb;
|
|
2597
|
+
color: #ffffff;
|
|
2598
|
+
font-size: 9px;
|
|
2599
|
+
font-weight: 700;
|
|
2600
|
+
display: inline-flex;
|
|
2601
|
+
align-items: center;
|
|
2602
|
+
justify-content: center;
|
|
2603
|
+
border: 1.5px solid #ffffff;
|
|
2604
|
+
line-height: 1;
|
|
2605
|
+
box-sizing: border-box;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
.stock-active-filter-chips {
|
|
2609
|
+
display: flex;
|
|
2610
|
+
flex-wrap: wrap;
|
|
2611
|
+
gap: 5px;
|
|
2612
|
+
margin-top: 8px;
|
|
2613
|
+
padding-top: 2px;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
.stock-filter-chip {
|
|
2617
|
+
display: inline-flex;
|
|
2618
|
+
align-items: center;
|
|
2619
|
+
gap: 4px;
|
|
2620
|
+
padding: 2px 7px;
|
|
2621
|
+
background: #eff6ff;
|
|
2622
|
+
border: 1px solid #bfdbfe;
|
|
2623
|
+
border-radius: 999px;
|
|
2624
|
+
font-size: 11px;
|
|
2625
|
+
color: #1d4ed8;
|
|
2626
|
+
font-weight: 500;
|
|
2627
|
+
cursor: pointer;
|
|
2628
|
+
transition: all 0.15s;
|
|
2629
|
+
|
|
2630
|
+
&:hover {
|
|
2631
|
+
background: #dbeafe;
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
.stock-chip-color-dot {
|
|
2636
|
+
width: 8px;
|
|
2637
|
+
height: 8px;
|
|
2638
|
+
border-radius: 50%;
|
|
2639
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
2640
|
+
flex-shrink: 0;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
.stock-chip-close {
|
|
2644
|
+
font-size: 12px;
|
|
2645
|
+
line-height: 1;
|
|
2646
|
+
color: #60a5fa;
|
|
2647
|
+
margin-left: 1px;
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
.stock-filter-chip:hover .stock-chip-close {
|
|
2651
|
+
color: #1d4ed8;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
.stock-filter-popover {
|
|
2655
|
+
position: absolute;
|
|
2656
|
+
top: calc(100% + 8px);
|
|
2657
|
+
left: 0;
|
|
2658
|
+
right: 0;
|
|
2659
|
+
background: #ffffff;
|
|
2660
|
+
border: 1px solid #e2e8f0;
|
|
2661
|
+
border-radius: 12px;
|
|
2662
|
+
box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.18), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
|
|
2663
|
+
z-index: 100;
|
|
1587
2664
|
display: flex;
|
|
1588
2665
|
flex-direction: column;
|
|
2666
|
+
max-height: 520px;
|
|
1589
2667
|
overflow: hidden;
|
|
2668
|
+
animation: stockPopoverSlideIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
|
|
1590
2669
|
}
|
|
1591
2670
|
|
|
1592
|
-
|
|
1593
|
-
|
|
2671
|
+
@keyframes stockPopoverSlideIn {
|
|
2672
|
+
from {
|
|
2673
|
+
opacity: 0;
|
|
2674
|
+
transform: translateY(-6px) scale(0.98);
|
|
2675
|
+
}
|
|
2676
|
+
to {
|
|
2677
|
+
opacity: 1;
|
|
2678
|
+
transform: translateY(0) scale(1);
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
.stock-filter-popover-body {
|
|
2683
|
+
padding: 14px 14px 10px;
|
|
2684
|
+
overflow-y: auto;
|
|
2685
|
+
scrollbar-width: thin;
|
|
2686
|
+
scrollbar-color: #cbd5e1 transparent;
|
|
2687
|
+
|
|
2688
|
+
&::-webkit-scrollbar {
|
|
2689
|
+
width: 4px;
|
|
2690
|
+
}
|
|
2691
|
+
&::-webkit-scrollbar-thumb {
|
|
2692
|
+
background: #cbd5e1;
|
|
2693
|
+
border-radius: 4px;
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
|
|
2697
|
+
.stock-filter-scope-tip {
|
|
2698
|
+
margin-bottom: 12px;
|
|
2699
|
+
padding: 5px 8px;
|
|
2700
|
+
border-radius: 6px;
|
|
2701
|
+
background: #f8fafc;
|
|
2702
|
+
border: 1px solid #e2e8f0;
|
|
2703
|
+
font-size: 11px;
|
|
2704
|
+
line-height: 1.4;
|
|
2705
|
+
color: #64748b;
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
.stock-filter-section {
|
|
2709
|
+
margin-bottom: 14px;
|
|
2710
|
+
|
|
2711
|
+
&:last-child {
|
|
2712
|
+
margin-bottom: 4px;
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
.stock-filter-section-header {
|
|
2717
|
+
display: flex;
|
|
2718
|
+
align-items: center;
|
|
2719
|
+
justify-content: space-between;
|
|
2720
|
+
margin-bottom: 8px;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
.stock-filter-section-title {
|
|
2724
|
+
font-size: 12.5px;
|
|
2725
|
+
font-weight: 600;
|
|
2726
|
+
color: #1e293b;
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
.stock-filter-section-sub {
|
|
2730
|
+
font-size: 11px;
|
|
2731
|
+
color: #64748b;
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
/* 1. 颜色圆点矩阵 */
|
|
2735
|
+
.stock-color-grid {
|
|
2736
|
+
display: grid;
|
|
2737
|
+
grid-template-columns: repeat(7, 1fr);
|
|
2738
|
+
gap: 8px 6px;
|
|
2739
|
+
justify-items: center;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
.stock-color-swatch {
|
|
2743
|
+
width: 24px;
|
|
2744
|
+
height: 24px;
|
|
2745
|
+
border-radius: 50%;
|
|
2746
|
+
cursor: pointer;
|
|
2747
|
+
position: relative;
|
|
2748
|
+
display: flex;
|
|
2749
|
+
align-items: center;
|
|
2750
|
+
justify-content: center;
|
|
2751
|
+
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
2752
|
+
border: 1px solid rgba(15, 23, 42, 0.08);
|
|
2753
|
+
background-origin: border-box;
|
|
2754
|
+
background-clip: border-box;
|
|
2755
|
+
background-repeat: no-repeat;
|
|
2756
|
+
overflow: hidden;
|
|
2757
|
+
box-sizing: border-box;
|
|
2758
|
+
|
|
2759
|
+
&:hover {
|
|
2760
|
+
transform: scale(1.12);
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
&.is-none {
|
|
2764
|
+
background: #ffffff;
|
|
2765
|
+
border: 1.5px solid #94a3b8;
|
|
2766
|
+
color: #64748b;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
&.is-white,
|
|
2770
|
+
&.is-grayscale {
|
|
2771
|
+
border: 1px solid #cbd5e1;
|
|
2772
|
+
}
|
|
2773
|
+
|
|
2774
|
+
&.selected {
|
|
2775
|
+
box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px #2563eb;
|
|
2776
|
+
transform: scale(1.06);
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
/* 2. 画幅比例 2列单选框 */
|
|
2781
|
+
.stock-orientation-grid {
|
|
2782
|
+
display: grid;
|
|
2783
|
+
grid-template-columns: 1fr 1fr;
|
|
2784
|
+
gap: 7px 10px;
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
.stock-radio-item {
|
|
2788
|
+
display: flex;
|
|
2789
|
+
align-items: center;
|
|
2790
|
+
gap: 7px;
|
|
2791
|
+
padding: 4px 2px;
|
|
2792
|
+
border-radius: 7px;
|
|
2793
|
+
cursor: pointer;
|
|
2794
|
+
transition: all 0.14s;
|
|
2795
|
+
border: 1px solid transparent;
|
|
2796
|
+
background: transparent;
|
|
2797
|
+
|
|
2798
|
+
&:hover:not(.disabled) .stock-radio-circle {
|
|
2799
|
+
border-color: #94a3b8;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2802
|
+
&.selected {
|
|
2803
|
+
background: transparent;
|
|
2804
|
+
border-color: transparent;
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
&.disabled {
|
|
2808
|
+
opacity: 0.42;
|
|
2809
|
+
cursor: not-allowed;
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
.stock-radio-circle {
|
|
2814
|
+
width: 15px;
|
|
2815
|
+
height: 15px;
|
|
2816
|
+
border-radius: 50%;
|
|
2817
|
+
border: 1.5px solid #cbd5e1;
|
|
2818
|
+
display: flex;
|
|
2819
|
+
align-items: center;
|
|
2820
|
+
justify-content: center;
|
|
1594
2821
|
flex-shrink: 0;
|
|
2822
|
+
background: #ffffff;
|
|
2823
|
+
transition: all 0.15s;
|
|
2824
|
+
box-sizing: border-box;
|
|
2825
|
+
|
|
2826
|
+
&::after {
|
|
2827
|
+
content: "";
|
|
2828
|
+
width: 5px;
|
|
2829
|
+
height: 5px;
|
|
2830
|
+
border-radius: 50%;
|
|
2831
|
+
background: #ffffff;
|
|
2832
|
+
opacity: 0;
|
|
2833
|
+
transition: opacity 0.15s;
|
|
2834
|
+
}
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
.stock-radio-item.selected .stock-radio-circle {
|
|
2838
|
+
border-color: #2563eb;
|
|
2839
|
+
background: #2563eb;
|
|
2840
|
+
|
|
2841
|
+
&::after {
|
|
2842
|
+
opacity: 1;
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
.stock-radio-label {
|
|
2847
|
+
font-size: 12px;
|
|
2848
|
+
color: #334155;
|
|
2849
|
+
font-weight: 500;
|
|
2850
|
+
white-space: nowrap;
|
|
1595
2851
|
}
|
|
1596
2852
|
|
|
1597
|
-
.
|
|
2853
|
+
.stock-radio-item.selected .stock-radio-label {
|
|
2854
|
+
color: #1d4ed8;
|
|
2855
|
+
font-weight: 600;
|
|
2856
|
+
}
|
|
2857
|
+
|
|
2858
|
+
/* 3. 题材分类 3列胶囊 */
|
|
2859
|
+
.stock-topic-pills-wrap {
|
|
2860
|
+
display: grid;
|
|
2861
|
+
grid-template-columns: repeat(3, 1fr);
|
|
2862
|
+
gap: 6px;
|
|
2863
|
+
}
|
|
2864
|
+
|
|
2865
|
+
.stock-topic-pill {
|
|
2866
|
+
padding: 5px 4px;
|
|
2867
|
+
text-align: center;
|
|
2868
|
+
font-size: 11.5px;
|
|
2869
|
+
color: #475569;
|
|
2870
|
+
background: #f8fafc;
|
|
2871
|
+
border: 1px solid #e2e8f0;
|
|
2872
|
+
border-radius: 6px;
|
|
2873
|
+
cursor: pointer;
|
|
2874
|
+
transition: all 0.14s;
|
|
2875
|
+
white-space: nowrap;
|
|
2876
|
+
overflow: hidden;
|
|
2877
|
+
text-overflow: ellipsis;
|
|
2878
|
+
|
|
2879
|
+
&:hover {
|
|
2880
|
+
background: #f1f5f9;
|
|
2881
|
+
color: #1e293b;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
&.selected {
|
|
2885
|
+
background: #eff6ff;
|
|
2886
|
+
color: #2563eb;
|
|
2887
|
+
border-color: #93c5fd;
|
|
2888
|
+
font-weight: 600;
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
.stock-topic-expand-btn {
|
|
2893
|
+
grid-column: span 3;
|
|
2894
|
+
border: none;
|
|
2895
|
+
background: transparent;
|
|
2896
|
+
color: #2563eb;
|
|
2897
|
+
font-size: 11.5px;
|
|
2898
|
+
padding: 3px 0;
|
|
2899
|
+
cursor: pointer;
|
|
1598
2900
|
display: flex;
|
|
1599
2901
|
align-items: center;
|
|
1600
|
-
|
|
1601
|
-
|
|
2902
|
+
justify-content: center;
|
|
2903
|
+
gap: 3px;
|
|
2904
|
+
|
|
2905
|
+
&:hover {
|
|
2906
|
+
text-decoration: underline;
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
/* 4. 尺寸大小 */
|
|
2911
|
+
.stock-size-presets-grid {
|
|
2912
|
+
display: grid;
|
|
2913
|
+
grid-template-columns: repeat(2, 1fr);
|
|
2914
|
+
gap: 6px;
|
|
2915
|
+
margin-bottom: 8px;
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
.stock-size-pill {
|
|
2919
|
+
padding: 6px 10px;
|
|
2920
|
+
font-size: 12px;
|
|
2921
|
+
color: #334155;
|
|
2922
|
+
background: #f8fafc;
|
|
1602
2923
|
border: 1px solid #e2e8f0;
|
|
2924
|
+
border-radius: 7px;
|
|
2925
|
+
cursor: pointer;
|
|
2926
|
+
display: flex;
|
|
2927
|
+
flex-direction: column;
|
|
2928
|
+
align-items: flex-start;
|
|
2929
|
+
justify-content: center;
|
|
2930
|
+
gap: 2px;
|
|
2931
|
+
min-height: 42px;
|
|
2932
|
+
white-space: nowrap;
|
|
2933
|
+
box-sizing: border-box;
|
|
2934
|
+
transition: all 0.14s;
|
|
2935
|
+
|
|
2936
|
+
&.is-all-size {
|
|
2937
|
+
grid-column: span 2;
|
|
2938
|
+
flex-direction: row;
|
|
2939
|
+
align-items: center;
|
|
2940
|
+
justify-content: space-between;
|
|
2941
|
+
min-height: 32px;
|
|
2942
|
+
padding: 5px 10px;
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
&:hover {
|
|
2946
|
+
background: #f1f5f9;
|
|
2947
|
+
border-color: #cbd5e1;
|
|
2948
|
+
}
|
|
2949
|
+
|
|
2950
|
+
&.selected {
|
|
2951
|
+
background: #eff6ff;
|
|
2952
|
+
color: #2563eb;
|
|
2953
|
+
border-color: #93c5fd;
|
|
2954
|
+
font-weight: 600;
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
.stock-size-pill-title {
|
|
2959
|
+
font-size: 12px;
|
|
2960
|
+
line-height: 1.2;
|
|
2961
|
+
white-space: nowrap;
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
.stock-size-pill-sub {
|
|
2965
|
+
font-size: 10.5px;
|
|
2966
|
+
line-height: 1.2;
|
|
2967
|
+
color: #94a3b8;
|
|
2968
|
+
font-weight: 400;
|
|
2969
|
+
white-space: nowrap;
|
|
2970
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2973
|
+
.stock-size-pill.selected .stock-size-pill-sub {
|
|
2974
|
+
color: #3b82f6;
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
.stock-custom-size-row {
|
|
2978
|
+
display: flex;
|
|
2979
|
+
align-items: center;
|
|
2980
|
+
gap: 6px;
|
|
2981
|
+
}
|
|
2982
|
+
|
|
2983
|
+
.stock-size-input {
|
|
2984
|
+
flex: 1;
|
|
2985
|
+
width: 0;
|
|
2986
|
+
height: 28px;
|
|
2987
|
+
border: 1px solid #cbd5e1;
|
|
1603
2988
|
border-radius: 6px;
|
|
1604
|
-
padding: 0
|
|
1605
|
-
|
|
2989
|
+
padding: 0 8px;
|
|
2990
|
+
font-size: 11.5px;
|
|
2991
|
+
color: #1e293b;
|
|
2992
|
+
outline: none;
|
|
2993
|
+
background: #ffffff;
|
|
1606
2994
|
box-sizing: border-box;
|
|
1607
|
-
|
|
2995
|
+
-moz-appearance: textfield;
|
|
2996
|
+
appearance: textfield;
|
|
2997
|
+
|
|
2998
|
+
&:focus {
|
|
2999
|
+
border-color: #2563eb;
|
|
3000
|
+
}
|
|
1608
3001
|
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
3002
|
+
&::-webkit-outer-spin-button,
|
|
3003
|
+
&::-webkit-inner-spin-button {
|
|
3004
|
+
-webkit-appearance: none;
|
|
3005
|
+
margin: 0;
|
|
1612
3006
|
}
|
|
1613
3007
|
}
|
|
1614
3008
|
|
|
1615
|
-
.
|
|
1616
|
-
font-size:
|
|
3009
|
+
.stock-size-mul {
|
|
3010
|
+
font-size: 12px;
|
|
1617
3011
|
color: #94a3b8;
|
|
1618
|
-
cursor: pointer;
|
|
1619
|
-
flex-shrink: 0;
|
|
1620
3012
|
}
|
|
1621
3013
|
|
|
1622
|
-
.
|
|
3014
|
+
.stock-filter-popover-footer {
|
|
3015
|
+
padding: 10px 14px;
|
|
3016
|
+
border-top: 1px solid #f1f5f9;
|
|
3017
|
+
background: #ffffff;
|
|
3018
|
+
display: flex;
|
|
3019
|
+
align-items: center;
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
.stock-clear-all-btn {
|
|
1623
3023
|
flex: 1;
|
|
1624
|
-
|
|
1625
|
-
border:
|
|
1626
|
-
|
|
1627
|
-
background:
|
|
1628
|
-
|
|
1629
|
-
|
|
3024
|
+
height: 32px;
|
|
3025
|
+
border-radius: 8px;
|
|
3026
|
+
border: 1px solid #e2e8f0;
|
|
3027
|
+
background: #ffffff;
|
|
3028
|
+
color: #94a3b8;
|
|
3029
|
+
font-size: 12.5px;
|
|
3030
|
+
font-weight: 500;
|
|
3031
|
+
cursor: not-allowed;
|
|
3032
|
+
transition: all 0.15s;
|
|
1630
3033
|
|
|
1631
|
-
|
|
1632
|
-
color: #
|
|
3034
|
+
&.has-active {
|
|
3035
|
+
color: #334155;
|
|
3036
|
+
border-color: #cbd5e1;
|
|
3037
|
+
cursor: pointer;
|
|
3038
|
+
|
|
3039
|
+
&:hover {
|
|
3040
|
+
background: #f8fafc;
|
|
3041
|
+
color: #0f172a;
|
|
3042
|
+
border-color: #94a3b8;
|
|
3043
|
+
}
|
|
1633
3044
|
}
|
|
1634
3045
|
}
|
|
1635
3046
|
|
|
1636
|
-
.
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
3047
|
+
.stock-content-dimmer {
|
|
3048
|
+
position: absolute;
|
|
3049
|
+
inset: 0;
|
|
3050
|
+
background: transparent;
|
|
3051
|
+
z-index: 25;
|
|
3052
|
+
}
|
|
1641
3053
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
3054
|
+
/* ==================== 图二:概览视图样式 ==================== */
|
|
3055
|
+
.material-overview-body {
|
|
3056
|
+
position: relative;
|
|
3057
|
+
flex: 1;
|
|
3058
|
+
min-height: 0;
|
|
3059
|
+
display: flex;
|
|
3060
|
+
flex-direction: column;
|
|
3061
|
+
overflow: hidden;
|
|
1645
3062
|
}
|
|
1646
3063
|
|
|
1647
3064
|
.overview-sections-scroll {
|
|
@@ -1738,6 +3155,24 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1738
3155
|
cursor: pointer;
|
|
1739
3156
|
position: relative;
|
|
1740
3157
|
|
|
3158
|
+
&.is-icon-card {
|
|
3159
|
+
width: 84px;
|
|
3160
|
+
border: 1px solid #f1f5f9;
|
|
3161
|
+
background-color: #f8fafc;
|
|
3162
|
+
background-image:
|
|
3163
|
+
linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
|
|
3164
|
+
linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
|
|
3165
|
+
linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
|
|
3166
|
+
linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
|
|
3167
|
+
background-size: 12px 12px;
|
|
3168
|
+
background-position: 0 0, 0 6px, 6px -6px, -6px 0;
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
&.is-audio-card {
|
|
3172
|
+
width: 146px;
|
|
3173
|
+
height: 84px;
|
|
3174
|
+
}
|
|
3175
|
+
|
|
1741
3176
|
&:hover .overview-thumb-img {
|
|
1742
3177
|
transform: scale(1.04);
|
|
1743
3178
|
}
|
|
@@ -1778,6 +3213,152 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1778
3213
|
display: block;
|
|
1779
3214
|
border-radius: 8px;
|
|
1780
3215
|
transition: transform 0.25s ease;
|
|
3216
|
+
|
|
3217
|
+
&.is-icon-img {
|
|
3218
|
+
width: 84px;
|
|
3219
|
+
height: 84px;
|
|
3220
|
+
min-width: 84px;
|
|
3221
|
+
max-width: 84px;
|
|
3222
|
+
object-fit: contain;
|
|
3223
|
+
padding: 16px;
|
|
3224
|
+
box-sizing: border-box;
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
/* 概览与详情音频卡片样式 */
|
|
3229
|
+
.overview-audio-inner {
|
|
3230
|
+
width: 100%;
|
|
3231
|
+
height: 100%;
|
|
3232
|
+
padding: 10px 10px 8px;
|
|
3233
|
+
box-sizing: border-box;
|
|
3234
|
+
display: flex;
|
|
3235
|
+
flex-direction: column;
|
|
3236
|
+
justify-content: space-between;
|
|
3237
|
+
background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
|
|
3238
|
+
border: 1px solid #dbeafe;
|
|
3239
|
+
border-radius: 8px;
|
|
3240
|
+
transition: all 0.18s ease;
|
|
3241
|
+
|
|
3242
|
+
&.is-sfx {
|
|
3243
|
+
background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
|
|
3244
|
+
border-color: #ccfbf1;
|
|
3245
|
+
}
|
|
3246
|
+
|
|
3247
|
+
&.is-playing {
|
|
3248
|
+
border-color: #3b82f6;
|
|
3249
|
+
box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.28);
|
|
3250
|
+
}
|
|
3251
|
+
|
|
3252
|
+
&:hover {
|
|
3253
|
+
filter: brightness(0.98);
|
|
3254
|
+
}
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
.overview-audio-top {
|
|
3258
|
+
display: flex;
|
|
3259
|
+
align-items: center;
|
|
3260
|
+
justify-content: space-between;
|
|
3261
|
+
gap: 6px;
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
.audio-play-toggle-btn {
|
|
3265
|
+
width: 26px;
|
|
3266
|
+
height: 26px;
|
|
3267
|
+
border-radius: 50%;
|
|
3268
|
+
border: none;
|
|
3269
|
+
background: #2563eb;
|
|
3270
|
+
color: #ffffff;
|
|
3271
|
+
display: inline-flex;
|
|
3272
|
+
align-items: center;
|
|
3273
|
+
justify-content: center;
|
|
3274
|
+
cursor: pointer;
|
|
3275
|
+
flex-shrink: 0;
|
|
3276
|
+
padding: 0;
|
|
3277
|
+
box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
|
|
3278
|
+
transition: transform 0.15s ease, background 0.15s ease;
|
|
3279
|
+
|
|
3280
|
+
&:hover {
|
|
3281
|
+
background: #1d4ed8;
|
|
3282
|
+
transform: scale(1.08);
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
.is-sfx .audio-play-toggle-btn {
|
|
3287
|
+
background: #0d9488;
|
|
3288
|
+
box-shadow: 0 2px 6px rgba(13, 148, 136, 0.26);
|
|
3289
|
+
|
|
3290
|
+
&:hover {
|
|
3291
|
+
background: #0f766e;
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
.audio-wave-bars {
|
|
3296
|
+
display: inline-flex;
|
|
3297
|
+
align-items: center;
|
|
3298
|
+
gap: 2.5px;
|
|
3299
|
+
height: 16px;
|
|
3300
|
+
flex: 1;
|
|
3301
|
+
justify-content: center;
|
|
3302
|
+
|
|
3303
|
+
span {
|
|
3304
|
+
display: inline-block;
|
|
3305
|
+
width: 2.5px;
|
|
3306
|
+
border-radius: 2px;
|
|
3307
|
+
background: #60a5fa;
|
|
3308
|
+
transition: height 0.2s ease;
|
|
3309
|
+
|
|
3310
|
+
&:nth-child(1) { height: 6px; }
|
|
3311
|
+
&:nth-child(2) { height: 12px; }
|
|
3312
|
+
&:nth-child(3) { height: 8px; }
|
|
3313
|
+
&:nth-child(4) { height: 14px; }
|
|
3314
|
+
&:nth-child(5) { height: 7px; }
|
|
3315
|
+
&:nth-child(6) { height: 10px; }
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
&.active span {
|
|
3319
|
+
background: #2563eb;
|
|
3320
|
+
animation: audioWavePulse 0.75s ease-in-out infinite alternate;
|
|
3321
|
+
|
|
3322
|
+
&:nth-child(2) { animation-delay: 0.12s; }
|
|
3323
|
+
&:nth-child(3) { animation-delay: 0.24s; }
|
|
3324
|
+
&:nth-child(4) { animation-delay: 0.08s; }
|
|
3325
|
+
&:nth-child(5) { animation-delay: 0.2s; }
|
|
3326
|
+
&:nth-child(6) { animation-delay: 0.3s; }
|
|
3327
|
+
}
|
|
3328
|
+
}
|
|
3329
|
+
|
|
3330
|
+
.is-sfx .audio-wave-bars span {
|
|
3331
|
+
background: #2dd4bf;
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
.is-sfx .audio-wave-bars.active span {
|
|
3335
|
+
background: #0d9488;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
3338
|
+
@keyframes audioWavePulse {
|
|
3339
|
+
0% { height: 4px; }
|
|
3340
|
+
100% { height: 15px; }
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
.audio-duration-tag {
|
|
3344
|
+
font-size: 10px;
|
|
3345
|
+
font-weight: 600;
|
|
3346
|
+
color: #475569;
|
|
3347
|
+
background: rgba(255, 255, 255, 0.75);
|
|
3348
|
+
padding: 1px 5px;
|
|
3349
|
+
border-radius: 4px;
|
|
3350
|
+
flex-shrink: 0;
|
|
3351
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
|
|
3352
|
+
}
|
|
3353
|
+
|
|
3354
|
+
.overview-audio-title {
|
|
3355
|
+
font-size: 11.5px;
|
|
3356
|
+
font-weight: 500;
|
|
3357
|
+
color: #1e293b;
|
|
3358
|
+
white-space: nowrap;
|
|
3359
|
+
overflow: hidden;
|
|
3360
|
+
text-overflow: ellipsis;
|
|
3361
|
+
line-height: 1.3;
|
|
1781
3362
|
}
|
|
1782
3363
|
|
|
1783
3364
|
.video-badge-icon {
|
|
@@ -1844,6 +3425,7 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1844
3425
|
|
|
1845
3426
|
/* ==================== 图三:详情视图样式 ==================== */
|
|
1846
3427
|
.material-detail-body {
|
|
3428
|
+
position: relative;
|
|
1847
3429
|
flex: 1;
|
|
1848
3430
|
min-height: 0;
|
|
1849
3431
|
display: flex;
|
|
@@ -1851,83 +3433,11 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1851
3433
|
overflow: hidden;
|
|
1852
3434
|
}
|
|
1853
3435
|
|
|
1854
|
-
.detail-tags-bar-wrap {
|
|
1855
|
-
position: relative;
|
|
1856
|
-
padding: 12px 16px 8px;
|
|
1857
|
-
flex-shrink: 0;
|
|
1858
|
-
overflow: hidden;
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
.detail-tags-track {
|
|
1862
|
-
display: flex;
|
|
1863
|
-
align-items: center;
|
|
1864
|
-
gap: 8px;
|
|
1865
|
-
overflow-x: auto;
|
|
1866
|
-
scroll-behavior: smooth;
|
|
1867
|
-
scrollbar-width: none;
|
|
1868
|
-
-ms-overflow-style: none;
|
|
1869
|
-
|
|
1870
|
-
&::-webkit-scrollbar {
|
|
1871
|
-
display: none;
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
.detail-tag-pill {
|
|
1876
|
-
height: 30px;
|
|
1877
|
-
padding: 0 14px;
|
|
1878
|
-
border-radius: 6px;
|
|
1879
|
-
border: 1px solid #e2e8f0;
|
|
1880
|
-
background: #ffffff;
|
|
1881
|
-
color: #475569;
|
|
1882
|
-
font-size: 12.5px;
|
|
1883
|
-
font-weight: 400;
|
|
1884
|
-
white-space: nowrap;
|
|
1885
|
-
flex-shrink: 0;
|
|
1886
|
-
cursor: pointer;
|
|
1887
|
-
transition: all 0.15s ease;
|
|
1888
|
-
|
|
1889
|
-
&:hover {
|
|
1890
|
-
border-color: #cbd5e1;
|
|
1891
|
-
color: #1e293b;
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
&.active {
|
|
1895
|
-
background: #ebf3ff;
|
|
1896
|
-
border-color: transparent;
|
|
1897
|
-
color: #1e6fff;
|
|
1898
|
-
font-weight: 500;
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
.tags-edge-arrow {
|
|
1903
|
-
position: absolute;
|
|
1904
|
-
top: 12px;
|
|
1905
|
-
height: 30px;
|
|
1906
|
-
width: 28px;
|
|
1907
|
-
display: flex;
|
|
1908
|
-
align-items: center;
|
|
1909
|
-
cursor: pointer;
|
|
1910
|
-
color: #334155;
|
|
1911
|
-
z-index: 2;
|
|
1912
|
-
|
|
1913
|
-
&.left-arrow {
|
|
1914
|
-
left: 16px;
|
|
1915
|
-
background: linear-gradient(90deg, #ffffff 45%, rgba(255, 255, 255, 0) 100%);
|
|
1916
|
-
justify-content: flex-start;
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
&.right-arrow {
|
|
1920
|
-
right: 16px;
|
|
1921
|
-
background: linear-gradient(270deg, #ffffff 45%, rgba(255, 255, 255, 0) 100%);
|
|
1922
|
-
justify-content: flex-end;
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
3436
|
.detail-waterfall-scroll {
|
|
1927
3437
|
flex: 1;
|
|
1928
3438
|
min-height: 0;
|
|
1929
3439
|
overflow-y: auto;
|
|
1930
|
-
padding:
|
|
3440
|
+
padding: 6px 16px 16px;
|
|
1931
3441
|
|
|
1932
3442
|
&::-webkit-scrollbar {
|
|
1933
3443
|
width: 4px;
|
|
@@ -1960,6 +3470,23 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1960
3470
|
background: #f1f5f9;
|
|
1961
3471
|
cursor: pointer;
|
|
1962
3472
|
|
|
3473
|
+
&.is-icon-card {
|
|
3474
|
+
aspect-ratio: 1 / 1;
|
|
3475
|
+
border: 1px solid #f1f5f9;
|
|
3476
|
+
background-color: #f8fafc;
|
|
3477
|
+
background-image:
|
|
3478
|
+
linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
|
|
3479
|
+
linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
|
|
3480
|
+
linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
|
|
3481
|
+
linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
|
|
3482
|
+
background-size: 14px 14px;
|
|
3483
|
+
background-position: 0 0, 0 7px, 7px -7px, -7px 0;
|
|
3484
|
+
}
|
|
3485
|
+
|
|
3486
|
+
&.is-audio-card {
|
|
3487
|
+
background: transparent;
|
|
3488
|
+
}
|
|
3489
|
+
|
|
1963
3490
|
&:hover .detail-card-img {
|
|
1964
3491
|
transform: scale(1.03);
|
|
1965
3492
|
}
|
|
@@ -1970,6 +3497,76 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1970
3497
|
}
|
|
1971
3498
|
}
|
|
1972
3499
|
|
|
3500
|
+
.detail-audio-inner {
|
|
3501
|
+
width: 100%;
|
|
3502
|
+
padding: 10px 10px 9px;
|
|
3503
|
+
box-sizing: border-box;
|
|
3504
|
+
display: flex;
|
|
3505
|
+
flex-direction: column;
|
|
3506
|
+
gap: 7px;
|
|
3507
|
+
background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
|
|
3508
|
+
border: 1px solid #dbeafe;
|
|
3509
|
+
border-radius: 8px;
|
|
3510
|
+
transition: all 0.18s ease;
|
|
3511
|
+
|
|
3512
|
+
&.is-sfx {
|
|
3513
|
+
background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
|
|
3514
|
+
border-color: #ccfbf1;
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
&.is-playing {
|
|
3518
|
+
border-color: #3b82f6;
|
|
3519
|
+
box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.3);
|
|
3520
|
+
}
|
|
3521
|
+
}
|
|
3522
|
+
|
|
3523
|
+
.detail-audio-header {
|
|
3524
|
+
display: flex;
|
|
3525
|
+
align-items: center;
|
|
3526
|
+
gap: 8px;
|
|
3527
|
+
padding-right: 22px;
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
.detail-audio-title {
|
|
3531
|
+
font-size: 12px;
|
|
3532
|
+
font-weight: 600;
|
|
3533
|
+
color: #1e293b;
|
|
3534
|
+
line-height: 1.35;
|
|
3535
|
+
display: -webkit-box;
|
|
3536
|
+
-webkit-line-clamp: 2;
|
|
3537
|
+
-webkit-box-orient: vertical;
|
|
3538
|
+
overflow: hidden;
|
|
3539
|
+
word-break: break-word;
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3542
|
+
.detail-audio-meta {
|
|
3543
|
+
display: flex;
|
|
3544
|
+
align-items: center;
|
|
3545
|
+
justify-content: space-between;
|
|
3546
|
+
gap: 6px;
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
.detail-audio-badge {
|
|
3550
|
+
font-size: 9.5px;
|
|
3551
|
+
font-weight: 700;
|
|
3552
|
+
color: #2563eb;
|
|
3553
|
+
background: rgba(255, 255, 255, 0.85);
|
|
3554
|
+
padding: 1px 5px;
|
|
3555
|
+
border-radius: 4px;
|
|
3556
|
+
letter-spacing: 0.3px;
|
|
3557
|
+
}
|
|
3558
|
+
|
|
3559
|
+
.is-sfx .detail-audio-badge {
|
|
3560
|
+
color: #0d9488;
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
.detail-audio-dur {
|
|
3564
|
+
font-size: 10.5px;
|
|
3565
|
+
font-weight: 500;
|
|
3566
|
+
color: #64748b;
|
|
3567
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
|
|
3568
|
+
}
|
|
3569
|
+
|
|
1973
3570
|
.detail-card-ref-btn {
|
|
1974
3571
|
position: absolute;
|
|
1975
3572
|
left: 6px;
|
|
@@ -2001,6 +3598,16 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
2001
3598
|
display: block;
|
|
2002
3599
|
border-radius: 8px;
|
|
2003
3600
|
transition: transform 0.25s ease;
|
|
3601
|
+
|
|
3602
|
+
&.is-icon-img {
|
|
3603
|
+
width: 100%;
|
|
3604
|
+
height: 100%;
|
|
3605
|
+
min-height: 84px;
|
|
3606
|
+
max-height: none;
|
|
3607
|
+
object-fit: contain;
|
|
3608
|
+
padding: 18%;
|
|
3609
|
+
box-sizing: border-box;
|
|
3610
|
+
}
|
|
2004
3611
|
}
|
|
2005
3612
|
|
|
2006
3613
|
.detail-card-placeholder {
|
|
@@ -2247,6 +3854,48 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
2247
3854
|
transition: transform 0.25s ease;
|
|
2248
3855
|
}
|
|
2249
3856
|
|
|
3857
|
+
.preview-audio-stage-card {
|
|
3858
|
+
width: min(440px, 88vw);
|
|
3859
|
+
padding: 32px 28px 28px;
|
|
3860
|
+
border-radius: 18px;
|
|
3861
|
+
background: rgba(30, 41, 59, 0.88);
|
|
3862
|
+
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
3863
|
+
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
|
|
3864
|
+
display: flex;
|
|
3865
|
+
flex-direction: column;
|
|
3866
|
+
align-items: center;
|
|
3867
|
+
gap: 16px;
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
.preview-audio-disc {
|
|
3871
|
+
width: 78px;
|
|
3872
|
+
height: 78px;
|
|
3873
|
+
border-radius: 50%;
|
|
3874
|
+
background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
|
|
3875
|
+
color: #ffffff;
|
|
3876
|
+
display: flex;
|
|
3877
|
+
align-items: center;
|
|
3878
|
+
justify-content: center;
|
|
3879
|
+
box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3882
|
+
.preview-audio-stage-title {
|
|
3883
|
+
color: #f8fafc;
|
|
3884
|
+
font-size: 15px;
|
|
3885
|
+
font-weight: 600;
|
|
3886
|
+
text-align: center;
|
|
3887
|
+
max-width: 100%;
|
|
3888
|
+
overflow: hidden;
|
|
3889
|
+
text-overflow: ellipsis;
|
|
3890
|
+
white-space: nowrap;
|
|
3891
|
+
}
|
|
3892
|
+
|
|
3893
|
+
.preview-stage-audio-el {
|
|
3894
|
+
width: 100%;
|
|
3895
|
+
height: 40px;
|
|
3896
|
+
outline: none;
|
|
3897
|
+
}
|
|
3898
|
+
|
|
2250
3899
|
.preview-arrow-btn {
|
|
2251
3900
|
position: absolute;
|
|
2252
3901
|
top: 50%;
|