You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

3 years ago
<template>
<div>
<div style="height: 50px; line-height: 50px; border-bottom: 1px solid #4f4f4f; font-weight: 450;">
<a-row>
<a-col :span="1"></a-col>
<a-col :span="20">Task Plan Library</a-col>
<a-col :span="2">
2 years ago
<span v-if="taskRoute">
<router-link :to="{ name: ERouterName.CREATE_PLAN}">
<PlusOutlined class="route-icon"/>
3 years ago
</router-link>
</span>
<span v-else>
2 years ago
<router-link :to="{ name: ERouterName.TASK}">
<MinusOutlined class="route-icon"/>
3 years ago
</router-link>
</span>
</a-col>
<a-col :span="1"></a-col>
</a-row>
</div>
2 years ago
<div v-if="!taskRoute">
<router-view/>
3 years ago
</div>
</div>
</template>
<script lang="ts" setup>
import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue'
2 years ago
import { computed, ref } from 'vue'
import { useRoute } from 'vue-router'
import { ERouterName } from '/@/types/enums'
3 years ago
2 years ago
const route = useRoute()
3 years ago
2 years ago
const taskRoute = computed(() => {
return route.name === ERouterName.TASK
})
3 years ago
</script>
<style lang="scss">
2 years ago
.route-icon {
color: #fff;
font-size: 16px;
}
3 years ago
</style>