mirror of
https://github.com/certd/certd.git
synced 2026-05-18 14:27:36 +08:00
chore: code format
This commit is contained in:
@@ -39,7 +39,7 @@ const style = computed((): CSSProperties => {
|
||||
paddingBottom: `${paddingBottom}px`,
|
||||
paddingLeft: `${paddingLeft}px`,
|
||||
paddingRight: `${paddingRight}px`,
|
||||
paddingTop: `${paddingTop}px`
|
||||
paddingTop: `${paddingTop}px`,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -19,7 +19,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
show: true
|
||||
show: true,
|
||||
});
|
||||
|
||||
const style = computed((): CSSProperties => {
|
||||
@@ -29,7 +29,7 @@ const style = computed((): CSSProperties => {
|
||||
marginBottom: show ? "0" : `-${height}px`,
|
||||
position: fixed ? "fixed" : "static",
|
||||
width,
|
||||
zIndex
|
||||
zIndex,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -49,13 +49,13 @@ const style = computed((): CSSProperties => {
|
||||
return {
|
||||
height: `${height}px`,
|
||||
marginTop: show ? 0 : `-${height}px`,
|
||||
right
|
||||
right,
|
||||
};
|
||||
});
|
||||
|
||||
const logoStyle = computed((): CSSProperties => {
|
||||
return {
|
||||
minWidth: `${props.isMobile ? 40 : props.sidebarWidth}px`
|
||||
minWidth: `${props.isMobile ? 40 : props.sidebarWidth}px`,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -95,7 +95,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
paddingTop: 0,
|
||||
show: true,
|
||||
showCollapseButton: true,
|
||||
zIndex: 0
|
||||
zIndex: 0,
|
||||
});
|
||||
|
||||
const emit = defineEmits<{ leave: [] }>();
|
||||
@@ -122,7 +122,7 @@ const style = computed((): CSSProperties => {
|
||||
marginTop: `${marginTop}px`,
|
||||
paddingTop: `${paddingTop}px`,
|
||||
zIndex,
|
||||
...(isSidebarMixed && extraVisible.value ? { transition: "none" } : {})
|
||||
...(isSidebarMixed && extraVisible.value ? { transition: "none" } : {}),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -132,7 +132,7 @@ const extraStyle = computed((): CSSProperties => {
|
||||
return {
|
||||
left: `${width}px`,
|
||||
width: extraVisible.value && show ? `${extraWidth}px` : 0,
|
||||
zIndex
|
||||
zIndex,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -140,7 +140,7 @@ const extraTitleStyle = computed((): CSSProperties => {
|
||||
const { headerHeight } = props;
|
||||
|
||||
return {
|
||||
height: `${headerHeight - 1}px`
|
||||
height: `${headerHeight - 1}px`,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -158,7 +158,7 @@ const contentStyle = computed((): CSSProperties => {
|
||||
return {
|
||||
height: `calc(100% - ${headerHeight + collapseHeight}px)`,
|
||||
paddingTop: "8px",
|
||||
...contentWidthStyle.value
|
||||
...contentWidthStyle.value,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -168,20 +168,20 @@ const headerStyle = computed((): CSSProperties => {
|
||||
return {
|
||||
...(isSidebarMixed ? { display: "flex", justifyContent: "center" } : {}),
|
||||
height: `${headerHeight - 1}px`,
|
||||
...contentWidthStyle.value
|
||||
...contentWidthStyle.value,
|
||||
};
|
||||
});
|
||||
|
||||
const extraContentStyle = computed((): CSSProperties => {
|
||||
const { collapseHeight, headerHeight } = props;
|
||||
return {
|
||||
height: `calc(100% - ${headerHeight + collapseHeight}px)`
|
||||
height: `calc(100% - ${headerHeight + collapseHeight}px)`,
|
||||
};
|
||||
});
|
||||
|
||||
const collapseStyle = computed((): CSSProperties => {
|
||||
return {
|
||||
height: `${props.collapseHeight}px`
|
||||
height: `${props.collapseHeight}px`,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -206,7 +206,7 @@ function calcMenuWidthStyle(isHiddenDom: boolean): CSSProperties {
|
||||
marginLeft: show ? 0 : `-${widthValue}`,
|
||||
maxWidth: widthValue,
|
||||
minWidth: widthValue,
|
||||
width: widthValue
|
||||
width: widthValue,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -250,8 +250,8 @@ function handleMouseleave() {
|
||||
theme,
|
||||
{
|
||||
'bg-sidebar-deep': isSidebarMixed,
|
||||
'bg-sidebar border-border border-r': !isSidebarMixed
|
||||
}
|
||||
'bg-sidebar border-border border-r': !isSidebarMixed,
|
||||
},
|
||||
]"
|
||||
:style="style"
|
||||
class="fixed left-0 top-0 h-full transition-all duration-150"
|
||||
@@ -272,7 +272,7 @@ function handleMouseleave() {
|
||||
v-if="isSidebarMixed"
|
||||
ref="asideRef"
|
||||
:class="{
|
||||
'border-l': extraVisible
|
||||
'border-l': extraVisible,
|
||||
}"
|
||||
:style="extraStyle"
|
||||
class="border-border bg-sidebar fixed top-0 h-full overflow-hidden border-r transition-all duration-200"
|
||||
|
||||
@@ -15,7 +15,7 @@ const props = withDefaults(defineProps<Props>(), {});
|
||||
const style = computed((): CSSProperties => {
|
||||
const { height } = props;
|
||||
return {
|
||||
height: `${height}px`
|
||||
height: `${height}px`,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -38,6 +38,6 @@ export function useLayout(props: VbenLayoutProps) {
|
||||
isHeaderMixedNav,
|
||||
isHeaderNav,
|
||||
isMixedNav,
|
||||
isSidebarMixedNav
|
||||
isSidebarMixedNav,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
export type * from './vben-layout';
|
||||
export { default as VbenAdminLayout } from './vben-layout.vue';
|
||||
export type * from "./vben-layout";
|
||||
export { default as VbenAdminLayout } from "./vben-layout.vue";
|
||||
|
||||
Reference in New Issue
Block a user