|
|
@@ -1,144 +1,52 @@
|
|
|
<template>
|
|
|
- <div class="main-container">
|
|
|
- <div class="menu-container">
|
|
|
- <div class="tab-container">
|
|
|
- <div class="tab">
|
|
|
- <router-link to="teacher-home">
|
|
|
- <div
|
|
|
- class="icon"
|
|
|
- :class="currentRouteName === 'teacher-home' ? 'active' : ''"
|
|
|
- >
|
|
|
- 
|
|
|
- </div>
|
|
|
- </router-link>
|
|
|
- <router-link to="teacher-search">
|
|
|
- <div
|
|
|
- class="icon"
|
|
|
- :class="currentRouteName === 'teacher-search' ? 'active' : ''"
|
|
|
- >
|
|
|
- 
|
|
|
- </div>
|
|
|
- </router-link>
|
|
|
- <router-link to="teacher-add">
|
|
|
- <div
|
|
|
- class="icon"
|
|
|
- :class="currentRouteName === 'teacher-add' ? 'active' : ''"
|
|
|
- >
|
|
|
- 
|
|
|
- </div>
|
|
|
- </router-link>
|
|
|
- <router-link to="teacher-personal">
|
|
|
- <div
|
|
|
- class="icon"
|
|
|
- :class="currentRouteName === 'teacher-personal' ? 'active' : ''"
|
|
|
- >
|
|
|
- 
|
|
|
- </div>
|
|
|
- </router-link>
|
|
|
- <router-link to="teacher-feedback">
|
|
|
- <div
|
|
|
- class="icon"
|
|
|
- :class="currentRouteName === 'teacher-feedback' ? 'active' : ''"
|
|
|
- >
|
|
|
- 
|
|
|
- </div>
|
|
|
- </router-link>
|
|
|
- <div class="line"></div>
|
|
|
- <router-link to="teacher-info">
|
|
|
- <div
|
|
|
- class="icon"
|
|
|
- :class="currentRouteName === 'teacher-info' ? 'active' : ''"
|
|
|
- >
|
|
|
- 
|
|
|
- </div>
|
|
|
- </router-link>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="view-container">
|
|
|
- <transition name="fade" mode="out-in">
|
|
|
- <router-view />
|
|
|
- </transition>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="preview-container"></div>
|
|
|
- </div>
|
|
|
+ <role-home-vue>
|
|
|
+ <template v-slot:tab>
|
|
|
+ <template v-for="tab of tabs">
|
|
|
+ <icon-link-vue :tab="tab" :key="tab.name"></icon-link-vue>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template v-slot:preview></template>
|
|
|
+ </role-home-vue>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import RoleHomeVue from '../../layouts/RoleHome.vue'
|
|
|
+import IconLinkVue from '../../components/home/IconLink.vue'
|
|
|
+
|
|
|
export default {
|
|
|
+ components: { RoleHomeVue, IconLinkVue },
|
|
|
data() {
|
|
|
return {
|
|
|
- currentRouteName: this.$route.name
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {},
|
|
|
- watch: {
|
|
|
- $route() {
|
|
|
- this.currentRouteName = this.$route.name
|
|
|
+ tabs: [
|
|
|
+ {
|
|
|
+ name: 'teacher-home',
|
|
|
+ unicode: '\ue68b'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'teacher-search',
|
|
|
+ unicode: '\ue6a2'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'teacher-add',
|
|
|
+ unicode: '\ue71b'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'teacher-personal',
|
|
|
+ unicode: '\ue790'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'teacher-feedback',
|
|
|
+ unicode: '\ue68a'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'teacher-info',
|
|
|
+ unicode: '\ue68e'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-$icon-normal-color: #7a8a9a;
|
|
|
-$icon-active-color: #5485e5;
|
|
|
-$icon-hover-color: rgb(146, 171, 221);
|
|
|
-
|
|
|
-@font-face {
|
|
|
- font-family: 'iconfont'; /* project id 1598214 */
|
|
|
- src: url('//at.alicdn.com/t/font_1598214_il2if4ux43.eot');
|
|
|
- src: url('//at.alicdn.com/t/font_1598214_il2if4ux43.eot?#iefix')
|
|
|
- format('embedded-opentype'),
|
|
|
- url('//at.alicdn.com/t/font_1598214_il2if4ux43.woff2') format('woff2'),
|
|
|
- url('//at.alicdn.com/t/font_1598214_il2if4ux43.woff') format('woff'),
|
|
|
- url('//at.alicdn.com/t/font_1598214_il2if4ux43.ttf') format('truetype'),
|
|
|
- url('//at.alicdn.com/t/font_1598214_il2if4ux43.svg#iconfont') format('svg');
|
|
|
-}
|
|
|
-.main-container {
|
|
|
- height: 100vh;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
-}
|
|
|
-.menu-container {
|
|
|
- display: flex;
|
|
|
-}
|
|
|
-.tab-container {
|
|
|
- padding: 24px 18px 24px 36px;
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
-}
|
|
|
-.view-container {
|
|
|
- padding: 24px 18px;
|
|
|
- width: 460px;
|
|
|
-}
|
|
|
-.line {
|
|
|
- height: 0;
|
|
|
- padding: 6px;
|
|
|
- margin: 0 4px 12px 4px;
|
|
|
- border-bottom: 2px solid $icon-normal-color;
|
|
|
-}
|
|
|
-.tab {
|
|
|
- margin: -12px 0;
|
|
|
- a {
|
|
|
- outline: none;
|
|
|
- text-decoration: none;
|
|
|
- color: black;
|
|
|
- }
|
|
|
- .icon {
|
|
|
- user-select: none;
|
|
|
- cursor: pointer;
|
|
|
- padding: 12px 0;
|
|
|
- text-align: center;
|
|
|
- font-family: 'iconfont';
|
|
|
- font-size: 34px;
|
|
|
- color: $icon-normal-color;
|
|
|
- }
|
|
|
- .active {
|
|
|
- color: $icon-active-color;
|
|
|
- }
|
|
|
-}
|
|
|
</style>
|