1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <header class="main-header">
- <router-link class="logo" style="position: relative;" to="/">
- <span class="logo-mini">{{logoMiniText}}</span>
- <span class="logo-lg">{{logoText}}</span>
- <!-- <span class='logo-lg label label-warning' style='position: absolute;top:8px;right: 20px;font-size: 8px;' v-if="versionText">{{versionText}}</span> -->
- </router-link>
- <nav class="navbar navbar-static-top">
- <a class="sidebar-toggle" data-toggle="push-menu" role="button">
- <span class="sr-only">Toggle navigation</span>
- </a>
- <div class="navbar-custom-menu">
- <ul class="nav navbar-nav">
- <li v-if="serverInfo.IsDemo">
- <a target="_blank" href="//www.liveqing.com/docs/download/LiveGBS.html"><i class="fa fa-download"></i> 下载使用</a>
- </li>
- <li v-if="serverInfo.IsDemo">
- <a target="_blank" href="/apidoc/"><i class="fa fa-book"></i> 开发接口</a>
- </li>
- <li class="dropdown" v-if="userInfo">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown">欢迎, {{userInfo.Name}}</a>
- <ul class="dropdown-menu">
- <li>
- <a @click.prevent="$emit('modify-password')" role="button"><i class="fa fa-key"></i> 修改密码</a>
- </li>
- <router-link to="/logout" tag="li">
- <a><i class="fa fa-sign-out"></i> 注 销</a>
- </router-link>
- </ul>
- </li>
- <li v-else>
- <a href="/login.html"><i class="fa fa-user"></i> 登录</a>
- </li>
- </ul>
- </div>
- </nav>
- </header>
- </template>
- <script>
- import { mapState } from "vuex";
- export default {
- props: {
- logoText: {
- default: ""
- },
- logoMiniText: {
- default: ""
- },
- versionText: {
- default: ""
- }
- },
- computed: {
- ...mapState(["userInfo", "serverInfo"])
- }
- }
- </script>
- <style lang="less" scoped="true">
- .main-header .navbar,
- .main-header .logo {
- /* Fix for IE */
- -webkit-transition: none;
- -o-transition: none;
- transition: none;
- }
- .main-header .logo {
- padding: 0;
- }
- .main-header .navbar .dropdown-menu li a {
- color: #777;
- &:hover {
- background-color: #e1e3e9;
- }
- }
- </style>
|