-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
895fd98
commit 6068fbe
Showing
27 changed files
with
1,775 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script setup lang="ts"> | ||
import { useRoute, useRouter } from 'vue-router'; | ||
import { onMounted, computed, watch, ref } from 'vue'; | ||
import { ElConfigProvider } from 'element-plus'; | ||
import Layout from './layout/Index.vue' | ||
import zhCn from 'element-plus/es/locale/lang/zh-cn.mjs' | ||
const locale = computed(() => zhCn) | ||
const route = useRoute() | ||
const router = useRouter() | ||
onMounted(() => { | ||
console.log(route, route.query, 'route') | ||
console.log(import.meta.env, 'import.meta') | ||
// const name = route.query.name as string || (import.meta.env.DEV ? 'learn' : 'Home') | ||
console.log('跳转啊') | ||
// name && router.push({ | ||
// name: name | ||
// }) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<el-config-provider :locale="locale"> | ||
<router-view v-slot="{ Component }"> | ||
<component :is="Component" /> | ||
</router-view> | ||
</el-config-provider> | ||
</template> | ||
|
||
<style lang="scss" scoped></style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" href="/icon.ico" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>词搜 - 背单词</title> | ||
<style> | ||
html, body, #app { | ||
width: 100%; | ||
height: 100%; | ||
min-width: 765px; | ||
min-height: 567px; | ||
margin: 0; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="./main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<template> | ||
<el-row class="layout-container"> | ||
<el-col :span="6"> | ||
<el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose"> | ||
<el-menu-item :index="route.path" v-for="route in menuRoutes" :key="route.path" @click="getMenuItem"> | ||
<el-icon><icon-menu /></el-icon> | ||
<span>{{ route.label }}</span> | ||
</el-menu-item> | ||
</el-menu> | ||
</el-col> | ||
<el-col :span="18"> | ||
<!-- <slot name="main"> | ||
主体 | ||
</slot> --> | ||
<router-view v-slot="{ Component }"> | ||
<component :is="Component" /> | ||
</router-view> | ||
</el-col> | ||
</el-row> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ElMenu, ElMenuItem, ElCol, ElRow, ElIcon } from 'element-plus'; | ||
import { | ||
Document, | ||
Menu as IconMenu, | ||
Location, | ||
Setting, | ||
} from '@element-plus/icons-vue' | ||
import { ref } from 'vue' | ||
import { useRouter, RouterView } from 'vue-router'; | ||
import type { MenuItemRegistered } from 'element-plus' | ||
import { menuRoutes } from '../router'; | ||
const router = useRouter() | ||
const getMenuItem = (e: MenuItemRegistered) => { | ||
console.log(e, 'e') | ||
router.push({ | ||
path: e.index as string | ||
}) | ||
} | ||
const handleOpen = (key: string, keyPath: string[]) => { | ||
console.log(key, keyPath) | ||
} | ||
const handleClose = (key: string, keyPath: string[]) => { | ||
console.log(key, keyPath) | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.el-menu { | ||
height: 100%; | ||
} | ||
.layout-container { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
.el-row { | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-wrap: nowrap; | ||
position: relative; | ||
} | ||
.el-col-6 { | ||
width: 160px; | ||
min-width: 160px; | ||
flex: 0; | ||
} | ||
.el-col-18 { | ||
flex: 1; | ||
max-width: calc(100% - 160px); | ||
} | ||
</style> |
Oops, something went wrong.