perf: optimize some small details

This commit is contained in:
Pan 2019-04-18 18:16:13 +08:00
parent c09fb7fabc
commit c47b3e5c3e
8 changed files with 14 additions and 22 deletions

View File

@ -22,4 +22,3 @@ export function logout() {
method: 'post' method: 'post'
}) })
} }

View File

@ -30,6 +30,9 @@
<a target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/"> <a target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/">
<el-dropdown-item>Github</el-dropdown-item> <el-dropdown-item>Github</el-dropdown-item>
</a> </a>
<a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">
<el-dropdown-item>Docs</el-dropdown-item>
</a>
<el-dropdown-item divided> <el-dropdown-item divided>
<span style="display:block;" @click="logout">Log Out</span> <span style="display:block;" @click="logout">Log Out</span>
</el-dropdown-item> </el-dropdown-item>
@ -60,7 +63,6 @@ export default {
computed: { computed: {
...mapGetters([ ...mapGetters([
'sidebar', 'sidebar',
'name',
'avatar', 'avatar',
'device' 'device'
]) ])

View File

@ -10,7 +10,6 @@ const getters = {
introduction: state => state.user.introduction, introduction: state => state.user.introduction,
roles: state => state.user.roles, roles: state => state.user.roles,
permission_routes: state => state.permission.routes, permission_routes: state => state.permission.routes,
addRoutes: state => state.permission.addRoutes,
errorLogs: state => state.errorLog.logs errorLogs: state => state.errorLog.logs
} }
export default getters export default getters

View File

@ -51,7 +51,7 @@ const actions = {
return new Promise(resolve => { return new Promise(resolve => {
let accessedRoutes let accessedRoutes
if (roles.includes('admin')) { if (roles.includes('admin')) {
accessedRoutes = asyncRoutes accessedRoutes = asyncRoutes || []
} else { } else {
accessedRoutes = filterAsyncRoutes(asyncRoutes, roles) accessedRoutes = filterAsyncRoutes(asyncRoutes, roles)
} }

View File

@ -1,6 +1,7 @@
/** /**
* Created by jiachenpan on 16/11/18. * Created by jiachenpan on 16/11/18.
*/ */
/** /**
* @param {string} path * @param {string} path
* @returns {Boolean} * @returns {Boolean}

View File

@ -8,22 +8,13 @@
<img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404"> <img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
</div> </div>
<div class="bullshit"> <div class="bullshit">
<div class="bullshit__oops"> <div class="bullshit__oops">OOPS!</div>
OOPS! <div class="bullshit__info">All rights reserved
<a style="color:#20a0ff" href="https://wallstreetcn.com" target="_blank">wallstreetcn</a>
</div> </div>
<div class="bullshit__info"> <div class="bullshit__headline">{{ message }}</div>
版权所有 <div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to return to the homepage.</div>
<a class="link-type" href="https://wallstreetcn.com" target="_blank">华尔街见闻</a> <a href="" class="bullshit__return-home">Back to home</a>
</div>
<div class="bullshit__headline">
{{ message }}
</div>
<div class="bullshit__info">
请检查您输入的网址是否正确请点击以下按钮返回主页或者发送错误报告
</div>
<router-link to="/" class="bullshit__return-home">
返回首页
</router-link>
</div> </div>
</div> </div>
</div> </div>
@ -35,7 +26,7 @@ export default {
name: 'Page404', name: 'Page404',
computed: { computed: {
message() { message() {
return '网管说这个页面你不能进......' return 'The webmaster said that you can not enter this page...'
} }
} }
} }

View File

@ -30,7 +30,7 @@
ref="password" ref="password"
v-model="loginForm.password" v-model="loginForm.password"
:type="passwordType" :type="passwordType"
:placeholder="Password" placeholder="Password"
name="password" name="password"
auto-complete="on" auto-complete="on"
@keyup.native="checkCapslock" @keyup.native="checkCapslock"