<template>
  <div id="app">
    <!-- <Header v-if="!isLoginPage"/> -->
    <main class="main-content">
      <a-config-provider :locale="zhCN">
        <router-view />
      </a-config-provider>
    </main>
  </div>
</template>

<script setup>
import zhCN from 'ant-design-vue/es/locale/zh_CN'
import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'

// 设置 dayjs 语言（RangePicker 依赖 dayjs）
dayjs.locale('zh-cn')
import Header from '@/components/Header.vue'
import { useRoute } from 'vue-router'
import { computed } from 'vue'
const route = useRoute()
const isLoginPage = computed(() => {
  return route.path.startsWith('/login') // 假设登录/注册路径是 /auth
})
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  /* 可选：防止水平滚动 */
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 假设 Header 高度是 66px */
header {
  height: 66px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.main-content {
  /* padding-top: 30px; */
  /* overflow: hidden; */
  /* height: 100vh; */
}

.x-search-bar .ant-form-item {
  margin-right: 0;
  margin-bottom: 0;
}
</style>