spring
2 天以前 25975d7ec42b1691512ff6f29041bd3bd1a4a1e3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<template>
  <div class="app-container">
    <div class="tabs-wrapper">
      <el-tabs
        v-model="activeTab"
        class="meeting-tabs"
        @tab-change="handleTabChange"
      >
        <el-tab-pane label="会议设置" name="setting" />
        <el-tab-pane label="会议列表" name="index" />
        <el-tab-pane label="会议申请" name="application" />
        <el-tab-pane label="会议审批" name="examine" />
        <el-tab-pane label="会议发布" name="publish" />
        <el-tab-pane label="会议总结" name="summary" />
      </el-tabs>
    </div>
 
    <div class="tab-content">
      <keep-alive>
        <component :is="currentComponent" />
      </keep-alive>
    </div>
  </div>
</template>
 
<script setup>
import { ref, computed } from 'vue'
import MeetSetting from '../notificationManagement/meetSetting/index.vue'
import MeetIndex from '../notificationManagement/meetIndex/index.vue'
import MeetApplication from '../notificationManagement/meetApplication/index.vue'
import MeetExamine from '../notificationManagement/meetExamine/index.vue'
import MeetPublish from '../notificationManagement/meetPublish/index.vue'
import MeetSummary from '../notificationManagement/summary/index.vue'
 
const activeTab = ref('setting')
 
const tabComponentMap = {
  setting: MeetSetting,
  index: MeetIndex,
  application: MeetApplication,
  examine: MeetExamine,
  publish: MeetPublish,
  summary: MeetSummary
}
 
const currentComponent = computed(() => tabComponentMap[activeTab.value] || MeetSetting)
 
function handleTabChange(name) {
  activeTab.value = name
}
</script>
 
<style scoped lang="scss">
 
.tabs-wrapper {
  margin-bottom: 10px;
}
 
.tab-content {
  min-height: 400px;
}
</style>