|
@@ -11,7 +11,7 @@
|
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item>退出登录</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="loginOut">退出登录</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-header>
|
|
@@ -23,81 +23,90 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import sidebar from '../common/sider.vue';
|
|
|
- import headerVue from '../common/header.vue';
|
|
|
- import { mapState } from 'vuex';
|
|
|
- export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapState(['userInfo'])
|
|
|
- },
|
|
|
- components: {
|
|
|
- sidebar,
|
|
|
- headerVue
|
|
|
+import sidebar from "../common/sider.vue";
|
|
|
+import headerVue from "../common/header.vue";
|
|
|
+import { mapState } from "vuex";
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(["userInfo"]),
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ sidebar,
|
|
|
+ headerVue,
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ loginOut() {
|
|
|
+ this.$confirm("此操作将退出当前登录用户, 是否继续?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ localStorage.clear("token");
|
|
|
+ this.$router.push({
|
|
|
+ path: "/login",
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped="scoped">
|
|
|
- .el-header {
|
|
|
- position: relative;
|
|
|
- width: 100%;
|
|
|
- height: 80px;
|
|
|
- }
|
|
|
+.el-header {
|
|
|
+ position: relative;
|
|
|
+ width: 100%;
|
|
|
+ height: 80px;
|
|
|
+}
|
|
|
|
|
|
- .el-main {
|
|
|
- position: absolute;
|
|
|
- left: 254px;
|
|
|
- right: 0;
|
|
|
- top: 80px;
|
|
|
- bottom: 0;
|
|
|
- overflow-y: auto;
|
|
|
- background-color: #F1F2F5;
|
|
|
- padding: 10px;
|
|
|
- min-width: 550px;
|
|
|
- }
|
|
|
+.el-main {
|
|
|
+ position: absolute;
|
|
|
+ left: 254px;
|
|
|
+ right: 0;
|
|
|
+ top: 80px;
|
|
|
+ bottom: 0;
|
|
|
+ overflow-y: auto;
|
|
|
+ background-color: #f1f2f5;
|
|
|
+ padding: 10px;
|
|
|
+ min-width: 550px;
|
|
|
+}
|
|
|
|
|
|
- .header-button {
|
|
|
- font-size: 16px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #777777;
|
|
|
- cursor: pointer;
|
|
|
- margin-right: 40px;
|
|
|
- }
|
|
|
+.header-button {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #777777;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-right: 40px;
|
|
|
+}
|
|
|
|
|
|
- .header-button {
|
|
|
- font-size: 16px;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- color: #777777;
|
|
|
- cursor: pointer;
|
|
|
- margin-right: 40px;
|
|
|
- }
|
|
|
+.header-button {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #777777;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-right: 40px;
|
|
|
+}
|
|
|
|
|
|
- .home-content {
|
|
|
- display: flex;
|
|
|
+.home-content {
|
|
|
+ display: flex;
|
|
|
|
|
|
- .side-box {
|
|
|
- // width: 200px;
|
|
|
- position: relative;
|
|
|
- }
|
|
|
+ .side-box {
|
|
|
+ // width: 200px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
|
|
|
- .content {
|
|
|
- flex: 1;
|
|
|
- flex-shrink: 1;
|
|
|
- }
|
|
|
+ .content {
|
|
|
+ flex: 1;
|
|
|
+ flex-shrink: 1;
|
|
|
+ }
|
|
|
|
|
|
- .title {
|
|
|
- color: #0074D9;
|
|
|
- }
|
|
|
+ .title {
|
|
|
+ color: #0074d9;
|
|
|
}
|
|
|
+}
|
|
|
</style>
|