fix: style optimization
parent
c2c32332d3
commit
8b6d3a72e8
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
body {
|
body {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
overflow: overlay;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +89,20 @@
|
||||||
input[type='number']::-webkit-outer-spin-button {
|
input[type='number']::-webkit-outer-spin-button {
|
||||||
@apply m-0 appearance-none;
|
@apply m-0 appearance-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 考虑只在mac下打开 */
|
||||||
|
|
||||||
|
/* *::-webkit-scrollbar {
|
||||||
|
@apply h-[1px] w-[10px];
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-thumb {
|
||||||
|
@apply bg-border rounded-sm border-none;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-track {
|
||||||
|
@apply rounded-sm border-none bg-transparent shadow-none;
|
||||||
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer components {
|
@layer components {
|
||||||
|
|
|
@ -26,7 +26,7 @@ const style = computed((): CSSProperties => {
|
||||||
<template>
|
<template>
|
||||||
<section
|
<section
|
||||||
:style="style"
|
:style="style"
|
||||||
class="border-border bg-background flex w-full border-b transition-all duration-[100ms]"
|
class="border-border bg-background flex w-full border-b transition-all"
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -553,7 +553,7 @@ function handleOpenMenu() {
|
||||||
<div
|
<div
|
||||||
v-if="maskVisible"
|
v-if="maskVisible"
|
||||||
:style="maskStyle"
|
:style="maskStyle"
|
||||||
class="fixed left-0 top-0 h-full w-full bg-[rgb(0_0_0_/_40%)] transition-[background-color] duration-200"
|
class="bg-overlay fixed left-0 top-0 h-full w-full transition-[background-color] duration-200"
|
||||||
@click="handleClickMask"
|
@click="handleClickMask"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -84,9 +84,9 @@ function scrollIntoView() {
|
||||||
<div
|
<div
|
||||||
ref="contentRef"
|
ref="contentRef"
|
||||||
:class="contentClass"
|
:class="contentClass"
|
||||||
class="relative !flex h-[calc(100%-2px)] w-max"
|
class="relative !flex h-full w-max"
|
||||||
>
|
>
|
||||||
<TransitionGroup name="slide-up">
|
<TransitionGroup name="slide-left">
|
||||||
<div
|
<div
|
||||||
v-for="(tab, i) in tabsView"
|
v-for="(tab, i) in tabsView"
|
||||||
:key="tab.key"
|
:key="tab.key"
|
||||||
|
@ -120,17 +120,17 @@ function scrollIntoView() {
|
||||||
class="tabs-chrome__background absolute z-[1] size-full px-[calc(var(--gap)-1px)] py-0 transition-opacity duration-150"
|
class="tabs-chrome__background absolute z-[1] size-full px-[calc(var(--gap)-1px)] py-0 transition-opacity duration-150"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="tabs-chrome__background-content h-full rounded-tl-[var(--gap)] rounded-tr-[var(--gap)] duration-150"
|
class="tabs-chrome__background-content group-[.is-active]:bg-primary/15 dark:group-[.is-active]:bg-accent h-full rounded-tl-[var(--gap)] rounded-tr-[var(--gap)] duration-150"
|
||||||
></div>
|
></div>
|
||||||
<svg
|
<svg
|
||||||
class="tabs-chrome__background-before absolute bottom-0 left-[-1px] fill-transparent transition-all duration-150"
|
class="tabs-chrome__background-before group-[.is-active]:fill-primary/15 dark:group-[.is-active]:fill-accent absolute bottom-0 left-[-1px] fill-transparent transition-all duration-150"
|
||||||
height="7"
|
height="7"
|
||||||
width="7"
|
width="7"
|
||||||
>
|
>
|
||||||
<path d="M 0 7 A 7 7 0 0 0 7 0 L 7 7 Z" />
|
<path d="M 0 7 A 7 7 0 0 0 7 0 L 7 7 Z" />
|
||||||
</svg>
|
</svg>
|
||||||
<svg
|
<svg
|
||||||
class="tabs-chrome__background-after absolute bottom-0 right-[-1px] fill-transparent transition-all duration-150"
|
class="tabs-chrome__background-after group-[.is-active]:fill-primary/15 dark:group-[.is-active]:fill-accent absolute bottom-0 right-[-1px] fill-transparent transition-all duration-150"
|
||||||
height="7"
|
height="7"
|
||||||
width="7"
|
width="7"
|
||||||
>
|
>
|
||||||
|
@ -150,19 +150,19 @@ function scrollIntoView() {
|
||||||
v-show="
|
v-show="
|
||||||
!tab.affixTab && tabsView.length > 1 && tab.closable
|
!tab.affixTab && tabsView.length > 1 && tab.closable
|
||||||
"
|
"
|
||||||
class="hover:bg-accent stroke-accent-foreground/80 hover:stroke-accent-foreground group-[.is-active]:text-primary mt-[2px] size-3 cursor-pointer rounded-full transition-all"
|
class="hover:bg-accent stroke-accent-foreground/80 hover:stroke-accent-foreground dark:group-[.is-active]:text-accent-foreground group-[.is-active]:text-primary mt-[2px] size-3 cursor-pointer rounded-full transition-all"
|
||||||
@click.stop="handleClose(tab.key)"
|
@click.stop="handleClose(tab.key)"
|
||||||
/>
|
/>
|
||||||
<MdiPin
|
<MdiPin
|
||||||
v-show="tab.affixTab && tabsView.length > 1 && tab.closable"
|
v-show="tab.affixTab && tabsView.length > 1 && tab.closable"
|
||||||
class="hover:bg-accent hover:stroke-accent-foreground group-[.is-active]:text-primary mt-[2px] size-3.5 cursor-pointer rounded-full transition-all"
|
class="hover:bg-accent hover:stroke-accent-foreground group-[.is-active]:text-primary dark:group-[.is-active]:text-accent-foreground mt-[2px] size-3.5 cursor-pointer rounded-full transition-all"
|
||||||
@click.stop="handleUnpinTab(tab)"
|
@click.stop="handleUnpinTab(tab)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- tab-item-main -->
|
<!-- tab-item-main -->
|
||||||
<div
|
<div
|
||||||
class="tabs-chrome__item-main group-[.is-active]:text-primary text-accent-foreground absolute left-0 right-0 z-[2] mx-[calc(var(--gap)*2)] my-0 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] pr-4 duration-150 group-hover:pr-3"
|
class="tabs-chrome__item-main group-[.is-active]:text-primary dark:group-[.is-active]:text-accent-foreground text-accent-foreground absolute left-0 right-0 z-[2] mx-[calc(var(--gap)*2)] my-0 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] pr-4 duration-150 group-hover:pr-3"
|
||||||
>
|
>
|
||||||
<VbenIcon
|
<VbenIcon
|
||||||
v-if="showIcon"
|
v-if="showIcon"
|
||||||
|
@ -214,7 +214,7 @@ function scrollIntoView() {
|
||||||
|
|
||||||
.tabs-chrome__background {
|
.tabs-chrome__background {
|
||||||
&-content {
|
&-content {
|
||||||
@apply bg-primary/10 mx-1 rounded-md pb-2;
|
@apply bg-accent mx-1 rounded-md pb-2;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-before,
|
&-before,
|
||||||
|
@ -236,14 +236,14 @@ function scrollIntoView() {
|
||||||
.tabs-chrome__background {
|
.tabs-chrome__background {
|
||||||
@apply opacity-100;
|
@apply opacity-100;
|
||||||
|
|
||||||
&-content {
|
/* &-content {
|
||||||
@apply bg-primary/15;
|
@apply bg-accent;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-before,
|
&-before,
|
||||||
&-after {
|
&-after {
|
||||||
@apply fill-primary/15;
|
@apply fill-heavy;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,13 +85,13 @@ function scrollIntoView() {
|
||||||
:class="contentClass"
|
:class="contentClass"
|
||||||
class="relative !flex h-full w-max items-center"
|
class="relative !flex h-full w-max items-center"
|
||||||
>
|
>
|
||||||
<TransitionGroup name="slide-up">
|
<TransitionGroup name="slide-left">
|
||||||
<div
|
<div
|
||||||
v-for="(tab, i) in tabsView"
|
v-for="(tab, i) in tabsView"
|
||||||
:key="tab.key"
|
:key="tab.key"
|
||||||
:class="[
|
:class="[
|
||||||
{
|
{
|
||||||
'is-active bg-primary/15': tab.key === active,
|
'is-active dark:bg-accent bg-primary/15': tab.key === active,
|
||||||
dragable: !tab.affixTab,
|
dragable: !tab.affixTab,
|
||||||
},
|
},
|
||||||
typeWithClass.content,
|
typeWithClass.content,
|
||||||
|
@ -119,19 +119,19 @@ function scrollIntoView() {
|
||||||
v-show="
|
v-show="
|
||||||
!tab.affixTab && tabsView.length > 1 && tab.closable
|
!tab.affixTab && tabsView.length > 1 && tab.closable
|
||||||
"
|
"
|
||||||
class="hover:bg-accent stroke-accent-foreground/80 hover:stroke-accent-foreground group-[.is-active]:text-primary size-3 cursor-pointer rounded-full transition-all"
|
class="hover:bg-accent stroke-accent-foreground/80 hover:stroke-accent-foreground dark:group-[.is-active]:text-accent-foreground group-[.is-active]:text-primary size-3 cursor-pointer rounded-full transition-all"
|
||||||
@click.stop="handleClose(tab.key)"
|
@click.stop="handleClose(tab.key)"
|
||||||
/>
|
/>
|
||||||
<MdiPin
|
<MdiPin
|
||||||
v-show="tab.affixTab && tabsView.length > 1 && tab.closable"
|
v-show="tab.affixTab && tabsView.length > 1 && tab.closable"
|
||||||
class="hover:bg-heavy hover:stroke-accent-foreground group-[.is-active]:text-primary mt-[2px] size-3.5 cursor-pointer rounded-full transition-all"
|
class="hover:bg-accent hover:stroke-accent-foreground group-[.is-active]:text-primary dark:group-[.is-active]:text-accent-foreground mt-[2px] size-3.5 cursor-pointer rounded-full transition-all"
|
||||||
@click.stop="handleUnpinTab(tab)"
|
@click.stop="handleUnpinTab(tab)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- tab-item-main -->
|
<!-- tab-item-main -->
|
||||||
<div
|
<div
|
||||||
class="group-[.is-active]:text-primary text-accent-foreground mx-3 mr-4 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] pr-3 transition-all duration-300"
|
class="text-accent-foreground group-[.is-active]:text-primary dark:group-[.is-active]:text-accent-foreground mx-3 mr-4 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] pr-3 transition-all duration-300"
|
||||||
>
|
>
|
||||||
<!-- <div
|
<!-- <div
|
||||||
class="mx-3 ml-3 mr-2 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] transition-all duration-300 group-hover:mr-2 group-hover:pr-4 group-[.is-active]:pr-4"
|
class="mx-3 ml-3 mr-2 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] transition-all duration-300 group-hover:mr-2 group-hover:pr-4 group-[.is-active]:pr-4"
|
||||||
|
|
|
@ -258,6 +258,7 @@ function clearPreferencesAndLogout() {
|
||||||
<LayoutTabbar
|
<LayoutTabbar
|
||||||
v-if="preferences.tabbar.enable"
|
v-if="preferences.tabbar.enable"
|
||||||
:show-icon="preferences.tabbar.showIcon"
|
:show-icon="preferences.tabbar.showIcon"
|
||||||
|
:theme="theme"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ defineOptions({
|
||||||
name: 'LayoutTabbar',
|
name: 'LayoutTabbar',
|
||||||
});
|
});
|
||||||
|
|
||||||
defineProps<{ showIcon?: boolean }>();
|
defineProps<{ showIcon?: boolean; theme?: string }>();
|
||||||
|
|
||||||
const coreTabbarStore = useCoreTabbarStore();
|
const coreTabbarStore = useCoreTabbarStore();
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ if (!preferences.tabbar.persist) {
|
||||||
<template>
|
<template>
|
||||||
<TabsView
|
<TabsView
|
||||||
:active="currentActive"
|
:active="currentActive"
|
||||||
|
:class="theme"
|
||||||
:context-menus="createContextMenus"
|
:context-menus="createContextMenus"
|
||||||
:dragable="preferences.tabbar.dragable"
|
:dragable="preferences.tabbar.dragable"
|
||||||
:show-icon="showIcon"
|
:show-icon="showIcon"
|
||||||
|
|
Loading…
Reference in New Issue