mirror of
https://github.com/certd/certd.git
synced 2026-05-17 22:07:34 +08:00
29 lines
875 B
Vue
29 lines
875 B
Vue
<template>
|
||
<a-tag color="green" class="flex-center flex pointer items-center button-text" title="当前项目">
|
||
<!-- <fs-icon icon="ion:apps" class="mr-1"></fs-icon> -->
|
||
当前项目:{{ projectStore.currentProject?.name || "..." }}
|
||
<fs-icon :icon="currentIcon" class="ml-5"></fs-icon>
|
||
</a-tag>
|
||
</template>
|
||
|
||
<script lang="ts" setup>
|
||
import { computed, onMounted } from "vue";
|
||
import { useProjectStore } from "/@/store/project";
|
||
import { useDicts } from "/@/views/certd/dicts";
|
||
defineOptions({
|
||
name: "ProjectCurrent",
|
||
});
|
||
|
||
const projectStore = useProjectStore();
|
||
// onMounted(async () => {
|
||
// await projectStore.reload();
|
||
// });
|
||
|
||
const { projectPermissionDict } = useDicts();
|
||
|
||
const currentIcon = computed(() => {
|
||
return projectPermissionDict.dataMap[projectStore.currentProject?.permission || ""]?.icon || "";
|
||
});
|
||
</script>
|
||
<style lang="less"></style>
|