用户基础设置-页面优化

main
ysn 6 days ago
parent 531d9e2bb8
commit 8425bd08c9
  1. 50
      src/layout/components/Navbar.vue
  2. 4
      src/views/system/user/profile/index.vue

@ -55,24 +55,37 @@
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<router-link to="/user/profile"> <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item> <el-dropdown-item icon="el-icon-user">个人中心</el-dropdown-item>
</router-link> </router-link>
<!-- <el-dropdown-item @click.native="setLayout" v-if="setting"> <!-- <el-dropdown-item @click.native="setLayout" v-if="setting" icon="el-icon-setting">
<span>布局设置</span> <span>布局设置</span>
</el-dropdown-item> --> </el-dropdown-item> -->
<el-dropdown-item @click.native="lockScreen"> <el-dropdown-item @click.native="lockScreen" icon="el-icon-lock">
<span>锁定屏幕</span> <span>锁定屏幕</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="showSystemSetting = true"> <el-dropdown-item
系统设置 @click.native="showSystemSetting = true"
icon="el-icon-setting"
>
<span>系统设置</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="showAbout = true"> <el-dropdown-item
关于 @click.native="showAbout = true"
icon="el-icon-info"
>
<span>关于</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item divided @click.native="switchAccount"> <el-dropdown-item
切换账号 divided
@click.native="logout('确定要切换账号吗?')"
icon="el-icon-switch-button"
>
<span>切换账号</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item @click.native="logout"> <el-dropdown-item
@click.native="logout('确定注销并退出系统吗?')"
icon="el-icon-close"
>
<span>退出登录</span> <span>退出登录</span>
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
@ -166,21 +179,8 @@ export default {
this.$router.push("/lock"); this.$router.push("/lock");
}); });
}, },
switchAccount() { logout(title) {
this.$confirm("确定要切换账号吗?", "提示", { this.$confirm(title, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$store.dispatch("LogOut").then(() => {
location.href = "/index";
});
})
.catch(() => {});
},
logout() {
this.$confirm("确定注销并退出系统吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="6" :xs="24"> <el-col :span="12" :xs="24">
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>个人信息</span> <span>个人信息</span>
@ -56,7 +56,7 @@
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="18" :xs="24"> <el-col :span="12" :xs="24">
<el-card> <el-card>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>修改密码</span> <span>修改密码</span>

Loading…
Cancel
Save