|
|
@@ -0,0 +1,77 @@
|
|
|
+<template>
|
|
|
+ <el-header height="90px" class="header">
|
|
|
+ <el-row type="flex" :gutter="20" class="main" align="middle">
|
|
|
+ <el-col :span="4">LOGO</el-col>
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-menu
|
|
|
+ :default-active="activeIndex"
|
|
|
+ class="menu"
|
|
|
+ mode="horizontal"
|
|
|
+ @select="handleSelect"
|
|
|
+ >
|
|
|
+ <el-menu-item index="1">{{ $t('shou-ye') }}</el-menu-item>
|
|
|
+ <el-submenu index="2">
|
|
|
+ <template slot="title">我的工作台</template>
|
|
|
+ <el-menu-item index="2-1">选项1</el-menu-item>
|
|
|
+ <el-menu-item index="2-2">选项2</el-menu-item>
|
|
|
+ <el-menu-item index="2-3">选项3</el-menu-item>
|
|
|
+ <el-submenu index="2-4">
|
|
|
+ <template slot="title">选项4</template>
|
|
|
+ <el-menu-item index="2-4-1">选项1</el-menu-item>
|
|
|
+ <el-menu-item index="2-4-2">选项2</el-menu-item>
|
|
|
+ <el-menu-item index="2-4-3">选项3</el-menu-item>
|
|
|
+ </el-submenu>
|
|
|
+ </el-submenu>
|
|
|
+ <el-menu-item index="3" disabled>消息中心</el-menu-item>
|
|
|
+ <el-menu-item index="4"
|
|
|
+ ><a href="https://www.ele.me" target="_blank"
|
|
|
+ >订单管理</a
|
|
|
+ ></el-menu-item
|
|
|
+ >
|
|
|
+ </el-menu>
|
|
|
+ <el-dropdown
|
|
|
+ split-button
|
|
|
+ type="primary"
|
|
|
+ @command="changeLocales"
|
|
|
+ >
|
|
|
+ {{ $i18n.locale == 'en' ? '英文' : '中文' }}
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="en">英文</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="zh">中文</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-header>
|
|
|
+</template>
|
|
|
+<script lang="ts">
|
|
|
+import { Component, Vue } from 'vue-property-decorator';
|
|
|
+
|
|
|
+@Component
|
|
|
+export default class Header extends Vue {
|
|
|
+ activeIndex = '1';
|
|
|
+
|
|
|
+ handleSelect(e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+
|
|
|
+ changeLocales(lang) {
|
|
|
+ this.$i18n.locale = lang;
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+.main {
|
|
|
+ max-width: 80%;
|
|
|
+ flex: 1;
|
|
|
+ min-width: 900px;
|
|
|
+}
|
|
|
+
|
|
|
+.el-menu.el-menu--horizontal.menu {
|
|
|
+ border-bottom-width: 0;
|
|
|
+}
|
|
|
+</style>
|