mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
适配avue
This commit is contained in:
parent
29f01214c3
commit
d76b46c114
@ -24,13 +24,13 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item>
|
||||
<router-link to="/">首页</router-link>
|
||||
<a href="https://gitee.com/smallweigit/avue" target="_blank">avue地址</a>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<a href="https://gitee.com/smallweigit/avue" target="_blank">码云地址</a>
|
||||
<a href="https://gitee.com/log4j/pig" target="_blank">pig地址</a>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<a href="https://github.com/nmxiaowei/avue" target="_blank">github</a>
|
||||
<router-link to="/info">修改信息</router-link>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logout" divided>退出系统</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="lock-form animated bounceInDown">
|
||||
<div class="animated" :class="{'shake':passwdError,'bounceOut':pass}">
|
||||
<h3 class="text-white">{{userInfo.username}}</h3>
|
||||
<el-input placeholder="请输入登录密码" type="password" class="input-with-select animated" v-model="passwd" @keyup.enter.native="handleLogin">
|
||||
<el-input placeholder="请输入锁屏密码" type="password" class="input-with-select animated" v-model="passwd" @keyup.enter.native="handleLogin">
|
||||
<el-button slot="append" icon="icon-bofangqi-suoping" @click="handleLogin"></el-button>
|
||||
<el-button slot="append" icon="icon-tuichu" @click="handleLogout"></el-button>
|
||||
</el-input>
|
||||
@ -91,4 +91,4 @@ export default {
|
||||
.lock-form {
|
||||
width: 300px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -41,7 +41,18 @@ export const asyncRouterMap = [
|
||||
path: '/',
|
||||
name: '主页',
|
||||
redirect: '/wel'
|
||||
},
|
||||
},{
|
||||
path: '/info',
|
||||
component: Layout,
|
||||
redirect: '/info/index',
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
name: '修改信息',
|
||||
component: _import('admin/user/info', 'views')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/myiframe',
|
||||
component: Layout,
|
||||
@ -66,23 +77,5 @@ export const asyncRouterMap = [
|
||||
component: _import('wel')
|
||||
}
|
||||
]
|
||||
}, {
|
||||
menuId: 1,
|
||||
path: '/admin',
|
||||
component: Layout,
|
||||
name: '系统管理',
|
||||
hidden: false,
|
||||
redirect: '/admin/user',
|
||||
meta: {
|
||||
title: '系统管理',
|
||||
},
|
||||
children: [
|
||||
{ menuId: 2, path: 'user', component: _import('admin/user/index', 'views'), name: '用户管理', meta: { title: '用户管理' } },
|
||||
{ menuId: 3, path: 'menu', component: _import('admin/menu/index', 'views'), name: '菜单管理', meta: { title: '菜单管理' } },
|
||||
{ menuId: 4, path: 'role', component: _import('admin/role/index', 'views'), name: '角色管理', meta: { title: '角色管理' } },
|
||||
{ menuId: 5, path: 'dept', component: _import('admin/dept/index', 'views'), name: '部门管理', meta: { title: '部门管理' } },
|
||||
{ menuId: 6, path: 'dict', component: _import('admin/dict/index', 'views'), name: '字典管理', meta: { title: '字典管理' } },
|
||||
{ menuId: 7, path: 'log', component: _import('admin/log/index', 'views'), name: '日志管理', meta: { title: '日志管理' } }
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div class="grid-content bg-purple">
|
||||
<el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-input type="text" :value="name" disabled></el-input>
|
||||
<el-input type="text" :value="userInfo.username" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="原密码" prop="pass">
|
||||
<el-input type="password" v-model="ruleForm2.password" auto-complete="off"></el-input>
|
||||
@ -18,7 +18,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="头像">
|
||||
<my-upload field="file" @crop-upload-success="cropUploadSuccess" v-model="show" :width="300" :height="300" url="/admin/user/upload" :headers="headers" img-format="png"></my-upload>
|
||||
<img :src="avatar">
|
||||
<img :src="userInfo.avatar">
|
||||
<el-button type="primary" @click="toggleShow" size="mini">选择
|
||||
<i class="el-icon-upload el-icon--right"></i>
|
||||
</el-button>
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import { mapState } from "vuex";
|
||||
import myUpload from "vue-image-crop-upload";
|
||||
import { getToken } from "@/util/auth";
|
||||
import ElFormItem from "element-ui/packages/form/src/form-item.vue";
|
||||
@ -89,7 +89,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["name", "avatar"])
|
||||
...mapState({
|
||||
userInfo: state => state.user.userInfo
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
submitForm(formName) {
|
||||
|
Loading…
Reference in New Issue
Block a user