jvs-ppt-ui 0.0.24 → 0.0.25
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 +3033 -2703
- package/dist/lib/jvs-ppt-ui.umd.js +68 -68
- package/dist/lib/style.css +1 -1
- package/package.json +2 -2
- package/src/components/TemplateGallery.vue +1185 -329
|
@@ -157,32 +157,174 @@ watch(isDamLoggedIn, (loggedIn) => {
|
|
|
157
157
|
const viewMode = ref<'overview' | 'detail'>('overview')
|
|
158
158
|
const overviewQuery = ref('')
|
|
159
159
|
const baseDetailTitle = ref('素材库')
|
|
160
|
-
const baseSearchQuery = ref('')
|
|
161
|
-
const activeTag = ref('')
|
|
162
160
|
|
|
163
|
-
//
|
|
161
|
+
// 统一筛选与搜索模型(对齐 jvs-material-ui StockSearchParams 4大筛选维度)
|
|
162
|
+
export type StockColor =
|
|
163
|
+
| 'red'
|
|
164
|
+
| 'orange'
|
|
165
|
+
| 'yellow'
|
|
166
|
+
| 'green'
|
|
167
|
+
| 'turquoise'
|
|
168
|
+
| 'blue'
|
|
169
|
+
| 'lilac'
|
|
170
|
+
| 'pink'
|
|
171
|
+
| 'brown'
|
|
172
|
+
| 'black'
|
|
173
|
+
| 'gray'
|
|
174
|
+
| 'white'
|
|
175
|
+
| 'grayscale'
|
|
176
|
+
|
|
177
|
+
export type StockOrientation = 'horizontal' | 'vertical'
|
|
178
|
+
|
|
179
|
+
export type StockTopicCategory =
|
|
180
|
+
| 'backgrounds'
|
|
181
|
+
| 'fashion'
|
|
182
|
+
| 'nature'
|
|
183
|
+
| 'science'
|
|
184
|
+
| 'education'
|
|
185
|
+
| 'feelings'
|
|
186
|
+
| 'health'
|
|
187
|
+
| 'people'
|
|
188
|
+
| 'religion'
|
|
189
|
+
| 'places'
|
|
190
|
+
| 'animals'
|
|
191
|
+
| 'industry'
|
|
192
|
+
| 'computer'
|
|
193
|
+
| 'food'
|
|
194
|
+
| 'sports'
|
|
195
|
+
| 'transportation'
|
|
196
|
+
| 'travel'
|
|
197
|
+
| 'buildings'
|
|
198
|
+
| 'business'
|
|
199
|
+
| 'music'
|
|
200
|
+
|
|
201
|
+
const COLOR_OPTIONS: { value: StockColor | ''; label: string; hex: string }[] = [
|
|
202
|
+
{ value: '', label: '全部颜色', hex: 'none' },
|
|
203
|
+
{ value: 'red', label: '红色', hex: '#ef4444' },
|
|
204
|
+
{ value: 'orange', label: '橙色', hex: '#f97316' },
|
|
205
|
+
{ value: 'yellow', label: '黄色', hex: '#eab308' },
|
|
206
|
+
{ value: 'green', label: '绿色', hex: '#22c55e' },
|
|
207
|
+
{ value: 'turquoise', label: '青绿', hex: '#14b8a6' },
|
|
208
|
+
{ value: 'blue', label: '蓝色', hex: '#3b82f6' },
|
|
209
|
+
{ value: 'lilac', label: '紫丁香', hex: '#a855f7' },
|
|
210
|
+
{ value: 'pink', label: '粉色', hex: '#ec4899' },
|
|
211
|
+
{ value: 'brown', label: '棕色', hex: '#92400e' },
|
|
212
|
+
{ value: 'black', label: '黑色', hex: '#000000' },
|
|
213
|
+
{ value: 'gray', label: '灰色', hex: '#6b7280' },
|
|
214
|
+
{ value: 'white', label: '白色', hex: '#ffffff' },
|
|
215
|
+
{ value: 'grayscale', label: '黑白灰', hex: 'linear-gradient(135deg, #1e293b 0%, #64748b 50%, #f8fafc 100%)' }
|
|
216
|
+
]
|
|
217
|
+
|
|
218
|
+
const ORIENTATION_OPTIONS: { value: StockOrientation | '' | 'square'; label: string; disabled: boolean }[] = [
|
|
219
|
+
{ value: '', label: '全部画幅', disabled: false },
|
|
220
|
+
{ value: 'horizontal', label: '横版画幅', disabled: false },
|
|
221
|
+
{ value: 'vertical', label: '竖版画幅', disabled: false },
|
|
222
|
+
{ value: 'square', label: '正方形', disabled: true }
|
|
223
|
+
]
|
|
224
|
+
|
|
225
|
+
const TOPIC_OPTIONS: { value: StockTopicCategory | ''; label: string }[] = [
|
|
226
|
+
{ value: '', label: '全部题材' },
|
|
227
|
+
{ value: 'backgrounds', label: '背景底纹' },
|
|
228
|
+
{ value: 'business', label: '商务办公' },
|
|
229
|
+
{ value: 'science', label: '科学科技' },
|
|
230
|
+
{ value: 'nature', label: '自然风光' },
|
|
231
|
+
{ value: 'education', label: '教育学习' },
|
|
232
|
+
{ value: 'computer', label: '电脑数码' },
|
|
233
|
+
{ value: 'buildings', label: '建筑空间' },
|
|
234
|
+
{ value: 'people', label: '人物肖像' },
|
|
235
|
+
{ value: 'fashion', label: '时尚潮流' },
|
|
236
|
+
{ value: 'health', label: '医疗健康' },
|
|
237
|
+
{ value: 'industry', label: '工业制造' },
|
|
238
|
+
{ value: 'food', label: '餐饮美食' },
|
|
239
|
+
{ value: 'travel', label: '旅行度假' },
|
|
240
|
+
{ value: 'transportation', label: '交通工具' },
|
|
241
|
+
{ value: 'sports', label: '体育运动' },
|
|
242
|
+
{ value: 'music', label: '音乐艺术' },
|
|
243
|
+
{ value: 'animals', label: '动物生灵' },
|
|
244
|
+
{ value: 'feelings', label: '情感表达' },
|
|
245
|
+
{ value: 'places', label: '地标名胜' },
|
|
246
|
+
{ value: 'religion', label: '宗教文化' }
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
interface SizePresetItem {
|
|
250
|
+
id: '' | 'hd' | 'fhd' | 'qhd' | 'uhd'
|
|
251
|
+
label: string
|
|
252
|
+
sub: string
|
|
253
|
+
minWidth?: number
|
|
254
|
+
minHeight?: number
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const SIZE_PRESETS: SizePresetItem[] = [
|
|
258
|
+
{ id: '', label: '全部尺寸', sub: '不限', minWidth: undefined, minHeight: undefined },
|
|
259
|
+
{ id: 'hd', label: '高清 HD', sub: '≥1280×720', minWidth: 1280, minHeight: 720 },
|
|
260
|
+
{ id: 'fhd', label: '全高清 FHD', sub: '≥1920×1080', minWidth: 1920, minHeight: 1080 },
|
|
261
|
+
{ id: 'qhd', label: '2K 超清', sub: '≥2560×1440', minWidth: 2560, minHeight: 1440 },
|
|
262
|
+
{ id: 'uhd', label: '4K 原画', sub: '≥3840×2160', minWidth: 3840, minHeight: 2160 }
|
|
263
|
+
]
|
|
264
|
+
|
|
265
|
+
const filterPopoverOpen = ref(false)
|
|
266
|
+
const showAllTopics = ref(false)
|
|
267
|
+
const customMinWidthInput = ref('')
|
|
268
|
+
const customMinHeightInput = ref('')
|
|
269
|
+
let customSizeDebounceTimer: ReturnType<typeof setTimeout> | null = null
|
|
270
|
+
|
|
164
271
|
const filterParams = reactive<{
|
|
165
272
|
query: string
|
|
166
273
|
activeSubType: StockSubType
|
|
274
|
+
color: StockColor | ''
|
|
275
|
+
orientation: StockOrientation | ''
|
|
276
|
+
category: StockTopicCategory | ''
|
|
277
|
+
sizePresetId: '' | 'hd' | 'fhd' | 'qhd' | 'uhd' | 'custom'
|
|
278
|
+
minWidth?: number
|
|
279
|
+
minHeight?: number
|
|
167
280
|
}>({
|
|
168
281
|
query: '',
|
|
169
|
-
activeSubType: 'Vectors'
|
|
282
|
+
activeSubType: 'Vectors',
|
|
283
|
+
color: '',
|
|
284
|
+
orientation: '',
|
|
285
|
+
category: '',
|
|
286
|
+
sizePresetId: '',
|
|
287
|
+
minWidth: undefined,
|
|
288
|
+
minHeight: undefined
|
|
289
|
+
})
|
|
290
|
+
|
|
291
|
+
const currentColorOption = computed(() => {
|
|
292
|
+
return COLOR_OPTIONS.find(c => c.value === filterParams.color) || COLOR_OPTIONS[0]
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
const currentOrientationOption = computed(() => {
|
|
296
|
+
return ORIENTATION_OPTIONS.find(o => o.value === filterParams.orientation) || ORIENTATION_OPTIONS[0]
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
const currentTopicOption = computed(() => {
|
|
300
|
+
return TOPIC_OPTIONS.find(t => t.value === filterParams.category) || TOPIC_OPTIONS[0]
|
|
301
|
+
})
|
|
302
|
+
|
|
303
|
+
const visibleTopicOptions = computed(() => {
|
|
304
|
+
return showAllTopics.value ? TOPIC_OPTIONS : TOPIC_OPTIONS.slice(0, 9)
|
|
305
|
+
})
|
|
306
|
+
|
|
307
|
+
const currentSizeLabelHint = computed(() => {
|
|
308
|
+
if (filterParams.minWidth || filterParams.minHeight) {
|
|
309
|
+
return `≥ ${filterParams.minWidth || 0}×${filterParams.minHeight || 0}`
|
|
310
|
+
}
|
|
311
|
+
return '全部尺寸'
|
|
312
|
+
})
|
|
313
|
+
|
|
314
|
+
const activeFilterCount = computed(() => {
|
|
315
|
+
let count = 0
|
|
316
|
+
if (filterParams.color) count++
|
|
317
|
+
if (filterParams.orientation) count++
|
|
318
|
+
if (filterParams.category) count++
|
|
319
|
+
if (filterParams.minWidth || filterParams.minHeight) count++
|
|
320
|
+
return count
|
|
170
321
|
})
|
|
171
322
|
|
|
172
323
|
// 图三顶部返回栏显示的标题
|
|
173
324
|
const detailHeaderTitle = computed(() => {
|
|
174
|
-
if (activeTag.value) return activeTag.value
|
|
175
|
-
if (baseSearchQuery.value) return baseSearchQuery.value
|
|
176
325
|
return baseDetailTitle.value || subTypeNameMap[filterParams.activeSubType] || '素材库'
|
|
177
326
|
})
|
|
178
327
|
|
|
179
|
-
// 当前分类下的细分标签列表
|
|
180
|
-
const currentCategoryTags = computed(() => {
|
|
181
|
-
const found = overviewCategories.find(c => c.subType === filterParams.activeSubType)
|
|
182
|
-
if (found) return found.tags
|
|
183
|
-
return ['风景', '商务', '科技', '人物', '自然', '建筑', '办公']
|
|
184
|
-
})
|
|
185
|
-
|
|
186
328
|
function isVideoUrl(url?: string): boolean {
|
|
187
329
|
if (!url) return false
|
|
188
330
|
const clean = url.split('?')[0].toLowerCase()
|
|
@@ -567,6 +709,25 @@ function scrollCategoryRow(key: StockSubType, dir: 'left' | 'right') {
|
|
|
567
709
|
setTimeout(() => updateRowScrollState(key), 260)
|
|
568
710
|
}
|
|
569
711
|
|
|
712
|
+
// 统一追加筛选条件到 URLSearchParams(与 jvs-material-ui StockSearchParams 1:1 对齐)
|
|
713
|
+
function appendStockFilterParams(params: URLSearchParams) {
|
|
714
|
+
if (filterParams.color) {
|
|
715
|
+
params.append('color', filterParams.color)
|
|
716
|
+
}
|
|
717
|
+
if (filterParams.orientation) {
|
|
718
|
+
params.append('orientation', filterParams.orientation)
|
|
719
|
+
}
|
|
720
|
+
if (filterParams.category) {
|
|
721
|
+
params.append('category', filterParams.category)
|
|
722
|
+
}
|
|
723
|
+
if (filterParams.minWidth && filterParams.minWidth > 0) {
|
|
724
|
+
params.append('minWidth', String(filterParams.minWidth))
|
|
725
|
+
}
|
|
726
|
+
if (filterParams.minHeight && filterParams.minHeight > 0) {
|
|
727
|
+
params.append('minHeight', String(filterParams.minHeight))
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
570
731
|
// 针对单个 subType 发起独立 API 请求
|
|
571
732
|
async function fetchOverviewCategory(cat: OverviewCategoryConfig, keyword = '') {
|
|
572
733
|
overviewLoadingMap[cat.key] = true
|
|
@@ -585,6 +746,7 @@ async function fetchOverviewCategory(cat: OverviewCategoryConfig, keyword = '')
|
|
|
585
746
|
if (trimmedKeyword) {
|
|
586
747
|
params.append('keyword', trimmedKeyword)
|
|
587
748
|
}
|
|
749
|
+
appendStockFilterParams(params)
|
|
588
750
|
|
|
589
751
|
const fullUrl = `${stockUrl}${stockUrl.includes('?') ? '&' : '?'}${params.toString()}`
|
|
590
752
|
const data = await safeFetchJson(fullUrl, {
|
|
@@ -616,78 +778,133 @@ function fetchAllOverviewCategories(keyword = overviewQuery.value) {
|
|
|
616
778
|
})
|
|
617
779
|
}
|
|
618
780
|
|
|
619
|
-
//
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
781
|
+
// 统一触发当前视图检索(概览页或分类详情页共用搜索框与筛选面板)
|
|
782
|
+
function triggerSearchNow() {
|
|
783
|
+
filterParams.query = overviewQuery.value.trim()
|
|
784
|
+
if (viewMode.value === 'detail') {
|
|
785
|
+
currentPage.value = 1
|
|
786
|
+
pagedMaterials.value = []
|
|
787
|
+
reachEnd.value = false
|
|
788
|
+
loadFailed.value = false
|
|
789
|
+
fetchMaterials(1, false)
|
|
790
|
+
} else {
|
|
791
|
+
fetchAllOverviewCategories(overviewQuery.value)
|
|
792
|
+
}
|
|
793
|
+
}
|
|
627
794
|
|
|
628
|
-
function
|
|
629
|
-
|
|
630
|
-
if (!el) return
|
|
631
|
-
tagScrollState.canLeft = el.scrollLeft > 4
|
|
632
|
-
tagScrollState.canRight = el.scrollWidth - el.clientWidth - el.scrollLeft > 4
|
|
795
|
+
function toggleFilterPopover(forceState?: boolean) {
|
|
796
|
+
filterPopoverOpen.value = typeof forceState === 'boolean' ? forceState : !filterPopoverOpen.value
|
|
633
797
|
}
|
|
634
798
|
|
|
635
|
-
function
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
799
|
+
function selectColorFilter(val: StockColor | '') {
|
|
800
|
+
filterParams.color = filterParams.color === val ? '' : val
|
|
801
|
+
triggerSearchNow()
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
function selectOrientationFilter(val: StockOrientation | '') {
|
|
805
|
+
filterParams.orientation = filterParams.orientation === val ? '' : val
|
|
806
|
+
triggerSearchNow()
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
function selectTopicFilter(val: StockTopicCategory | '') {
|
|
810
|
+
filterParams.category = filterParams.category === val ? '' : val
|
|
811
|
+
triggerSearchNow()
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
function toggleShowAllTopics() {
|
|
815
|
+
showAllTopics.value = !showAllTopics.value
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
function selectSizePresetFilter(id: '' | 'hd' | 'fhd' | 'qhd' | 'uhd') {
|
|
819
|
+
const preset = SIZE_PRESETS.find(p => p.id === id)
|
|
820
|
+
if (!preset || id === '' || filterParams.sizePresetId === id) {
|
|
821
|
+
filterParams.sizePresetId = ''
|
|
822
|
+
filterParams.minWidth = undefined
|
|
823
|
+
filterParams.minHeight = undefined
|
|
824
|
+
customMinWidthInput.value = ''
|
|
825
|
+
customMinHeightInput.value = ''
|
|
826
|
+
} else {
|
|
827
|
+
filterParams.sizePresetId = preset.id
|
|
828
|
+
filterParams.minWidth = preset.minWidth
|
|
829
|
+
filterParams.minHeight = preset.minHeight
|
|
830
|
+
customMinWidthInput.value = preset.minWidth ? String(preset.minWidth) : ''
|
|
831
|
+
customMinHeightInput.value = preset.minHeight ? String(preset.minHeight) : ''
|
|
832
|
+
}
|
|
833
|
+
triggerSearchNow()
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
function handleCustomSizeInput() {
|
|
837
|
+
const wVal = parseInt(customMinWidthInput.value, 10)
|
|
838
|
+
const hVal = parseInt(customMinHeightInput.value, 10)
|
|
839
|
+
filterParams.minWidth = !Number.isNaN(wVal) && wVal > 0 ? wVal : undefined
|
|
840
|
+
filterParams.minHeight = !Number.isNaN(hVal) && hVal > 0 ? hVal : undefined
|
|
841
|
+
|
|
842
|
+
const matched = SIZE_PRESETS.find(
|
|
843
|
+
p => p.id !== '' && p.minWidth === filterParams.minWidth && p.minHeight === filterParams.minHeight
|
|
844
|
+
)
|
|
845
|
+
if (!filterParams.minWidth && !filterParams.minHeight) {
|
|
846
|
+
filterParams.sizePresetId = ''
|
|
847
|
+
} else {
|
|
848
|
+
filterParams.sizePresetId = matched ? matched.id : 'custom'
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
if (customSizeDebounceTimer) clearTimeout(customSizeDebounceTimer)
|
|
852
|
+
customSizeDebounceTimer = setTimeout(() => {
|
|
853
|
+
triggerSearchNow()
|
|
854
|
+
}, 380)
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
function clearAllFilters() {
|
|
858
|
+
if (activeFilterCount.value === 0) return
|
|
859
|
+
filterParams.color = ''
|
|
860
|
+
filterParams.orientation = ''
|
|
861
|
+
filterParams.category = ''
|
|
862
|
+
filterParams.sizePresetId = ''
|
|
863
|
+
filterParams.minWidth = undefined
|
|
864
|
+
filterParams.minHeight = undefined
|
|
865
|
+
customMinWidthInput.value = ''
|
|
866
|
+
customMinHeightInput.value = ''
|
|
867
|
+
triggerSearchNow()
|
|
641
868
|
}
|
|
642
869
|
|
|
643
|
-
//
|
|
870
|
+
// 从图二点击「查看全部」进入图三(保留当前搜索词与筛选条件)
|
|
644
871
|
async function openCategoryDetail(subType: StockSubType) {
|
|
645
872
|
const cat = overviewCategories.find(c => c.subType === subType)
|
|
646
873
|
filterParams.activeSubType = subType
|
|
647
874
|
const q = overviewQuery.value.trim()
|
|
648
875
|
baseDetailTitle.value = cat ? cat.label : subTypeNameMap[subType]
|
|
649
|
-
baseSearchQuery.value = q
|
|
650
|
-
activeTag.value = ''
|
|
651
876
|
filterParams.query = q
|
|
877
|
+
filterPopoverOpen.value = false
|
|
652
878
|
viewMode.value = 'detail'
|
|
653
879
|
currentPage.value = 1
|
|
654
880
|
pagedMaterials.value = []
|
|
655
881
|
reachEnd.value = false
|
|
656
882
|
loadFailed.value = false
|
|
657
883
|
await nextTick()
|
|
658
|
-
updateTagScrollState()
|
|
659
884
|
await fetchMaterials(1, false)
|
|
660
885
|
}
|
|
661
886
|
|
|
662
|
-
//
|
|
887
|
+
// 顶部搜索框回车
|
|
663
888
|
function handleOverviewSearch() {
|
|
664
|
-
|
|
889
|
+
filterPopoverOpen.value = false
|
|
890
|
+
triggerSearchNow()
|
|
665
891
|
}
|
|
666
892
|
|
|
667
893
|
function clearOverviewQuery() {
|
|
668
894
|
overviewQuery.value = ''
|
|
669
|
-
|
|
895
|
+
triggerSearchNow()
|
|
670
896
|
}
|
|
671
897
|
|
|
672
898
|
// 图三点击左上角返回箭头回到图二
|
|
673
899
|
function backToOverview() {
|
|
900
|
+
filterPopoverOpen.value = false
|
|
674
901
|
viewMode.value = 'overview'
|
|
902
|
+
fetchAllOverviewCategories(overviewQuery.value)
|
|
675
903
|
nextTick(() => {
|
|
676
904
|
overviewCategories.forEach(cat => updateRowScrollState(cat.key))
|
|
677
905
|
})
|
|
678
906
|
}
|
|
679
907
|
|
|
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
908
|
const loading = ref(false)
|
|
692
909
|
const pagedMaterials = ref<MaterialItem[]>([])
|
|
693
910
|
const currentPage = ref(1)
|
|
@@ -698,7 +915,7 @@ const loadFailed = ref(false)
|
|
|
698
915
|
const loadErrorMsg = ref('')
|
|
699
916
|
const reachEnd = ref(false)
|
|
700
917
|
|
|
701
|
-
// 图三分页加载:始终携带 subType
|
|
918
|
+
// 图三分页加载:始终携带 subType 与筛选请求参数
|
|
702
919
|
async function fetchMaterials(page = 1, append = false) {
|
|
703
920
|
const stockUrl = getEffectiveStockUrl()
|
|
704
921
|
if (!stockUrl) {
|
|
@@ -724,6 +941,7 @@ async function fetchMaterials(page = 1, append = false) {
|
|
|
724
941
|
if (q) {
|
|
725
942
|
params.append('keyword', q)
|
|
726
943
|
}
|
|
944
|
+
appendStockFilterParams(params)
|
|
727
945
|
|
|
728
946
|
const fullUrl = `${stockUrl}${stockUrl.includes('?') ? '&' : '?'}${params.toString()}`
|
|
729
947
|
const data = await safeFetchJson(fullUrl, {
|
|
@@ -901,13 +1119,28 @@ function handleDrawerContainerClick(e: MouseEvent) {
|
|
|
901
1119
|
}
|
|
902
1120
|
}
|
|
903
1121
|
|
|
1122
|
+
function handleGlobalMouseDown(e: MouseEvent) {
|
|
1123
|
+
if (!filterPopoverOpen.value) return
|
|
1124
|
+
const target = e.target as HTMLElement | null
|
|
1125
|
+
if (!target) return
|
|
1126
|
+
if (
|
|
1127
|
+
target.closest('.stock-filter-popover') ||
|
|
1128
|
+
target.closest('.stock-filter-trigger-btn')
|
|
1129
|
+
) {
|
|
1130
|
+
return
|
|
1131
|
+
}
|
|
1132
|
+
filterPopoverOpen.value = false
|
|
1133
|
+
}
|
|
1134
|
+
|
|
904
1135
|
onMounted(() => {
|
|
905
1136
|
fetchAllOverviewCategories()
|
|
906
1137
|
window.addEventListener('keydown', handleKeydown)
|
|
1138
|
+
window.addEventListener('mousedown', handleGlobalMouseDown, true)
|
|
907
1139
|
})
|
|
908
1140
|
|
|
909
1141
|
onUnmounted(() => {
|
|
910
1142
|
window.removeEventListener('keydown', handleKeydown)
|
|
1143
|
+
window.removeEventListener('mousedown', handleGlobalMouseDown, true)
|
|
911
1144
|
})
|
|
912
1145
|
|
|
913
1146
|
watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => materialTreeApiUrl?.value], () => {
|
|
@@ -1022,193 +1255,375 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1022
1255
|
</div>
|
|
1023
1256
|
</div>
|
|
1024
1257
|
|
|
1025
|
-
<!-- ==================== Tab 1:检索(公网素材分类概览 &
|
|
1258
|
+
<!-- ==================== Tab 1:检索(公网素材分类概览 & 详情瀑布流,共用顶部搜索与复合筛选器) ==================== -->
|
|
1026
1259
|
<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
|
-
|
|
1260
|
+
<!-- 顶部共用搜索框 + 筛选按钮 + 已选标签条 + 悬浮复合筛选面板 -->
|
|
1261
|
+
<div class="stock-search-filter-header">
|
|
1262
|
+
<div class="stock-search-bar-wrapper">
|
|
1263
|
+
<div class="stock-search-box" :class="{ 'is-filter-open': filterPopoverOpen }">
|
|
1264
|
+
<el-icon class="stock-search-icon" @click="handleOverviewSearch">
|
|
1265
|
+
<Search />
|
|
1266
|
+
</el-icon>
|
|
1267
|
+
<input
|
|
1268
|
+
v-model="overviewQuery"
|
|
1269
|
+
type="text"
|
|
1270
|
+
placeholder="搜索图片、插画、图标、视频..."
|
|
1271
|
+
class="stock-search-input"
|
|
1272
|
+
@keyup.enter="handleOverviewSearch"
|
|
1273
|
+
/>
|
|
1274
|
+
<button
|
|
1275
|
+
v-if="overviewQuery"
|
|
1276
|
+
type="button"
|
|
1277
|
+
class="stock-clear-kw-btn"
|
|
1278
|
+
title="清空搜索词"
|
|
1279
|
+
@click="clearOverviewQuery"
|
|
1280
|
+
>
|
|
1281
|
+
×
|
|
1282
|
+
</button>
|
|
1283
|
+
<div class="stock-search-divider"></div>
|
|
1284
|
+
<button
|
|
1285
|
+
type="button"
|
|
1286
|
+
class="stock-filter-trigger-btn"
|
|
1287
|
+
:class="{ 'is-active': filterPopoverOpen || activeFilterCount > 0 }"
|
|
1288
|
+
title="筛选条件"
|
|
1289
|
+
@click.stop="toggleFilterPopover()"
|
|
1290
|
+
>
|
|
1291
|
+
<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
1292
|
+
<line x1="4" y1="6" x2="20" y2="6" />
|
|
1293
|
+
<circle cx="9" cy="6" r="2" fill="#fff" />
|
|
1294
|
+
<line x1="4" y1="12" x2="20" y2="12" />
|
|
1295
|
+
<circle cx="15" cy="12" r="2" fill="#fff" />
|
|
1296
|
+
<line x1="4" y1="18" x2="20" y2="18" />
|
|
1297
|
+
<circle cx="10" cy="18" r="2" fill="#fff" />
|
|
1298
|
+
</svg>
|
|
1299
|
+
<span v-if="activeFilterCount > 0" class="stock-filter-count-dot">
|
|
1300
|
+
{{ activeFilterCount }}
|
|
1301
|
+
</span>
|
|
1063
1302
|
</button>
|
|
1064
1303
|
</div>
|
|
1065
1304
|
|
|
1066
|
-
|
|
1305
|
+
<!-- 已选筛选条件胶囊条 -->
|
|
1306
|
+
<div v-if="activeFilterCount > 0" class="stock-active-filter-chips">
|
|
1067
1307
|
<div
|
|
1068
|
-
|
|
1069
|
-
class="
|
|
1070
|
-
|
|
1308
|
+
v-if="filterParams.color"
|
|
1309
|
+
class="stock-filter-chip"
|
|
1310
|
+
title="点击移除颜色筛选"
|
|
1311
|
+
@click="selectColorFilter('')"
|
|
1071
1312
|
>
|
|
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>
|
|
1313
|
+
<span
|
|
1314
|
+
class="stock-chip-color-dot"
|
|
1315
|
+
:style="
|
|
1316
|
+
currentColorOption.hex.startsWith('linear-gradient')
|
|
1317
|
+
? { backgroundImage: currentColorOption.hex }
|
|
1318
|
+
: { backgroundColor: currentColorOption.hex }
|
|
1319
|
+
"
|
|
1320
|
+
></span>
|
|
1321
|
+
<span>{{ currentColorOption.label }}</span>
|
|
1322
|
+
<span class="stock-chip-close">×</span>
|
|
1323
|
+
</div>
|
|
1115
1324
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1325
|
+
<div
|
|
1326
|
+
v-if="filterParams.orientation"
|
|
1327
|
+
class="stock-filter-chip"
|
|
1328
|
+
title="点击移除画幅筛选"
|
|
1329
|
+
@click="selectOrientationFilter('')"
|
|
1330
|
+
>
|
|
1331
|
+
<span>{{ currentOrientationOption.label }}</span>
|
|
1332
|
+
<span class="stock-chip-close">×</span>
|
|
1120
1333
|
</div>
|
|
1121
1334
|
|
|
1122
|
-
<!-- 左侧渐变与左滑箭头 -->
|
|
1123
1335
|
<div
|
|
1124
|
-
v-if="
|
|
1125
|
-
class="
|
|
1126
|
-
|
|
1336
|
+
v-if="filterParams.category"
|
|
1337
|
+
class="stock-filter-chip"
|
|
1338
|
+
title="点击移除题材筛选"
|
|
1339
|
+
@click="selectTopicFilter('')"
|
|
1127
1340
|
>
|
|
1128
|
-
<
|
|
1129
|
-
|
|
1130
|
-
<polyline points="15 18 9 12 15 6" />
|
|
1131
|
-
</svg>
|
|
1341
|
+
<span>{{ currentTopicOption.label }}</span>
|
|
1342
|
+
<span class="stock-chip-close">×</span>
|
|
1132
1343
|
</div>
|
|
1133
1344
|
|
|
1134
|
-
<!-- 右侧渐变与右滑箭头 -->
|
|
1135
1345
|
<div
|
|
1136
|
-
v-if="
|
|
1137
|
-
class="
|
|
1138
|
-
|
|
1346
|
+
v-if="filterParams.minWidth || filterParams.minHeight"
|
|
1347
|
+
class="stock-filter-chip"
|
|
1348
|
+
title="点击移除尺寸筛选"
|
|
1349
|
+
@click="selectSizePresetFilter('')"
|
|
1139
1350
|
>
|
|
1140
|
-
<
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1351
|
+
<span>{{ currentSizeLabelHint }}</span>
|
|
1352
|
+
<span class="stock-chip-close">×</span>
|
|
1353
|
+
</div>
|
|
1354
|
+
</div>
|
|
1355
|
+
|
|
1356
|
+
<!-- 悬浮复合筛选面板 Popover -->
|
|
1357
|
+
<div v-if="filterPopoverOpen" class="stock-filter-popover" @click.stop>
|
|
1358
|
+
<div class="stock-filter-popover-body">
|
|
1359
|
+
<!-- 1. 颜色 -->
|
|
1360
|
+
<div class="stock-filter-section">
|
|
1361
|
+
<div class="stock-filter-section-header">
|
|
1362
|
+
<span class="stock-filter-section-title">颜色</span>
|
|
1363
|
+
<span class="stock-filter-section-sub">{{ currentColorOption.label }}</span>
|
|
1364
|
+
</div>
|
|
1365
|
+
<div class="stock-color-grid">
|
|
1366
|
+
<div
|
|
1367
|
+
v-for="c in COLOR_OPTIONS"
|
|
1368
|
+
:key="c.value || 'all'"
|
|
1369
|
+
class="stock-color-swatch"
|
|
1370
|
+
:class="{
|
|
1371
|
+
'is-none': c.value === '',
|
|
1372
|
+
'is-white': c.value === 'white',
|
|
1373
|
+
'is-grayscale': c.value === 'grayscale',
|
|
1374
|
+
selected: filterParams.color === c.value
|
|
1375
|
+
}"
|
|
1376
|
+
:style="
|
|
1377
|
+
c.value === ''
|
|
1378
|
+
? undefined
|
|
1379
|
+
: c.hex.startsWith('linear-gradient')
|
|
1380
|
+
? { backgroundImage: c.hex }
|
|
1381
|
+
: { backgroundColor: c.hex }
|
|
1382
|
+
"
|
|
1383
|
+
:title="c.label"
|
|
1384
|
+
@click="selectColorFilter(c.value)"
|
|
1385
|
+
>
|
|
1386
|
+
<svg
|
|
1387
|
+
v-if="c.value === ''"
|
|
1388
|
+
width="14"
|
|
1389
|
+
height="14"
|
|
1390
|
+
viewBox="0 0 24 24"
|
|
1391
|
+
fill="none"
|
|
1392
|
+
stroke="currentColor"
|
|
1393
|
+
stroke-width="2"
|
|
1394
|
+
>
|
|
1395
|
+
<line x1="4" y1="20" x2="20" y2="4" />
|
|
1396
|
+
</svg>
|
|
1397
|
+
<svg
|
|
1398
|
+
v-else-if="filterParams.color === c.value"
|
|
1399
|
+
width="11"
|
|
1400
|
+
height="11"
|
|
1401
|
+
viewBox="0 0 12 12"
|
|
1402
|
+
fill="none"
|
|
1403
|
+
:stroke="c.value === 'white' || c.value === 'yellow' ? '#0f172a' : '#ffffff'"
|
|
1404
|
+
stroke-width="2.2"
|
|
1405
|
+
>
|
|
1406
|
+
<path d="M2.5 6.2l2.5 2.5 4.5-5" stroke-linecap="round" stroke-linejoin="round" />
|
|
1407
|
+
</svg>
|
|
1408
|
+
</div>
|
|
1409
|
+
</div>
|
|
1410
|
+
</div>
|
|
1411
|
+
|
|
1412
|
+
<!-- 2. 画幅比例 -->
|
|
1413
|
+
<div class="stock-filter-section">
|
|
1414
|
+
<div class="stock-filter-section-header">
|
|
1415
|
+
<span class="stock-filter-section-title">画幅比例</span>
|
|
1416
|
+
</div>
|
|
1417
|
+
<div class="stock-orientation-grid">
|
|
1418
|
+
<div
|
|
1419
|
+
v-for="o in ORIENTATION_OPTIONS"
|
|
1420
|
+
:key="o.value || 'all'"
|
|
1421
|
+
class="stock-radio-item"
|
|
1422
|
+
:class="{
|
|
1423
|
+
selected: !o.disabled && filterParams.orientation === o.value,
|
|
1424
|
+
disabled: o.disabled
|
|
1425
|
+
}"
|
|
1426
|
+
:title="o.disabled ? '公网接口暂不支持正方形过滤' : o.label"
|
|
1427
|
+
@click="!o.disabled && selectOrientationFilter(o.value as StockOrientation | '')"
|
|
1428
|
+
>
|
|
1429
|
+
<div class="stock-radio-circle"></div>
|
|
1430
|
+
<span class="stock-radio-label">{{ o.label }}</span>
|
|
1431
|
+
</div>
|
|
1432
|
+
</div>
|
|
1433
|
+
</div>
|
|
1434
|
+
|
|
1435
|
+
<!-- 3. 题材分类 -->
|
|
1436
|
+
<div class="stock-filter-section">
|
|
1437
|
+
<div class="stock-filter-section-header">
|
|
1438
|
+
<span class="stock-filter-section-title">题材分类</span>
|
|
1439
|
+
<span class="stock-filter-section-sub">{{ currentTopicOption.label }}</span>
|
|
1440
|
+
</div>
|
|
1441
|
+
<div class="stock-topic-pills-wrap">
|
|
1442
|
+
<div
|
|
1443
|
+
v-for="t in visibleTopicOptions"
|
|
1444
|
+
:key="t.value || 'all'"
|
|
1445
|
+
class="stock-topic-pill"
|
|
1446
|
+
:class="{ selected: filterParams.category === t.value }"
|
|
1447
|
+
@click="selectTopicFilter(t.value)"
|
|
1448
|
+
>
|
|
1449
|
+
{{ t.label }}
|
|
1450
|
+
</div>
|
|
1451
|
+
<button type="button" class="stock-topic-expand-btn" @click="toggleShowAllTopics">
|
|
1452
|
+
<span>{{ showAllTopics ? '收起更多题材 ▲' : '展开全部 20 类题材 ▼' }}</span>
|
|
1453
|
+
</button>
|
|
1454
|
+
</div>
|
|
1455
|
+
</div>
|
|
1456
|
+
|
|
1457
|
+
<!-- 4. 尺寸大小 -->
|
|
1458
|
+
<div class="stock-filter-section">
|
|
1459
|
+
<div class="stock-filter-section-header">
|
|
1460
|
+
<span class="stock-filter-section-title">尺寸大小</span>
|
|
1461
|
+
<span class="stock-filter-section-sub">{{ currentSizeLabelHint }}</span>
|
|
1462
|
+
</div>
|
|
1463
|
+
<div class="stock-size-presets-grid">
|
|
1464
|
+
<div
|
|
1465
|
+
v-for="p in SIZE_PRESETS"
|
|
1466
|
+
:key="p.id || 'all'"
|
|
1467
|
+
class="stock-size-pill"
|
|
1468
|
+
:class="{
|
|
1469
|
+
'is-all-size': p.id === '',
|
|
1470
|
+
selected:
|
|
1471
|
+
filterParams.sizePresetId === p.id &&
|
|
1472
|
+
(p.id !== '' || (!filterParams.minWidth && !filterParams.minHeight))
|
|
1473
|
+
}"
|
|
1474
|
+
@click="selectSizePresetFilter(p.id)"
|
|
1475
|
+
>
|
|
1476
|
+
<span class="stock-size-pill-title">{{ p.label }}</span>
|
|
1477
|
+
<span class="stock-size-pill-sub">{{ p.sub }}</span>
|
|
1478
|
+
</div>
|
|
1479
|
+
</div>
|
|
1480
|
+
<div class="stock-custom-size-row">
|
|
1481
|
+
<input
|
|
1482
|
+
v-model="customMinWidthInput"
|
|
1483
|
+
type="number"
|
|
1484
|
+
min="1"
|
|
1485
|
+
placeholder="最小宽 (px)"
|
|
1486
|
+
class="stock-size-input"
|
|
1487
|
+
@input="handleCustomSizeInput"
|
|
1488
|
+
/>
|
|
1489
|
+
<span class="stock-size-mul">×</span>
|
|
1490
|
+
<input
|
|
1491
|
+
v-model="customMinHeightInput"
|
|
1492
|
+
type="number"
|
|
1493
|
+
min="1"
|
|
1494
|
+
placeholder="最小高 (px)"
|
|
1495
|
+
class="stock-size-input"
|
|
1496
|
+
@input="handleCustomSizeInput"
|
|
1497
|
+
/>
|
|
1498
|
+
</div>
|
|
1499
|
+
</div>
|
|
1500
|
+
</div>
|
|
1501
|
+
|
|
1502
|
+
<!-- 底部清除全部按钮 -->
|
|
1503
|
+
<div class="stock-filter-popover-footer">
|
|
1504
|
+
<button
|
|
1505
|
+
type="button"
|
|
1506
|
+
class="stock-clear-all-btn"
|
|
1507
|
+
:class="{ 'has-active': activeFilterCount > 0 }"
|
|
1508
|
+
@click="clearAllFilters"
|
|
1509
|
+
>
|
|
1510
|
+
{{ activeFilterCount > 0 ? `清除全部 (${activeFilterCount})` : '清除全部' }}
|
|
1511
|
+
</button>
|
|
1144
1512
|
</div>
|
|
1145
1513
|
</div>
|
|
1146
1514
|
</div>
|
|
1147
1515
|
</div>
|
|
1148
|
-
</div>
|
|
1149
1516
|
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
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)"
|
|
1517
|
+
<!-- 图二:素材库分类概览视图 -->
|
|
1518
|
+
<div v-if="viewMode === 'overview'" class="material-overview-body">
|
|
1519
|
+
<!-- 4大固定分类横向预览列表(Vectors / Photos / Illustrations / Videos) -->
|
|
1520
|
+
<div class="overview-sections-scroll">
|
|
1521
|
+
<div
|
|
1522
|
+
v-for="cat in overviewCategories"
|
|
1523
|
+
:key="cat.key"
|
|
1524
|
+
class="overview-category-section"
|
|
1174
1525
|
>
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1526
|
+
<div class="section-header-row">
|
|
1527
|
+
<span class="section-cat-title">{{ cat.label }}</span>
|
|
1528
|
+
<button type="button" class="section-view-all-btn" @click="openCategoryDetail(cat.subType)">
|
|
1529
|
+
查看全部
|
|
1530
|
+
</button>
|
|
1531
|
+
</div>
|
|
1178
1532
|
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1533
|
+
<div class="section-carousel-container">
|
|
1534
|
+
<div
|
|
1535
|
+
:ref="el => setRowRef(cat.key, el)"
|
|
1536
|
+
class="section-carousel-track"
|
|
1537
|
+
@scroll="updateRowScrollState(cat.key)"
|
|
1538
|
+
>
|
|
1539
|
+
<!-- 加载占位骨架 -->
|
|
1540
|
+
<template v-if="overviewLoadingMap[cat.key] && (!overviewItemsMap[cat.key] || overviewItemsMap[cat.key].length === 0)">
|
|
1541
|
+
<div v-for="n in 3" :key="n" class="overview-skeleton-card"></div>
|
|
1542
|
+
</template>
|
|
1543
|
+
|
|
1544
|
+
<!-- 横向缩略图卡片 -->
|
|
1545
|
+
<template v-else-if="overviewItemsMap[cat.key] && overviewItemsMap[cat.key].length > 0">
|
|
1546
|
+
<div
|
|
1547
|
+
v-for="(item, idx) in overviewItemsMap[cat.key]"
|
|
1548
|
+
:key="item.id || idx"
|
|
1549
|
+
class="overview-thumb-card"
|
|
1550
|
+
@click.stop="handleSelectMaterial(item)"
|
|
1551
|
+
>
|
|
1552
|
+
<VideoCoverThumb
|
|
1553
|
+
v-if="cat.subType === 'Videos' || isVideoMaterial(item) || isVideoUrl(getMaterialThumb(item))"
|
|
1554
|
+
:video-url="item.sourceUrl || item.url || getMaterialThumb(item)"
|
|
1555
|
+
:cover-url="item.coverUrl || item.image || item.thumbnail || (!isVideoUrl(item.previewUrl) ? item.previewUrl : '')"
|
|
1556
|
+
:alt="item.title || cat.label"
|
|
1557
|
+
class="overview-thumb-img"
|
|
1558
|
+
@loaded="updateRowScrollState(cat.key)"
|
|
1559
|
+
/>
|
|
1560
|
+
<img
|
|
1561
|
+
v-else-if="getMaterialThumb(item)"
|
|
1562
|
+
:src="getMaterialThumb(item)"
|
|
1563
|
+
:alt="item.title || cat.label"
|
|
1564
|
+
loading="lazy"
|
|
1565
|
+
class="overview-thumb-img"
|
|
1566
|
+
@load="updateRowScrollState(cat.key)"
|
|
1567
|
+
/>
|
|
1568
|
+
<span v-if="cat.subType === 'Videos' || isVideoMaterial(item)" class="video-badge-icon">
|
|
1569
|
+
<el-icon><VideoPlay /></el-icon>
|
|
1570
|
+
</span>
|
|
1571
|
+
<button
|
|
1572
|
+
v-if="isDamLoggedIn && cat.subType !== 'Videos' && !isVideoMaterial(item) && getMaterialThumb(item)"
|
|
1573
|
+
type="button"
|
|
1574
|
+
class="overview-card-ref-btn"
|
|
1575
|
+
title="作为参考图发送到「AI生成」"
|
|
1576
|
+
@click.stop.prevent="handleSendToCreateRef(item, $event)"
|
|
1577
|
+
>
|
|
1578
|
+
@参考
|
|
1579
|
+
</button>
|
|
1580
|
+
</div>
|
|
1581
|
+
</template>
|
|
1582
|
+
|
|
1583
|
+
<!-- 空状态兜底 -->
|
|
1584
|
+
<div v-else class="overview-empty-row" @click="openCategoryDetail(cat.subType)">
|
|
1585
|
+
<span>暂无{{ cat.label }}数据</span>
|
|
1586
|
+
</div>
|
|
1587
|
+
</div>
|
|
1190
1588
|
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1589
|
+
<!-- 左侧渐变与左滑箭头 -->
|
|
1590
|
+
<div
|
|
1591
|
+
v-if="rowScrollState[cat.key]?.canLeft"
|
|
1592
|
+
class="carousel-edge-mask left-mask"
|
|
1593
|
+
@click.stop="scrollCategoryRow(cat.key, 'left')"
|
|
1594
|
+
>
|
|
1595
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2"
|
|
1596
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
1597
|
+
<polyline points="15 18 9 12 15 6" />
|
|
1598
|
+
</svg>
|
|
1599
|
+
</div>
|
|
1600
|
+
|
|
1601
|
+
<!-- 右侧渐变与右滑箭头 -->
|
|
1602
|
+
<div
|
|
1603
|
+
v-if="rowScrollState[cat.key]?.canRight"
|
|
1604
|
+
class="carousel-edge-mask right-mask"
|
|
1605
|
+
@click.stop="scrollCategoryRow(cat.key, 'right')"
|
|
1606
|
+
>
|
|
1607
|
+
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.2"
|
|
1608
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
1609
|
+
<polyline points="9 18 15 12 9 6" />
|
|
1610
|
+
</svg>
|
|
1611
|
+
</div>
|
|
1612
|
+
</div>
|
|
1613
|
+
</div>
|
|
1201
1614
|
</div>
|
|
1202
1615
|
</div>
|
|
1203
1616
|
|
|
1204
|
-
<!--
|
|
1205
|
-
<div v-
|
|
1206
|
-
|
|
1207
|
-
<
|
|
1208
|
-
|
|
1617
|
+
<!-- ==================== 图三:分类/搜索详情瀑布流视图(共用顶部搜索与筛选,移除旧分类胶囊) ==================== -->
|
|
1618
|
+
<div v-else class="material-detail-body">
|
|
1619
|
+
<!-- 加载中状态 -->
|
|
1620
|
+
<div v-if="loading && displayedMaterials.length === 0" class="gallery-loading-box">
|
|
1621
|
+
<div class="loading-ring-spinner"></div>
|
|
1622
|
+
<span class="loading-tip-text">正在加载{{ subTypeNameMap[filterParams.activeSubType] }}...</span>
|
|
1623
|
+
</div>
|
|
1209
1624
|
|
|
1210
|
-
|
|
1211
|
-
|
|
1625
|
+
<!-- 双列瀑布流列表 -->
|
|
1626
|
+
<div v-else class="detail-waterfall-scroll">
|
|
1212
1627
|
<div v-if="displayedMaterials.length > 0" class="detail-masonry-wrapper">
|
|
1213
1628
|
<div class="detail-masonry-columns">
|
|
1214
1629
|
<div
|
|
@@ -1580,52 +1995,53 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1580
1995
|
}
|
|
1581
1996
|
}
|
|
1582
1997
|
|
|
1583
|
-
/* ====================
|
|
1584
|
-
.
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1998
|
+
/* ==================== 联网搜索:共用搜索栏 + 复合悬浮筛选面板 ==================== */
|
|
1999
|
+
.stock-search-filter-header {
|
|
2000
|
+
padding: 10px 14px 6px;
|
|
2001
|
+
flex-shrink: 0;
|
|
2002
|
+
position: relative;
|
|
2003
|
+
z-index: 40;
|
|
2004
|
+
background: #ffffff;
|
|
1590
2005
|
}
|
|
1591
2006
|
|
|
1592
|
-
.
|
|
1593
|
-
|
|
1594
|
-
flex-shrink: 0;
|
|
2007
|
+
.stock-search-bar-wrapper {
|
|
2008
|
+
position: relative;
|
|
1595
2009
|
}
|
|
1596
2010
|
|
|
1597
|
-
.
|
|
2011
|
+
.stock-search-box {
|
|
1598
2012
|
display: flex;
|
|
1599
2013
|
align-items: center;
|
|
1600
|
-
height:
|
|
1601
|
-
background: #
|
|
1602
|
-
border: 1px solid #
|
|
1603
|
-
border-radius:
|
|
1604
|
-
padding: 0 10px;
|
|
1605
|
-
gap: 8px;
|
|
2014
|
+
height: 34px;
|
|
2015
|
+
background: #f8fafc;
|
|
2016
|
+
border: 1px solid #cbd5e1;
|
|
2017
|
+
border-radius: 8px;
|
|
2018
|
+
padding: 0 6px 0 10px;
|
|
1606
2019
|
box-sizing: border-box;
|
|
1607
|
-
transition: all 0.
|
|
2020
|
+
transition: all 0.18s ease;
|
|
1608
2021
|
|
|
1609
|
-
&:focus-within
|
|
2022
|
+
&:focus-within,
|
|
2023
|
+
&.is-filter-open {
|
|
1610
2024
|
background: #ffffff;
|
|
1611
|
-
border-color: #
|
|
2025
|
+
border-color: #2563eb;
|
|
2026
|
+
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
|
|
1612
2027
|
}
|
|
1613
2028
|
}
|
|
1614
2029
|
|
|
1615
|
-
.
|
|
1616
|
-
font-size:
|
|
2030
|
+
.stock-search-icon {
|
|
2031
|
+
font-size: 14px;
|
|
1617
2032
|
color: #94a3b8;
|
|
1618
2033
|
cursor: pointer;
|
|
1619
2034
|
flex-shrink: 0;
|
|
2035
|
+
margin-right: 6px;
|
|
1620
2036
|
}
|
|
1621
2037
|
|
|
1622
|
-
.
|
|
2038
|
+
.stock-search-input {
|
|
1623
2039
|
flex: 1;
|
|
1624
2040
|
min-width: 0;
|
|
1625
2041
|
border: none;
|
|
1626
2042
|
outline: none;
|
|
1627
2043
|
background: transparent;
|
|
1628
|
-
font-size:
|
|
2044
|
+
font-size: 12.5px;
|
|
1629
2045
|
color: #1e293b;
|
|
1630
2046
|
|
|
1631
2047
|
&::placeholder {
|
|
@@ -1633,42 +2049,553 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1633
2049
|
}
|
|
1634
2050
|
}
|
|
1635
2051
|
|
|
1636
|
-
.
|
|
1637
|
-
|
|
1638
|
-
|
|
2052
|
+
.stock-clear-kw-btn {
|
|
2053
|
+
width: 18px;
|
|
2054
|
+
height: 18px;
|
|
2055
|
+
border-radius: 50%;
|
|
2056
|
+
border: none;
|
|
2057
|
+
background: #e2e8f0;
|
|
2058
|
+
color: #64748b;
|
|
2059
|
+
display: inline-flex;
|
|
2060
|
+
align-items: center;
|
|
2061
|
+
justify-content: center;
|
|
1639
2062
|
cursor: pointer;
|
|
2063
|
+
margin-right: 4px;
|
|
2064
|
+
padding: 0;
|
|
2065
|
+
font-size: 12px;
|
|
2066
|
+
line-height: 1;
|
|
1640
2067
|
flex-shrink: 0;
|
|
1641
2068
|
|
|
1642
2069
|
&:hover {
|
|
1643
|
-
|
|
2070
|
+
background: #cbd5e1;
|
|
2071
|
+
color: #1e293b;
|
|
1644
2072
|
}
|
|
1645
2073
|
}
|
|
1646
2074
|
|
|
1647
|
-
.
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
2075
|
+
.stock-search-divider {
|
|
2076
|
+
width: 1px;
|
|
2077
|
+
height: 16px;
|
|
2078
|
+
background: #e2e8f0;
|
|
2079
|
+
margin: 0 4px;
|
|
2080
|
+
flex-shrink: 0;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
.stock-filter-trigger-btn {
|
|
2084
|
+
position: relative;
|
|
2085
|
+
width: 26px;
|
|
2086
|
+
height: 24px;
|
|
2087
|
+
border: none;
|
|
2088
|
+
background: transparent;
|
|
2089
|
+
color: #64748b;
|
|
2090
|
+
border-radius: 6px;
|
|
2091
|
+
cursor: pointer;
|
|
1652
2092
|
display: flex;
|
|
1653
|
-
|
|
1654
|
-
|
|
2093
|
+
align-items: center;
|
|
2094
|
+
justify-content: center;
|
|
2095
|
+
padding: 0;
|
|
2096
|
+
transition: all 0.15s;
|
|
2097
|
+
flex-shrink: 0;
|
|
1655
2098
|
|
|
1656
|
-
|
|
1657
|
-
|
|
2099
|
+
&:hover {
|
|
2100
|
+
color: #1e293b;
|
|
1658
2101
|
}
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
2102
|
+
|
|
2103
|
+
&.is-active {
|
|
2104
|
+
background: transparent;
|
|
2105
|
+
color: #2563eb;
|
|
1662
2106
|
}
|
|
1663
2107
|
}
|
|
1664
2108
|
|
|
1665
|
-
.
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
2109
|
+
.stock-filter-count-dot {
|
|
2110
|
+
position: absolute;
|
|
2111
|
+
top: -3px;
|
|
2112
|
+
right: -3px;
|
|
2113
|
+
min-width: 14px;
|
|
2114
|
+
height: 14px;
|
|
2115
|
+
padding: 0 3px;
|
|
2116
|
+
border-radius: 999px;
|
|
2117
|
+
background: #2563eb;
|
|
2118
|
+
color: #ffffff;
|
|
2119
|
+
font-size: 9px;
|
|
2120
|
+
font-weight: 700;
|
|
2121
|
+
display: inline-flex;
|
|
2122
|
+
align-items: center;
|
|
2123
|
+
justify-content: center;
|
|
2124
|
+
border: 1.5px solid #ffffff;
|
|
2125
|
+
line-height: 1;
|
|
2126
|
+
box-sizing: border-box;
|
|
1669
2127
|
}
|
|
1670
2128
|
|
|
1671
|
-
.
|
|
2129
|
+
.stock-active-filter-chips {
|
|
2130
|
+
display: flex;
|
|
2131
|
+
flex-wrap: wrap;
|
|
2132
|
+
gap: 5px;
|
|
2133
|
+
margin-top: 8px;
|
|
2134
|
+
padding-top: 2px;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
.stock-filter-chip {
|
|
2138
|
+
display: inline-flex;
|
|
2139
|
+
align-items: center;
|
|
2140
|
+
gap: 4px;
|
|
2141
|
+
padding: 2px 7px;
|
|
2142
|
+
background: #eff6ff;
|
|
2143
|
+
border: 1px solid #bfdbfe;
|
|
2144
|
+
border-radius: 999px;
|
|
2145
|
+
font-size: 11px;
|
|
2146
|
+
color: #1d4ed8;
|
|
2147
|
+
font-weight: 500;
|
|
2148
|
+
cursor: pointer;
|
|
2149
|
+
transition: all 0.15s;
|
|
2150
|
+
|
|
2151
|
+
&:hover {
|
|
2152
|
+
background: #dbeafe;
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
.stock-chip-color-dot {
|
|
2157
|
+
width: 8px;
|
|
2158
|
+
height: 8px;
|
|
2159
|
+
border-radius: 50%;
|
|
2160
|
+
border: 1px solid rgba(0, 0, 0, 0.12);
|
|
2161
|
+
flex-shrink: 0;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
.stock-chip-close {
|
|
2165
|
+
font-size: 12px;
|
|
2166
|
+
line-height: 1;
|
|
2167
|
+
color: #60a5fa;
|
|
2168
|
+
margin-left: 1px;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
.stock-filter-chip:hover .stock-chip-close {
|
|
2172
|
+
color: #1d4ed8;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
.stock-filter-popover {
|
|
2176
|
+
position: absolute;
|
|
2177
|
+
top: calc(100% + 8px);
|
|
2178
|
+
left: 0;
|
|
2179
|
+
right: 0;
|
|
2180
|
+
background: #ffffff;
|
|
2181
|
+
border: 1px solid #e2e8f0;
|
|
2182
|
+
border-radius: 12px;
|
|
2183
|
+
box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.18), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
|
|
2184
|
+
z-index: 100;
|
|
2185
|
+
display: flex;
|
|
2186
|
+
flex-direction: column;
|
|
2187
|
+
max-height: 520px;
|
|
2188
|
+
overflow: hidden;
|
|
2189
|
+
animation: stockPopoverSlideIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
@keyframes stockPopoverSlideIn {
|
|
2193
|
+
from {
|
|
2194
|
+
opacity: 0;
|
|
2195
|
+
transform: translateY(-6px) scale(0.98);
|
|
2196
|
+
}
|
|
2197
|
+
to {
|
|
2198
|
+
opacity: 1;
|
|
2199
|
+
transform: translateY(0) scale(1);
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
.stock-filter-popover-body {
|
|
2204
|
+
padding: 14px 14px 10px;
|
|
2205
|
+
overflow-y: auto;
|
|
2206
|
+
scrollbar-width: thin;
|
|
2207
|
+
scrollbar-color: #cbd5e1 transparent;
|
|
2208
|
+
|
|
2209
|
+
&::-webkit-scrollbar {
|
|
2210
|
+
width: 4px;
|
|
2211
|
+
}
|
|
2212
|
+
&::-webkit-scrollbar-thumb {
|
|
2213
|
+
background: #cbd5e1;
|
|
2214
|
+
border-radius: 4px;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
.stock-filter-section {
|
|
2219
|
+
margin-bottom: 14px;
|
|
2220
|
+
|
|
2221
|
+
&:last-child {
|
|
2222
|
+
margin-bottom: 4px;
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
.stock-filter-section-header {
|
|
2227
|
+
display: flex;
|
|
2228
|
+
align-items: center;
|
|
2229
|
+
justify-content: space-between;
|
|
2230
|
+
margin-bottom: 8px;
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
.stock-filter-section-title {
|
|
2234
|
+
font-size: 12.5px;
|
|
2235
|
+
font-weight: 600;
|
|
2236
|
+
color: #1e293b;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
.stock-filter-section-sub {
|
|
2240
|
+
font-size: 11px;
|
|
2241
|
+
color: #64748b;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
/* 1. 颜色圆点矩阵 */
|
|
2245
|
+
.stock-color-grid {
|
|
2246
|
+
display: grid;
|
|
2247
|
+
grid-template-columns: repeat(7, 1fr);
|
|
2248
|
+
gap: 8px 6px;
|
|
2249
|
+
justify-items: center;
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
.stock-color-swatch {
|
|
2253
|
+
width: 24px;
|
|
2254
|
+
height: 24px;
|
|
2255
|
+
border-radius: 50%;
|
|
2256
|
+
cursor: pointer;
|
|
2257
|
+
position: relative;
|
|
2258
|
+
display: flex;
|
|
2259
|
+
align-items: center;
|
|
2260
|
+
justify-content: center;
|
|
2261
|
+
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
|
2262
|
+
border: 1px solid rgba(15, 23, 42, 0.08);
|
|
2263
|
+
background-origin: border-box;
|
|
2264
|
+
background-clip: border-box;
|
|
2265
|
+
background-repeat: no-repeat;
|
|
2266
|
+
overflow: hidden;
|
|
2267
|
+
box-sizing: border-box;
|
|
2268
|
+
|
|
2269
|
+
&:hover {
|
|
2270
|
+
transform: scale(1.12);
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
&.is-none {
|
|
2274
|
+
background: #ffffff;
|
|
2275
|
+
border: 1.5px solid #94a3b8;
|
|
2276
|
+
color: #64748b;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
&.is-white,
|
|
2280
|
+
&.is-grayscale {
|
|
2281
|
+
border: 1px solid #cbd5e1;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
&.selected {
|
|
2285
|
+
box-shadow: 0 0 0 2px #ffffff, 0 0 0 3.5px #2563eb;
|
|
2286
|
+
transform: scale(1.06);
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
/* 2. 画幅比例 2列单选框 */
|
|
2291
|
+
.stock-orientation-grid {
|
|
2292
|
+
display: grid;
|
|
2293
|
+
grid-template-columns: 1fr 1fr;
|
|
2294
|
+
gap: 7px 10px;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
.stock-radio-item {
|
|
2298
|
+
display: flex;
|
|
2299
|
+
align-items: center;
|
|
2300
|
+
gap: 7px;
|
|
2301
|
+
padding: 4px 2px;
|
|
2302
|
+
border-radius: 7px;
|
|
2303
|
+
cursor: pointer;
|
|
2304
|
+
transition: all 0.14s;
|
|
2305
|
+
border: 1px solid transparent;
|
|
2306
|
+
background: transparent;
|
|
2307
|
+
|
|
2308
|
+
&:hover:not(.disabled) .stock-radio-circle {
|
|
2309
|
+
border-color: #94a3b8;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
&.selected {
|
|
2313
|
+
background: transparent;
|
|
2314
|
+
border-color: transparent;
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
&.disabled {
|
|
2318
|
+
opacity: 0.42;
|
|
2319
|
+
cursor: not-allowed;
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
.stock-radio-circle {
|
|
2324
|
+
width: 15px;
|
|
2325
|
+
height: 15px;
|
|
2326
|
+
border-radius: 50%;
|
|
2327
|
+
border: 1.5px solid #cbd5e1;
|
|
2328
|
+
display: flex;
|
|
2329
|
+
align-items: center;
|
|
2330
|
+
justify-content: center;
|
|
2331
|
+
flex-shrink: 0;
|
|
2332
|
+
background: #ffffff;
|
|
2333
|
+
transition: all 0.15s;
|
|
2334
|
+
box-sizing: border-box;
|
|
2335
|
+
|
|
2336
|
+
&::after {
|
|
2337
|
+
content: "";
|
|
2338
|
+
width: 5px;
|
|
2339
|
+
height: 5px;
|
|
2340
|
+
border-radius: 50%;
|
|
2341
|
+
background: #ffffff;
|
|
2342
|
+
opacity: 0;
|
|
2343
|
+
transition: opacity 0.15s;
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
.stock-radio-item.selected .stock-radio-circle {
|
|
2348
|
+
border-color: #2563eb;
|
|
2349
|
+
background: #2563eb;
|
|
2350
|
+
|
|
2351
|
+
&::after {
|
|
2352
|
+
opacity: 1;
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
.stock-radio-label {
|
|
2357
|
+
font-size: 12px;
|
|
2358
|
+
color: #334155;
|
|
2359
|
+
font-weight: 500;
|
|
2360
|
+
white-space: nowrap;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
.stock-radio-item.selected .stock-radio-label {
|
|
2364
|
+
color: #1d4ed8;
|
|
2365
|
+
font-weight: 600;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
/* 3. 题材分类 3列胶囊 */
|
|
2369
|
+
.stock-topic-pills-wrap {
|
|
2370
|
+
display: grid;
|
|
2371
|
+
grid-template-columns: repeat(3, 1fr);
|
|
2372
|
+
gap: 6px;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
.stock-topic-pill {
|
|
2376
|
+
padding: 5px 4px;
|
|
2377
|
+
text-align: center;
|
|
2378
|
+
font-size: 11.5px;
|
|
2379
|
+
color: #475569;
|
|
2380
|
+
background: #f8fafc;
|
|
2381
|
+
border: 1px solid #e2e8f0;
|
|
2382
|
+
border-radius: 6px;
|
|
2383
|
+
cursor: pointer;
|
|
2384
|
+
transition: all 0.14s;
|
|
2385
|
+
white-space: nowrap;
|
|
2386
|
+
overflow: hidden;
|
|
2387
|
+
text-overflow: ellipsis;
|
|
2388
|
+
|
|
2389
|
+
&:hover {
|
|
2390
|
+
background: #f1f5f9;
|
|
2391
|
+
color: #1e293b;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
&.selected {
|
|
2395
|
+
background: #eff6ff;
|
|
2396
|
+
color: #2563eb;
|
|
2397
|
+
border-color: #93c5fd;
|
|
2398
|
+
font-weight: 600;
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
.stock-topic-expand-btn {
|
|
2403
|
+
grid-column: span 3;
|
|
2404
|
+
border: none;
|
|
2405
|
+
background: transparent;
|
|
2406
|
+
color: #2563eb;
|
|
2407
|
+
font-size: 11.5px;
|
|
2408
|
+
padding: 3px 0;
|
|
2409
|
+
cursor: pointer;
|
|
2410
|
+
display: flex;
|
|
2411
|
+
align-items: center;
|
|
2412
|
+
justify-content: center;
|
|
2413
|
+
gap: 3px;
|
|
2414
|
+
|
|
2415
|
+
&:hover {
|
|
2416
|
+
text-decoration: underline;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
/* 4. 尺寸大小 */
|
|
2421
|
+
.stock-size-presets-grid {
|
|
2422
|
+
display: grid;
|
|
2423
|
+
grid-template-columns: repeat(2, 1fr);
|
|
2424
|
+
gap: 6px;
|
|
2425
|
+
margin-bottom: 8px;
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
.stock-size-pill {
|
|
2429
|
+
padding: 6px 10px;
|
|
2430
|
+
font-size: 12px;
|
|
2431
|
+
color: #334155;
|
|
2432
|
+
background: #f8fafc;
|
|
2433
|
+
border: 1px solid #e2e8f0;
|
|
2434
|
+
border-radius: 7px;
|
|
2435
|
+
cursor: pointer;
|
|
2436
|
+
display: flex;
|
|
2437
|
+
flex-direction: column;
|
|
2438
|
+
align-items: flex-start;
|
|
2439
|
+
justify-content: center;
|
|
2440
|
+
gap: 2px;
|
|
2441
|
+
min-height: 42px;
|
|
2442
|
+
white-space: nowrap;
|
|
2443
|
+
box-sizing: border-box;
|
|
2444
|
+
transition: all 0.14s;
|
|
2445
|
+
|
|
2446
|
+
&.is-all-size {
|
|
2447
|
+
grid-column: span 2;
|
|
2448
|
+
flex-direction: row;
|
|
2449
|
+
align-items: center;
|
|
2450
|
+
justify-content: space-between;
|
|
2451
|
+
min-height: 32px;
|
|
2452
|
+
padding: 5px 10px;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
&:hover {
|
|
2456
|
+
background: #f1f5f9;
|
|
2457
|
+
border-color: #cbd5e1;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
&.selected {
|
|
2461
|
+
background: #eff6ff;
|
|
2462
|
+
color: #2563eb;
|
|
2463
|
+
border-color: #93c5fd;
|
|
2464
|
+
font-weight: 600;
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
.stock-size-pill-title {
|
|
2469
|
+
font-size: 12px;
|
|
2470
|
+
line-height: 1.2;
|
|
2471
|
+
white-space: nowrap;
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
.stock-size-pill-sub {
|
|
2475
|
+
font-size: 10.5px;
|
|
2476
|
+
line-height: 1.2;
|
|
2477
|
+
color: #94a3b8;
|
|
2478
|
+
font-weight: 400;
|
|
2479
|
+
white-space: nowrap;
|
|
2480
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
.stock-size-pill.selected .stock-size-pill-sub {
|
|
2484
|
+
color: #3b82f6;
|
|
2485
|
+
}
|
|
2486
|
+
|
|
2487
|
+
.stock-custom-size-row {
|
|
2488
|
+
display: flex;
|
|
2489
|
+
align-items: center;
|
|
2490
|
+
gap: 6px;
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
.stock-size-input {
|
|
2494
|
+
flex: 1;
|
|
2495
|
+
width: 0;
|
|
2496
|
+
height: 28px;
|
|
2497
|
+
border: 1px solid #cbd5e1;
|
|
2498
|
+
border-radius: 6px;
|
|
2499
|
+
padding: 0 8px;
|
|
2500
|
+
font-size: 11.5px;
|
|
2501
|
+
color: #1e293b;
|
|
2502
|
+
outline: none;
|
|
2503
|
+
background: #ffffff;
|
|
2504
|
+
box-sizing: border-box;
|
|
2505
|
+
-moz-appearance: textfield;
|
|
2506
|
+
appearance: textfield;
|
|
2507
|
+
|
|
2508
|
+
&:focus {
|
|
2509
|
+
border-color: #2563eb;
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
&::-webkit-outer-spin-button,
|
|
2513
|
+
&::-webkit-inner-spin-button {
|
|
2514
|
+
-webkit-appearance: none;
|
|
2515
|
+
margin: 0;
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
.stock-size-mul {
|
|
2520
|
+
font-size: 12px;
|
|
2521
|
+
color: #94a3b8;
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2524
|
+
.stock-filter-popover-footer {
|
|
2525
|
+
padding: 10px 14px;
|
|
2526
|
+
border-top: 1px solid #f1f5f9;
|
|
2527
|
+
background: #ffffff;
|
|
2528
|
+
display: flex;
|
|
2529
|
+
align-items: center;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
.stock-clear-all-btn {
|
|
2533
|
+
flex: 1;
|
|
2534
|
+
height: 32px;
|
|
2535
|
+
border-radius: 8px;
|
|
2536
|
+
border: 1px solid #e2e8f0;
|
|
2537
|
+
background: #ffffff;
|
|
2538
|
+
color: #94a3b8;
|
|
2539
|
+
font-size: 12.5px;
|
|
2540
|
+
font-weight: 500;
|
|
2541
|
+
cursor: not-allowed;
|
|
2542
|
+
transition: all 0.15s;
|
|
2543
|
+
|
|
2544
|
+
&.has-active {
|
|
2545
|
+
color: #334155;
|
|
2546
|
+
border-color: #cbd5e1;
|
|
2547
|
+
cursor: pointer;
|
|
2548
|
+
|
|
2549
|
+
&:hover {
|
|
2550
|
+
background: #f8fafc;
|
|
2551
|
+
color: #0f172a;
|
|
2552
|
+
border-color: #94a3b8;
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2557
|
+
.stock-content-dimmer {
|
|
2558
|
+
position: absolute;
|
|
2559
|
+
inset: 0;
|
|
2560
|
+
background: transparent;
|
|
2561
|
+
z-index: 25;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
/* ==================== 图二:概览视图样式 ==================== */
|
|
2565
|
+
.material-overview-body {
|
|
2566
|
+
position: relative;
|
|
2567
|
+
flex: 1;
|
|
2568
|
+
min-height: 0;
|
|
2569
|
+
display: flex;
|
|
2570
|
+
flex-direction: column;
|
|
2571
|
+
overflow: hidden;
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
.overview-sections-scroll {
|
|
2575
|
+
flex: 1;
|
|
2576
|
+
min-height: 0;
|
|
2577
|
+
overflow-y: auto;
|
|
2578
|
+
padding: 8px 16px 20px;
|
|
2579
|
+
display: flex;
|
|
2580
|
+
flex-direction: column;
|
|
2581
|
+
gap: 18px;
|
|
2582
|
+
|
|
2583
|
+
&::-webkit-scrollbar {
|
|
2584
|
+
width: 4px;
|
|
2585
|
+
}
|
|
2586
|
+
&::-webkit-scrollbar-thumb {
|
|
2587
|
+
background: #e2e8f0;
|
|
2588
|
+
border-radius: 2px;
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
.overview-category-section {
|
|
2593
|
+
display: flex;
|
|
2594
|
+
flex-direction: column;
|
|
2595
|
+
gap: 8px;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
.section-header-row {
|
|
1672
2599
|
display: flex;
|
|
1673
2600
|
align-items: center;
|
|
1674
2601
|
justify-content: space-between;
|
|
@@ -1844,6 +2771,7 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1844
2771
|
|
|
1845
2772
|
/* ==================== 图三:详情视图样式 ==================== */
|
|
1846
2773
|
.material-detail-body {
|
|
2774
|
+
position: relative;
|
|
1847
2775
|
flex: 1;
|
|
1848
2776
|
min-height: 0;
|
|
1849
2777
|
display: flex;
|
|
@@ -1851,83 +2779,11 @@ watch([() => materialApiUrl?.value, () => materialPageApiUrl?.value, () => mater
|
|
|
1851
2779
|
overflow: hidden;
|
|
1852
2780
|
}
|
|
1853
2781
|
|
|
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
2782
|
.detail-waterfall-scroll {
|
|
1927
2783
|
flex: 1;
|
|
1928
2784
|
min-height: 0;
|
|
1929
2785
|
overflow-y: auto;
|
|
1930
|
-
padding:
|
|
2786
|
+
padding: 6px 16px 16px;
|
|
1931
2787
|
|
|
1932
2788
|
&::-webkit-scrollbar {
|
|
1933
2789
|
width: 4px;
|