@@ -73,6 +73,10 @@ const props = defineProps({
73
73
required: false ,
74
74
default: false ,
75
75
},
76
+ showTagLoader: {
77
+ type: Boolean ,
78
+ required: false ,
79
+ },
76
80
});
77
81
78
82
const { item, hideDate, showProgress, showPlayed, showCollected } = toRefs (props );
@@ -256,38 +260,64 @@ const onTagClick = (url?: string) => {
256
260
>
257
261
<div ref =" innerContainer" >
258
262
<div class =" meta type" >
259
- <NSkeleton v-if =" loading" style =" width : 10% " round />
263
+ <NSkeleton
264
+ v-if =" loading"
265
+ style =" width : 45px ; height : 14px ; margin-bottom : 0.25rem "
266
+ round
267
+ />
260
268
<AnchorLink v-else text v-bind =" item?.typeLink" >
261
269
<NEllipsis :line-clamp =" 1" :tooltip =" tooltipOptions" >{{ type }}</NEllipsis >
262
270
</AnchorLink >
263
271
</div >
264
272
<div class =" title" >
265
- <NSkeleton v-if =" loading" text style =" width : 70% " round />
273
+ <NSkeleton v-if =" loading" text style =" width : 70% ; height : 16 px " round />
266
274
<AnchorLink v-else text v-bind =" item?.titleLink" >
267
275
<NEllipsis :line-clamp =" 2" :tooltip =" tooltipOptions" >
268
276
{{ title }}
269
277
</NEllipsis >
270
278
</AnchorLink >
271
279
</div >
272
280
<div class =" content" >
273
- <NSkeleton v-if =" loading" text style =" width : 60% " round />
281
+ <NSkeleton
282
+ v-if =" loading"
283
+ text
284
+ style =" width : 60% ; height : 14px ; margin : 0.25rem 0 "
285
+ round
286
+ />
274
287
<AnchorLink v-else text v-bind =" item?.contentLink" >
275
288
<NEllipsis :line-clamp =" contentHeight" :tooltip =" tooltipOptions" >
276
289
{{ content }}
277
290
</NEllipsis >
278
291
</AnchorLink >
279
292
</div >
280
293
<NFlex
281
- v-if =" (!hideTime && date) || tags?.length || showCollected || showPlayed"
294
+ v-if ="
295
+ (!hideTime && date) ||
296
+ (loading && showTagLoader) ||
297
+ tags?.length ||
298
+ showCollected ||
299
+ showPlayed
300
+ "
282
301
size =" medium"
283
302
class =" tags"
284
303
>
285
- <template v-for =" (tag , i ) of tags " :key =" ` ${i }-${tag .label } ` " >
286
- <NSkeleton v-if =" loading" text style =" width : 6% " />
287
- <TagLink :tag =" tag" @on-click =" onTagClick" />
304
+ <template v-if =" loading && showTagLoader " >
305
+ <NSkeleton text style =" width : 120px ; height : 18px " />
306
+ </template >
307
+ <template v-else >
308
+ <template v-for =" (tag , i ) of tags " :key =" ` ${i }-${tag .label } ` " >
309
+ <NSkeleton v-if =" loading" text style =" width : 6% " />
310
+ <TagLink :tag =" tag" @on-click =" onTagClick" />
311
+ </template >
288
312
</template >
313
+
289
314
<template v-if =" ! hideTime && date " >
290
- <NSkeleton v-if =" loading" key =" date-loader" text style =" width : 8% " />
315
+ <NSkeleton
316
+ v-if =" loading"
317
+ key =" date-loader"
318
+ text
319
+ style =" width : 42px ; height : 18px "
320
+ />
291
321
<NTag
292
322
v-else
293
323
key =" date"
@@ -300,7 +330,12 @@ const onTagClick = (url?: string) => {
300
330
</NTag >
301
331
</template >
302
332
<template v-if =" showCollected && collected " >
303
- <NSkeleton v-if =" loading" key =" collected-loader" text style =" width : 3% " />
333
+ <NSkeleton
334
+ v-if =" loading"
335
+ key =" collected-loader"
336
+ text
337
+ style =" width : 22px ; height : 18px "
338
+ />
304
339
<NTag
305
340
v-else
306
341
key =" collected"
@@ -319,7 +354,12 @@ const onTagClick = (url?: string) => {
319
354
</NTag >
320
355
</template >
321
356
<template v-if =" showPlayed && played " >
322
- <NSkeleton v-if =" loading" key =" played-loader" text style =" width : 3% " />
357
+ <NSkeleton
358
+ v-if =" loading"
359
+ key =" played-loader"
360
+ text
361
+ style =" width : 22px ; height : 18px "
362
+ />
323
363
<NTag
324
364
v-else
325
365
key =" played"
@@ -337,8 +377,20 @@ const onTagClick = (url?: string) => {
337
377
</NTag >
338
378
</template >
339
379
</NFlex >
340
- <div v-if =" showProgress && !loading" class =" panel-progress" >
341
- <ProgressTooltip :progress =" progress" :to =" innerContainer" placement =" top-end" >
380
+ <div v-if =" showProgress" class =" panel-progress" >
381
+ <NSkeleton
382
+ v-if =" loading"
383
+ key =" progress-loader"
384
+ text
385
+ style =" display : flex ; width : 100% ; height : 4px "
386
+ round
387
+ />
388
+ <ProgressTooltip
389
+ v-else
390
+ :progress =" progress"
391
+ :to =" innerContainer"
392
+ placement =" top-end"
393
+ >
342
394
<NProgress
343
395
class =" line"
344
396
:data-show-id =" progress?.id"
0 commit comments