feat: first commit
This commit is contained in:
commit
8a85cf5b78
64 files changed
+7832
No files matched your search
@@ -0,0 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full h-[56px] flex items-center text-2xl cursor-pointer gap-2 font-bold">
|
||||
<img src="@/assets/icons/logo.svg" class="w-[32px]" />
|
||||
Yili Admin
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full min-h-full overflow-y-auto pt-6 px-6">
|
||||
<RouterView></RouterView>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import AppLogo from '@/layouts/components/AppLogo.vue'
|
||||
import UserArea from '@/layouts/components/UserArea.vue'
|
||||
import { asyncRoutes } from '@/router'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full h-full">
|
||||
<t-head-menu :value="route.name" theme="light" >
|
||||
<template #logo>
|
||||
<AppLogo></AppLogo>
|
||||
</template>
|
||||
<template v-for="route in asyncRoutes" :key="route.name">
|
||||
<t-menu-item v-if="route.meta && !route.meta.hiddenInMenu" :value="route.name" :to="{name: route.name}">{{ route!.meta!.title }}</t-menu-item>
|
||||
</template>
|
||||
<template #operations>
|
||||
<UserArea></UserArea>
|
||||
</template>
|
||||
</t-head-menu>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import UserArea from '@/layouts/components/UserArea.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full h-full flex items-center justify-between px-6">
|
||||
<TSpace>
|
||||
<!-- <TButton variant="text" shape="square">-->
|
||||
<!-- <template #icon> <ViewListIcon /></template>-->
|
||||
<!-- </TButton>-->
|
||||
<TButton variant="text" @click="() => router.push({ name: 'platform-manage'
|
||||
})">切换平台</TButton>
|
||||
</TSpace>
|
||||
|
||||
<UserArea></UserArea>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import type { RouteRecordRaw } from 'vue-router'
|
||||
defineProps<{
|
||||
data: RouteRecordRaw
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<t-menu-item v-if="data.meta && !data.meta.hiddenInMenu" :value="data.name" :to="data">
|
||||
<template #icon>
|
||||
<TIcon :name="data.meta.icon" />
|
||||
</template>
|
||||
{{ data.meta.title }}
|
||||
</t-menu-item>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import AppLogo from '@/layouts/components/AppLogo.vue'
|
||||
import MenuItem from '@/layouts/components/MenuItem.vue'
|
||||
import { asyncRoutes } from '@/router'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const route = useRoute()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TAside>
|
||||
<TMenu :value="route.name">
|
||||
<template #logo>
|
||||
<AppLogo></AppLogo>
|
||||
</template>
|
||||
<MenuItem v-for="menu in asyncRoutes" :key="menu.name" :data="menu"></MenuItem>
|
||||
</TMenu>
|
||||
</TAside>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
:global(.t-default-menu__inner .t-menu__logo:not(:empty)) {
|
||||
border-bottom: none;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import { ChevronDownIcon } from 'tdesign-icons-vue-next'
|
||||
import type { DropdownOption } from 'tdesign-vue-next'
|
||||
import { useAppStore } from '@/stores/app'
|
||||
const appStore = useAppStore()
|
||||
const options: DropdownOption[] = [
|
||||
{
|
||||
content: '退出登录',
|
||||
onClick() {
|
||||
appStore.logout()
|
||||
}
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<TDropdown :options="options" :minColumnWidth="100">
|
||||
<TButton variant="text">
|
||||
<div class="flex gap-2 items-center">
|
||||
<TAvatar size="24px" image="https://tdesign.gtimg.com/site/avatar.jpg"></TAvatar>
|
||||
依力
|
||||
<ChevronDownIcon />
|
||||
</div>
|
||||
</TButton>
|
||||
</TDropdown>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in new issue
Block a user