|
|
@@ -2,13 +2,9 @@
|
|
|
<template>
|
|
|
<div
|
|
|
v-if="showWorkTab"
|
|
|
- class="box-border flex-b w-full px-5 mb-3 select-none max-sm:px-[15px]"
|
|
|
- :class="[
|
|
|
- tabStyle === 'tab-card' ? 'py-1 border-b border-[var(--art-card-border)]' : '',
|
|
|
- tabStyle === 'tab-google' ? 'pt-1 pb-0 border-b border-[var(--art-card-border)]' : ''
|
|
|
- ]"
|
|
|
+ class="worktab-strip box-border flex-b w-full px-5 mb-3 select-none max-sm:px-[15px]"
|
|
|
>
|
|
|
- <div class="w-full overflow-hidden" ref="scrollRef">
|
|
|
+ <div class="worktab-scroll-wrap w-full" ref="scrollRef">
|
|
|
<ul
|
|
|
class="float-left whitespace-nowrap !bg-transparent flex"
|
|
|
:class="[tabStyle === 'tab-google' ? 'pl-1' : '']"
|
|
|
@@ -19,24 +15,14 @@
|
|
|
}"
|
|
|
>
|
|
|
<li
|
|
|
- class="art-card-xs inline-flex flex-cc h-8 mr-1.5 text-xs c-p hover:text-theme group"
|
|
|
- :class="[
|
|
|
- item.path === activeTab ? 'activ-tab !text-theme' : '',
|
|
|
- tabStyle === 'tab-google' ? 'google-tab relative !h-8 !leading-8 !border-none' : ''
|
|
|
- ]"
|
|
|
- :style="{
|
|
|
- padding: item.fixedTab ? '0 10px' : '0 8px 0 12px',
|
|
|
- borderRadius:
|
|
|
- tabStyle === 'tab-google'
|
|
|
- ? 'calc(var(--custom-radius) / 2.5 + 4px) !important'
|
|
|
- : 'calc(var(--custom-radius) / 2.5 + 2px) !important'
|
|
|
- }"
|
|
|
+ class="worktab-chip inline-flex flex-cc mr-1.5 text-xs c-p group"
|
|
|
+ :class="[item.path === activeTab ? 'is-active' : '', item.fixedTab ? 'is-fixed' : '']"
|
|
|
v-for="(item, index) in list"
|
|
|
:key="item.path"
|
|
|
:ref="item.path"
|
|
|
:id="`scroll-li-${index}`"
|
|
|
@click="clickTab(item)"
|
|
|
- @contextmenu.prevent="(e: MouseEvent) => showMenu(e, item.path)"
|
|
|
+ @contextmenu.prevent="(e) => showMenu(e, item.path)"
|
|
|
>
|
|
|
<ArtSvgIcon
|
|
|
v-show="item.icon"
|
|
|
@@ -47,27 +33,19 @@
|
|
|
{{ item.customTitle || formatMenuTitle(item.title) }}
|
|
|
<span
|
|
|
v-if="list.length > 1 && !item.fixedTab"
|
|
|
- class="inline-flex flex-cc relative ml-0.5 p-1 rounded-full tad-200 hover:bg-g-200"
|
|
|
+ class="worktab-close inline-flex flex-cc relative ml-0.5 p-1 rounded-full tad-200"
|
|
|
@click.stop="closeWorktab('current', item.path)"
|
|
|
>
|
|
|
<ArtSvgIcon icon="ri:close-large-fill" class="text-[10px] text-inherit" />
|
|
|
</span>
|
|
|
- <div
|
|
|
- v-if="tabStyle === 'tab-google'"
|
|
|
- class="line absolute top-0 bottom-0 left-0 w-px h-4 my-auto bg-g-400 transition-opacity duration-150"
|
|
|
- />
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
|
|
|
<div class="flex">
|
|
|
<div
|
|
|
- class="flex-cc art-card-xs relative top-0 size-8 leading-8 text-center c-p tad-200 hover:!bg-hover-color"
|
|
|
- :style="{
|
|
|
- borderRadius: 'calc(var(--custom-radius) / 2.5 + 0px)',
|
|
|
- marginTop: tabStyle === 'tab-google' ? '-2px' : ''
|
|
|
- }"
|
|
|
- @click="(e: MouseEvent) => showMenu(e, activeTab)"
|
|
|
+ class="worktab-menu-btn flex-cc relative top-0 size-8 leading-8 text-center c-p tad-200"
|
|
|
+ @click="(e) => showMenu(e, activeTab)"
|
|
|
>
|
|
|
<ArtSvgIcon icon="iconamoon:arrow-down-2-thin" class="text-2xl text-g-700" />
|
|
|
</div>
|
|
|
@@ -480,103 +458,91 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- .google-tab.activ-tab {
|
|
|
- color: var(--theme-color) !important;
|
|
|
- background-color: var(--el-color-primary-light-9) !important;
|
|
|
- border-bottom: 0 !important;
|
|
|
- border-bottom-right-radius: 0 !important;
|
|
|
- border-bottom-left-radius: 0 !important;
|
|
|
- }
|
|
|
-
|
|
|
- .google-tab.activ-tab::before,
|
|
|
- .google-tab.activ-tab::after {
|
|
|
- position: absolute;
|
|
|
- bottom: 0;
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
- content: '';
|
|
|
- border-radius: 50%;
|
|
|
- box-shadow: 0 0 0 30px var(--el-color-primary-light-9);
|
|
|
+ .worktab-strip {
|
|
|
+ position: relative;
|
|
|
+ padding: 0 24px 12px !important;
|
|
|
+ background: var(--mint-surface);
|
|
|
+ overflow: visible !important;
|
|
|
}
|
|
|
|
|
|
- .google-tab.activ-tab::before {
|
|
|
- left: -20px;
|
|
|
- clip-path: inset(50% -10px 0 50%);
|
|
|
+ .worktab-scroll-wrap {
|
|
|
+ overflow-x: clip;
|
|
|
+ overflow-y: visible;
|
|
|
}
|
|
|
|
|
|
- .google-tab.activ-tab::after {
|
|
|
- right: -20px;
|
|
|
- clip-path: inset(50% 50% 0 -10px);
|
|
|
+ .worktab-chip {
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ max-width: 220px;
|
|
|
+ padding: 10px 16px !important;
|
|
|
+ margin-bottom: -11px;
|
|
|
+ overflow: hidden;
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: var(--mint-text-muted);
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ background: var(--mint-surface);
|
|
|
+ border: 1px solid var(--mint-border);
|
|
|
+ border-radius: 8px 8px 0 0 !important;
|
|
|
+ transform: translateY(1px);
|
|
|
}
|
|
|
|
|
|
- .dark .google-tab.activ-tab {
|
|
|
- color: var(--art-gray-800) !important;
|
|
|
- background-color: var(--art-hover-color) !important;
|
|
|
+ .worktab-chip.is-fixed {
|
|
|
+ padding-right: 12px !important;
|
|
|
+ padding-left: 12px !important;
|
|
|
}
|
|
|
|
|
|
- .dark .google-tab.activ-tab::before,
|
|
|
- .dark .google-tab.activ-tab::after {
|
|
|
- box-shadow: 0 0 0 30px var(--art-hover-color);
|
|
|
+ .worktab-chip:hover {
|
|
|
+ color: var(--mint-text);
|
|
|
+ background: var(--mint-row-alt);
|
|
|
}
|
|
|
|
|
|
- .google-tab:not(.activ-tab):hover {
|
|
|
- box-sizing: border-box;
|
|
|
- color: var(--art-gray-600) !important;
|
|
|
- background-color: var(--art-gray-200) !important;
|
|
|
- border-bottom: 1px solid var(--default-box-color) !important;
|
|
|
- border-radius: calc(var(--custom-radius) / 2.5 + 4px) !important;
|
|
|
+ .worktab-chip.is-active {
|
|
|
+ z-index: 2;
|
|
|
+ color: var(--mint-primary-dark);
|
|
|
+ border-bottom-color: var(--mint-surface);
|
|
|
+ box-shadow: none;
|
|
|
}
|
|
|
|
|
|
- .dark .google-tab:not(.activ-tab):hover {
|
|
|
- background-color: var(--art-hover-color) !important;
|
|
|
- }
|
|
|
-
|
|
|
- .google-tab:hover .line,
|
|
|
- .google-tab.activ-tab .line,
|
|
|
- .google-tab:first-child .line {
|
|
|
- opacity: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .google-tab:hover + .google-tab .line,
|
|
|
- .google-tab.activ-tab + .google-tab .line {
|
|
|
- opacity: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .google-tab::before,
|
|
|
- .google-tab::after {
|
|
|
- position: absolute;
|
|
|
- bottom: 0;
|
|
|
- width: 20px;
|
|
|
- height: 20px;
|
|
|
+ .worktab-chip.is-active::after {
|
|
|
content: '';
|
|
|
- border-radius: 50%;
|
|
|
- box-shadow: 0 0 0 30px transparent;
|
|
|
+ position: absolute;
|
|
|
+ z-index: 3;
|
|
|
+ right: 0;
|
|
|
+ bottom: 1px;
|
|
|
+ left: 0;
|
|
|
+ height: 2px;
|
|
|
+ background: var(--mint-primary);
|
|
|
+ pointer-events: none;
|
|
|
}
|
|
|
|
|
|
- .google-tab::before {
|
|
|
- left: -20px;
|
|
|
- clip-path: inset(50% -10px 0 50%);
|
|
|
+ .worktab-close:hover {
|
|
|
+ background: var(--mint-row-alt);
|
|
|
}
|
|
|
|
|
|
- .google-tab::after {
|
|
|
- right: -20px;
|
|
|
- clip-path: inset(50% 50% 0 -10px);
|
|
|
+ .worktab-menu-btn {
|
|
|
+ margin-left: 6px;
|
|
|
+ color: var(--mint-text-muted);
|
|
|
+ border: 1px solid var(--mint-border);
|
|
|
+ border-radius: 8px;
|
|
|
+ background: var(--mint-surface);
|
|
|
}
|
|
|
|
|
|
- .google-tab i:hover {
|
|
|
- color: var(--art-gray-700);
|
|
|
- background: var(--art-gray-300);
|
|
|
+ .worktab-menu-btn:hover {
|
|
|
+ color: var(--mint-text);
|
|
|
+ background: var(--mint-row-alt);
|
|
|
}
|
|
|
|
|
|
@media only screen and (width <= 768px) {
|
|
|
- .box-border.flex.justify-between {
|
|
|
+ .worktab-strip {
|
|
|
padding-right: 0.625rem;
|
|
|
padding-left: 0.625rem;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@media only screen and (width <= 640px) {
|
|
|
- .box-border.flex.justify-between {
|
|
|
+ .worktab-strip {
|
|
|
padding-right: 0.9375rem;
|
|
|
padding-left: 0.9375rem;
|
|
|
}
|