style: 文件命名规范
This commit is contained in:
parent
728d0a82de
commit
430ce6acb0
@ -2,14 +2,14 @@
|
||||
<template v-for="item in props.routeTree" :key="item.name">
|
||||
<a-sub-menu v-if="item.children && item.children.length > 0" :key="item.name">
|
||||
<template #icon v-if="item.meta.svgIcon || item.meta.icon">
|
||||
<IconCommon :svg-icon="item.meta.svgIcon" :icon="item.meta.icon" />
|
||||
<MenuItemIcon :svg-icon="item.meta.svgIcon" :icon="item.meta.icon" />
|
||||
</template>
|
||||
<template #title>{{ item.meta.title }}</template>
|
||||
<MenuItem :route-tree="item.children" />
|
||||
</a-sub-menu>
|
||||
<a-menu-item v-else :key="item?.name">
|
||||
<template #icon v-if="item.meta.svgIcon || item.meta.icon">
|
||||
<IconCommon :svg-icon="item.meta.svgIcon" :icon="item.meta.icon" />
|
||||
<MenuItemIcon :svg-icon="item.meta.svgIcon" :icon="item.meta.icon" />
|
||||
</template>
|
||||
<div>{{ item.meta.title }}</div>
|
||||
</a-menu-item>
|
||||
@ -17,7 +17,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import IconCommon from "@/layout/components/Menu/icon-common.vue";
|
||||
import MenuItemIcon from "@/layout/components/Menu/menu-item-icon.vue";
|
||||
defineOptions({ name: "MenuItem" });
|
||||
|
||||
interface Props {
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
<script setup lang="ts">
|
||||
// 引入组件-异步组件
|
||||
const layouts = {
|
||||
defaults: defineAsyncComponent(() => import("@/layout/LayoutDefaults/index.vue")),
|
||||
mixing: defineAsyncComponent(() => import("@/layout/LayoutMixing/index.vue"))
|
||||
defaults: defineAsyncComponent(() => import("@/layout/layout-defaults/index.vue")),
|
||||
mixing: defineAsyncComponent(() => import("@/layout/layout-mixing/index.vue"))
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<a-layout class="layout">
|
||||
<Aside />
|
||||
<a-layout>
|
||||
<Header />
|
||||
<Main />
|
||||
<Footer />
|
||||
</a-layout>
|
||||
</a-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Aside from "@/layout/components/Aside/index.vue";
|
||||
import Header from "@/layout/components/Header/index.vue";
|
||||
import Main from "@/layout/components/Main/index.vue";
|
||||
import Footer from "@/layout/components/Footer/index.vue";
|
||||
defineOptions({ name: "LayoutDefaults" });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.layout {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<a-layout class="layout">
|
||||
<Aside />
|
||||
<a-layout>
|
||||
<Header />
|
||||
<Main />
|
||||
<Footer />
|
||||
</a-layout>
|
||||
</a-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Aside from "@/layout/components/Aside/index.vue";
|
||||
import Header from "@/layout/components/Header/index.vue";
|
||||
import Main from "@/layout/components/Main/index.vue";
|
||||
import Footer from "@/layout/components/Footer/index.vue";
|
||||
defineOptions({ name: "LayoutDefaults" });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.layout {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>混合布局</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<template>
|
||||
<div>混合布局</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
Loading…
x
Reference in New Issue
Block a user