<script lang="ts" setup>
import { onUnmounted, reactive, ref } from 'vue'

import Aside from './aside/Aside.vue'
import Content from './content/Content.vue'
import Detail from './content/Detail.vue'

const type = ref('1')
const id = ref('')

function goDetail(value) {
  type.value = '2'
  id.value = value
}
</script>

<template>
  <div class="main">
    <!-- 侧边 -->
    <!-- <Aside /> -->

    <!-- 内容 -->
    <Content v-if="type === '1'" @go-detail="goDetail" />
    <Detail v-else />
  </div>
</template>

<style lang="less" scoped>
.main {
  display: flex;
  flex-direction: row;
  box-sizing: border-box;
  width: 100%;
}
</style>
