@@ -33,6 +33,8 @@ const affixTagArr = ref<RouteLocationNormalizedLoaded[]>([])
33
33
34
34
const appStore = useAppStore ()
35
35
36
+ const tagsViewImmerse = computed (() => appStore .getTagsViewImmerse )
37
+
36
38
const tagsViewIcon = computed (() => appStore .getTagsViewIcon )
37
39
38
40
const isDark = computed (() => appStore .getIsDark )
@@ -266,7 +268,7 @@ watch(
266
268
class =" relative w-full flex bg-[#fff] dark:bg-[var(--el-bg-color)]"
267
269
>
268
270
<span
269
- :class =" `${prefixCls}__tool ${prefixCls}__tool--first`"
271
+ :class =" tagsViewImmerse ? '' : `${prefixCls}__tool ${prefixCls}__tool--first`"
270
272
class =" h-[var(--tags-view-height)] w-[var(--tags-view-height)] flex cursor-pointer items-center justify-center"
271
273
@click =" move(-200)"
272
274
>
@@ -343,6 +345,9 @@ watch(
343
345
:tag-item =" item"
344
346
:class =" [
345
347
`${prefixCls}__item`,
348
+ tagsViewImmerse ? `${prefixCls}__item--immerse` : '',
349
+ tagsViewIcon ? `${prefixCls}__item--icon` : '',
350
+ tagsViewImmerse && tagsViewIcon ? `${prefixCls}__item--immerse--icon` : '',
346
351
item?.meta?.affix ? `${prefixCls}__item--affix` : '',
347
352
{
348
353
'is-active': isActive(item)
@@ -354,7 +359,7 @@ watch(
354
359
<router-link :ref =" tagLinksRefs.set" :to =" { ...item }" custom v-slot =" { navigate }" >
355
360
<div
356
361
@click =" navigate"
357
- class =" h-full flex items-center justify-center whitespace-nowrap pl-15px"
362
+ : class =" ` h-full flex items-center justify-center whitespace-nowrap pl-15px ${prefixCls}__item--label` "
358
363
>
359
364
<Icon
360
365
v-if ="
@@ -384,7 +389,7 @@ watch(
384
389
</ElScrollbar >
385
390
</div >
386
391
<span
387
- :class =" `${prefixCls}__tool`"
392
+ :class =" tagsViewImmerse ? '' : `${prefixCls}__tool`"
388
393
class =" h-[var(--tags-view-height)] w-[var(--tags-view-height)] flex cursor-pointer items-center justify-center"
389
394
@click =" move(200)"
390
395
>
@@ -395,7 +400,7 @@ watch(
395
400
/>
396
401
</span >
397
402
<span
398
- :class =" `${prefixCls}__tool`"
403
+ :class =" tagsViewImmerse ? '' : `${prefixCls}__tool`"
399
404
class =" h-[var(--tags-view-height)] w-[var(--tags-view-height)] flex cursor-pointer items-center justify-center"
400
405
@click =" refreshSelectedTag(selectedTag)"
401
406
>
@@ -460,7 +465,7 @@ watch(
460
465
]"
461
466
>
462
467
<span
463
- :class =" `${prefixCls}__tool`"
468
+ :class =" tagsViewImmerse ? '' : `${prefixCls}__tool`"
464
469
class =" block h-[var(--tags-view-height)] w-[var(--tags-view-height)] flex cursor-pointer items-center justify-center"
465
470
>
466
471
<Icon
@@ -512,7 +517,7 @@ $prefix-cls: #{$namespace}-tags-view;
512
517
position : relative ;
513
518
top : 2px ;
514
519
height : calc (100% - 6px );
515
- padding-right : 25 px ;
520
+ padding-right : 15 px ;
516
521
margin-left : 4px ;
517
522
font-size : 12px ;
518
523
cursor : pointer ;
@@ -533,6 +538,10 @@ $prefix-cls: #{$namespace}-tags-view;
533
538
}
534
539
}
535
540
541
+ & __item--icon {
542
+ padding-right : 20px ;
543
+ }
544
+
536
545
& __item :not (.is-active ) {
537
546
& :hover {
538
547
color : var (--el-color-primary );
@@ -549,6 +558,37 @@ $prefix-cls: #{$namespace}-tags-view;
549
558
}
550
559
}
551
560
}
561
+
562
+ & __item--immerse {
563
+ top : 3px ;
564
+ padding-right : 35px ;
565
+ margin : 0 -10px ;
566
+ border : 1px solid transparent ;
567
+ -webkit-mask-box-image : url (" data:image/svg+xml,%3Csvg width='68' height='34' viewBox='0 0 68 34' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m27,0c-7.99582,0 -11.95105,0.00205 -12,12l0,6c0,8.284 -0.48549,16.49691 -8.76949,16.49691l54.37857,-0.11145c-8.284,0 -8.60908,-8.10146 -8.60908,-16.38546l0,-6c0.11145,-12.08445 -4.38441,-12 -12,-12l-13,0z' fill='%23409eff'/%3E%3C/svg%3E" )
568
+ 12 27 15 ;
569
+ .#{$prefix-cls } __item--label {
570
+ padding-left : 35px ;
571
+ }
572
+ .#{$prefix-cls } __item--close {
573
+ right : 20px ;
574
+ }
575
+ }
576
+
577
+ & __item--immerse--icon {
578
+ padding-right : 35px ;
579
+ }
580
+
581
+ & __item--immerse :not (.is-active ) {
582
+ & :hover {
583
+ color : var (--el-color-white );
584
+ background-color : var (--el-color-primary );
585
+ .#{$prefix-cls } __item--close {
586
+ :deep (span ) {
587
+ color : var (--el-color-white ) !important ;
588
+ }
589
+ }
590
+ }
591
+ }
552
592
}
553
593
554
594
.dark {
0 commit comments