提交 685036e2 authored 作者: zhangchao's avatar zhangchao

init

上级 b460c0c5
// generated by unplugin-vue-components // generated by unplugin-vue-components
// We suggest you to commit this file into source control // We suggest you to commit this file into source control
// Read more: https://github.com/vuejs/core/pull/3399 // Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core' import '@vue/runtime-core'
export {} export {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
export interface GlobalComponents { export interface GlobalComponents {
ElButton: typeof import('element-plus/es')['ElButton'] ElAside: typeof import('element-plus/es')['ElAside']
RouterLink: typeof import('vue-router')['RouterLink'] ElButton: typeof import('element-plus/es')['ElButton']
RouterView: typeof import('vue-router')['RouterView'] ElContainer: typeof import('element-plus/es')['ElContainer']
SvgIcon: typeof import('./src/components/sys/SvgIcon.vue')['default'] ElHeader: typeof import('element-plus/es')['ElHeader']
} ElMain: typeof import('element-plus/es')['ElMain']
} RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
SvgIcon: typeof import('./src/components/sys/SvgIcon.vue')['default']
}
}
<script setup lang="ts"> <script setup lang="ts">
import { RouterLink, RouterView } from "vue-router"; import { RouterView } from "vue-router";
</script> </script>
<template> <template>
<div id="app"> <div id="app">
<router-view /> <router-view />
</div> </div>
</template> </template>
<style lang="less">
#app {
width: 100%;
height: 100%;
flex: 1;
}
</style>
// Generated by 'unplugin-auto-import' // Generated by 'unplugin-auto-import'
export {} export {}
declare global { declare global {
const EffectScope: typeof import('vue')['EffectScope'] const EffectScope: typeof import('vue')['EffectScope']
const computed: typeof import('vue')['computed'] const computed: typeof import('vue')['computed']
const createApp: typeof import('vue')['createApp'] const createApp: typeof import('vue')['createApp']
const customRef: typeof import('vue')['customRef'] const customRef: typeof import('vue')['customRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const defineComponent: typeof import('vue')['defineComponent'] const defineComponent: typeof import('vue')['defineComponent']
const effectScope: typeof import('vue')['effectScope'] const effectScope: typeof import('vue')['effectScope']
const getCurrentInstance: typeof import('vue')['getCurrentInstance'] const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const getCurrentScope: typeof import('vue')['getCurrentScope'] const getCurrentScope: typeof import('vue')['getCurrentScope']
const h: typeof import('vue')['h'] const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject'] const inject: typeof import('vue')['inject']
const isProxy: typeof import('vue')['isProxy'] const isProxy: typeof import('vue')['isProxy']
const isReactive: typeof import('vue')['isReactive'] const isReactive: typeof import('vue')['isReactive']
const isReadonly: typeof import('vue')['isReadonly'] const isReadonly: typeof import('vue')['isReadonly']
const isRef: typeof import('vue')['isRef'] const isRef: typeof import('vue')['isRef']
const markRaw: typeof import('vue')['markRaw'] const markRaw: typeof import('vue')['markRaw']
const nextTick: typeof import('vue')['nextTick'] const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated'] const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount'] const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated'] const onDeactivated: typeof import('vue')['onDeactivated']
const onErrorCaptured: typeof import('vue')['onErrorCaptured'] const onErrorCaptured: typeof import('vue')['onErrorCaptured']
const onMounted: typeof import('vue')['onMounted'] const onMounted: typeof import('vue')['onMounted']
const onRenderTracked: typeof import('vue')['onRenderTracked'] const onRenderTracked: typeof import('vue')['onRenderTracked']
const onRenderTriggered: typeof import('vue')['onRenderTriggered'] const onRenderTriggered: typeof import('vue')['onRenderTriggered']
const onScopeDispose: typeof import('vue')['onScopeDispose'] const onScopeDispose: typeof import('vue')['onScopeDispose']
const onServerPrefetch: typeof import('vue')['onServerPrefetch'] const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onUnmounted: typeof import('vue')['onUnmounted'] const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated'] const onUpdated: typeof import('vue')['onUpdated']
const provide: typeof import('vue')['provide'] const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive'] const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly'] const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref'] const ref: typeof import('vue')['ref']
const resolveComponent: typeof import('vue')['resolveComponent'] const resolveComponent: typeof import('vue')['resolveComponent']
const shallowReactive: typeof import('vue')['shallowReactive'] const resolveDirective: typeof import('vue')['resolveDirective']
const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowReactive: typeof import('vue')['shallowReactive']
const shallowRef: typeof import('vue')['shallowRef'] const shallowReadonly: typeof import('vue')['shallowReadonly']
const toRaw: typeof import('vue')['toRaw'] const shallowRef: typeof import('vue')['shallowRef']
const toRef: typeof import('vue')['toRef'] const toRaw: typeof import('vue')['toRaw']
const toRefs: typeof import('vue')['toRefs'] const toRef: typeof import('vue')['toRef']
const triggerRef: typeof import('vue')['triggerRef'] const toRefs: typeof import('vue')['toRefs']
const unref: typeof import('vue')['unref'] const triggerRef: typeof import('vue')['triggerRef']
const useAttrs: typeof import('vue')['useAttrs'] const unref: typeof import('vue')['unref']
const useCssModule: typeof import('vue')['useCssModule'] const useAttrs: typeof import('vue')['useAttrs']
const useCssVars: typeof import('vue')['useCssVars'] const useCssModule: typeof import('vue')['useCssModule']
const useSlots: typeof import('vue')['useSlots'] const useCssVars: typeof import('vue')['useCssVars']
const watch: typeof import('vue')['watch'] const useSlots: typeof import('vue')['useSlots']
const watchEffect: typeof import('vue')['watchEffect'] const watch: typeof import('vue')['watch']
const watchPostEffect: typeof import('vue')['watchPostEffect'] const watchEffect: typeof import('vue')['watchEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect'] const watchPostEffect: typeof import('vue')['watchPostEffect']
} const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
<template> <template>
<div class="blank-layout"> <div class="blank-layout">
<router-view /> <router-view />
</div> </div>
</template> </template>
<script lang="ts" setup name="BlankLayout"></script> <script lang="ts" setup name="BlankLayout"></script>
<template> <template>
<header>头部</header> <div class="header-wrapper">消息中台header</div>
</template> </template>
<script lang="ts" setup name="DefaultHeader"></script> <script lang="ts" setup name="DefaultHeader"></script>
<style scoped> <style scoped lang="less">
header { .header-wrapper {
background-color: antiquewhite; background-color: var(--color-background);
} height: 64px;
</style> line-height: 64px;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
position: relative;
z-index: 9999;
padding: 0 var(--page-padding);
}
</style>
<template> <template>
<div class="relative"> <div class="relative">
<Default-header /> <!-- <Default-header /> -->
<router-view v-slot="{ Component, route }"> <div class="main-wrapper h-full">
<keep-alive> <el-container class="h-full">
<component :is="Component" v-if="route.meta.keepAlive"></component> <el-header>消息中台系统</el-header>
</keep-alive> <el-container class="h-full">
<component :is="Component" v-if="!route.meta.keepAlive"></component> <el-aside width="200px">Aside</el-aside>
</router-view> <el-main>
<Default-footer /> <router-view v-slot="{ Component, route }">
</div> <keep-alive>
</template> <component
:is="Component"
<script lang="ts" setup name="DefaultLayout"> v-if="route.meta.keepAlive"
import DefaultHeader from "./components/DefaultHeader.vue"; ></component>
import DefaultFooter from "./components/DefaultFooter.vue"; </keep-alive>
</script> <component
:is="Component"
v-if="!route.meta.keepAlive"
></component>
</router-view>
</el-main>
</el-container>
</el-container>
</div>
</div>
</template>
<script lang="ts" setup name="DefaultLayout">
// import DefaultHeader from "./components/DefaultHeader.vue";
</script>
<style lang="less">
.relative {
width: 100%;
height: 100%;
.el-header {
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
}
.el-aside {
// background-color: #79bbff;
box-shadow: 1px 1px 5px 0 rgba(0, 0, 0, 0.1);
}
}
</style>
<route lang="yaml"> <route lang="yaml">
redirect: redirect:
name: home name: home
</route> </route>
<template></template>
import { createRouter, createWebHistory } from "vue-router"; import { createRouter, createWebHistory } from "vue-router";
import { setupLayouts } from "virtual:generated-layouts"; import { setupLayouts } from "virtual:generated-layouts";
import generatedRoutes from "virtual:generated-pages"; import generatedRoutes from "virtual:generated-pages";
const routes = setupLayouts(generatedRoutes); const routes = setupLayouts(generatedRoutes);
const router = createRouter({ const router = createRouter({
// history: createWebHashHistory(), // history: createWebHashHistory(),
history: createWebHistory(import.meta.env.BASE_URL), history: createWebHistory(import.meta.env.BASE_URL),
routes, routes,
}); });
export default router; export default router;
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
--section-gap: 160px; --section-gap: 160px;
} }
:root {
--page-padding: 20px;
}
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--color-background: var(--vt-c-black); --color-background: var(--vt-c-black);
...@@ -59,8 +63,12 @@ ...@@ -59,8 +63,12 @@
font-weight: normal; font-weight: normal;
} }
html,
body {
height: 100%;
}
body { body {
min-height: 100vh;
color: var(--color-text); color: var(--color-text);
background: var(--color-background); background: var(--color-background);
transition: color 0.5s, background-color 0.5s; transition: color 0.5s, background-color 0.5s;
...@@ -71,4 +79,4 @@ body { ...@@ -71,4 +79,4 @@ body {
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
\ No newline at end of file
@import "./base.css"; @import "./base.css";
#app { #app {
max-width: 1280px; /* max-width: 1280px; */
width: 100%;
margin: 0 auto; margin: 0 auto;
/* padding: 2rem; */ /* padding: 2rem; */
...@@ -25,4 +26,4 @@ ...@@ -25,4 +26,4 @@
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
padding: 0 2rem; padding: 0 2rem;
} */ } */
} }
\ No newline at end of file
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*"], "include": ["vite.config.*", "vitest.config.*", "cypress.config.*"],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"types": ["node"] "types": ["node","element-plus/global"]
} }
} }
...@@ -98,4 +98,9 @@ export default defineConfig({ ...@@ -98,4 +98,9 @@ export default defineConfig({
"@": fileURLToPath(new URL("./src", import.meta.url)), "@": fileURLToPath(new URL("./src", import.meta.url)),
}, },
}, },
server: {
hmr: true,
open: true,
port: 6714,
},
}); });
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论