refactor: tailwindcss样式优化

Former-commit-id: 3ab444012a3b3f81929830d5c73df8c68437cb87
This commit is contained in:
haoxr
2022-12-31 22:37:47 +08:00
parent ba2e6769b4
commit 5beaa84297
21 changed files with 423 additions and 356 deletions

View File

@@ -30,15 +30,15 @@ const classObj = computed(() => ({
hideSidebar: !appStore.sidebar.opened,
openSidebar: appStore.sidebar.opened,
withoutAnimation: appStore.sidebar.withoutAnimation,
mobile: appStore.device === DeviceType.mobile
mobile: appStore.device === 'mobile'
}));
watchEffect(() => {
if (width.value < WIDTH) {
appStore.toggleDevice(DeviceType.mobile);
appStore.toggleDevice('mobile');
appStore.closeSideBar(true);
} else {
appStore.toggleDevice(DeviceType.desktop);
appStore.toggleDevice('desktop');
if (width.value >= 1200) {
//大屏
@@ -59,10 +59,11 @@ function handleOutsideClick() {
<!-- 手机设备 && 侧边栏 显示遮罩层 -->
<div
v-if="classObj.mobile && classObj.openSidebar"
class="drawer-bg"
@click="handleOutsideClick"
></div>
<Sidebar class="sidebar-container" />
<div :class="{ hasTagsView: showTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar />