Skip to content

Commit 33306f9

Browse files
authored
Merge pull request #237 from aspnetboilerplate/issue-235
Issue 235
2 parents 88b8bd2 + 3fa10b9 commit 33306f9

File tree

11 files changed

+31
-38
lines changed

11 files changed

+31
-38
lines changed

vue/src/components/lockscreen/components/locking-page.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default {
2525
lockScreenBack.style.zIndex = -1;
2626
lockScreenBack.style.boxShadow = '0 0 0 0 #667aa6 inset';
2727
this.$router.push({
28-
name: Cookies.get('last_page_name') // 解锁之后跳转到锁屏之前的页面
28+
name: Cookies.get('last_page_name')
2929
});
3030
}
3131
},

vue/src/components/lockscreen/components/unlock.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default class UnLock extends AbpBase {
6868
Cookies.set('locking', '0');
6969
this.$emit('on-unlock');
7070
} else {
71-
this.$Message.error('密码错误,请重新输入');
71+
this.$Message.error('WrongPassword,Wrong password');
7272
}
7373
}
7474
unlockMousedown () {

vue/src/components/lockscreen/lockscreen.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class LockScreen extends AbpBase {
2626
lockScreenBack.style.boxShadow = '0 0 0 ' + this.lockScreenSize + 'px #667aa6 inset';
2727
this.showUnlock = true;
2828
let name=this.$route.name?this.$route.name:'';
29-
Cookies.set('last_page_name', name); // 本地存储锁屏之前打开的页面以便解锁后打开
29+
Cookies.set('last_page_name', name);
3030
setTimeout(() => {
3131
lockScreenBack.style.transition = 'all 0s';
3232
this.$router.push({

vue/src/components/tags-page-opened.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,9 @@ export default class TagsPageOpened extends AbpBase {
131131
moveToView (tag:any) {
132132
let scrollCon=this.$refs.scrollCon as any;
133133
if (tag.offsetLeft < -this.tagBodyLeft) {
134-
// 标签在可视区域左侧
135134
this.tagBodyLeft = -tag.offsetLeft + 10;
136135
} else if (tag.offsetLeft + 10 > -this.tagBodyLeft && tag.offsetLeft + tag.offsetWidth < -this.tagBodyLeft + scrollCon.offsetWidth - 100) {
137-
// 标签在可视区域
138136
} else {
139-
// 标签在可视区域右侧
140137
this.tagBodyLeft = -(tag.offsetLeft - (scrollCon.offsetWidth - 100 - tag.offsetWidth) + 20);
141138
}
142139
}
@@ -149,7 +146,7 @@ export default class TagsPageOpened extends AbpBase {
149146
this.moveToView(tag);
150147
}
151148
})
152-
}, 1); // 这里不设定时器就会有偏移bug
149+
}, 1);
153150
this.tagsCount = this.tagsList.length;
154151
}
155152
@Watch('$route')

vue/src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Vue from 'vue'
2-
import App from './App.vue'
2+
import App from './app.vue'
33
import iView from 'iview'
44
import {router} from './router/index';
55
//import 'iview/dist/styles/iview.css';
@@ -39,7 +39,6 @@ Ajax.get('/AbpUserConfiguration/GetAll').then(data=>{
3939
}
4040
}
4141
this.$store.commit('app/initCachepage');
42-
// 权限菜单过滤相关
4342
this.$store.commit('app/updateMenulist');
4443
},
4544
created () {

vue/src/router/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,35 @@ export const router = new VueRouter(RouterConfig);
1818
router.beforeEach((to, from, next) => {
1919
iView.LoadingBar.start();
2020
Util.title(to.meta.title);
21-
if (Cookies.get('locking') === '1' && to.name !== 'locking') { // 判断当前是否是锁定状态
21+
if (Cookies.get('locking') === '1' && to.name !== 'locking') {
2222
next({
2323
replace: true,
2424
name: 'locking'
2525
});
2626
}else if (Cookies.get('locking') === '0' && to.name === 'locking') {
2727
next(false);
2828
} else {
29-
if (!Util.abp.session.userId&& to.name !== 'login') { // 判断是否已经登录且前往的页面不是登录页
29+
if (!Util.abp.session.userId&& to.name !== 'login') {
3030
next({
3131
name: 'login'
3232
});
33-
} else if (!!Util.abp.session.userId && to.name === 'login') { // 判断是否已经登录且前往的是登录页
33+
} else if (!!Util.abp.session.userId && to.name === 'login') {
3434
Util.title(to.meta.title);
3535
next({
3636
name: 'home'
3737
});
3838
} else {
3939
const curRouterObj = Util.getRouterObjByName([otherRouters, ...appRouters], to.name);
40-
if (curRouterObj && curRouterObj.permission) { // 需要判断权限的路由
40+
if (curRouterObj && curRouterObj.permission) {
4141
if (window.abp.auth.hasPermission(curRouterObj.permission)) {
42-
Util.toDefaultPage([otherRouters, ...appRouters], to.name, router, next); // 如果在地址栏输入的是一级菜单则默认打开其第一个二级菜单的页面
42+
Util.toDefaultPage([otherRouters, ...appRouters], to.name, router, next);
4343
} else {
4444
next({
4545
replace: true,
4646
name: 'error-403'
4747
});
4848
}
49-
} else { // 没有配置权限的路由, 直接通过
49+
} else {
5050
Util.toDefaultPage([...routers], to.name, router, next);
5151
}
5252
}

vue/src/store/modules/app.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ interface AppState{
1010
cachePage:Array<any>;
1111
lang:string;
1212
isFullScreen: boolean;
13-
openedSubmenuArr: Array<any>; // 要展开的菜单数组
14-
menuTheme: string; // 主题
13+
openedSubmenuArr: Array<any>;
14+
menuTheme: string;
1515
themeColor: string,
1616
pageOpenedList:Array<any>;
1717
currentPageName: string;
18-
currentPath:Array<any>; // 面包屑数组
18+
currentPath:Array<any>;
1919
menuList: Array<any>;
2020
routers:Array<any>;
2121
tagsList: Array<any>;
@@ -29,8 +29,8 @@ class AppModule implements Module<AppState,any>{
2929
cachePage: [],
3030
lang: '',
3131
isFullScreen: false,
32-
openedSubmenuArr: [], // 要展开的菜单数组
33-
menuTheme: 'dark', // 主题
32+
openedSubmenuArr: [],
33+
menuTheme: 'dark',
3434
themeColor: '',
3535
pageOpenedList: [{
3636
meta:{title: 'HomePage'},
@@ -44,7 +44,7 @@ class AppModule implements Module<AppState,any>{
4444
path: '',
4545
name: 'home'
4646
}
47-
], // 面包屑数组
47+
],
4848
menuList: [],
4949
routers: [
5050
otherRouters,
@@ -53,7 +53,7 @@ class AppModule implements Module<AppState,any>{
5353
tagsList: [...otherRouters.children],
5454
messageCount: 0,
5555
dontCache: [],
56-
noticeList:[{read:false,type:0,title:'第一条通知',description:'一天前'},{read:false,type:1},{read:false,type:0,title:'第二条通知',description:'一月前'}]
56+
noticeList:[{read:false,type:0,title:'First notice',description:'One day ago'},{read:false,type:1},{read:false,type:0,title:'Second notice',description:'One month ago'}]
5757
};
5858
mutations= {
5959
logout(state:AppState){

vue/src/views/main.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@
266266
display: inline-block;
267267
vertical-align: middle;
268268
}
269+
i{
270+
height: 64px;
271+
width: auto;
272+
display: inline-block;
273+
vertical-align: middle;
274+
padding: 16px 0px 16px 24px;
275+
}
269276
}
270277
.page-body{
271278
margin: 8px;

vue/src/views/main.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
:menu-list="menuList">
1414
<div slot="top" class="logo-con">
1515
<a>
16-
<img src="../images/logo-min.jpg" key="min-logo" />
16+
<Icon type="cube" size="32"></Icon>
1717
<h1 >{{L('AppName')}}</h1>
1818
</a>
1919

@@ -97,10 +97,10 @@
9797
return this.$store.state.app.menuList;
9898
}
9999
get pageTagsList () {
100-
return this.$store.state.app.pageOpenedList as Array<any>; // 打开的页面的页面对象
100+
return this.$store.state.app.pageOpenedList as Array<any>;
101101
}
102102
get currentPath () {
103-
return this.$store.state.app.currentPath; // 当前面包屑数组
103+
return this.$store.state.app.currentPath;
104104
}
105105
get lang(){
106106
return this.$store.state.app.lang;
@@ -150,7 +150,7 @@
150150
return false
151151
}
152152
});
153-
if (!openpageHasTag) { // 解决关闭当前标签后再点击回退按钮会退到当前页时没有标签的问题
153+
if (!openpageHasTag) {
154154
util.openNewPage(this, name as string, this.$route.params || {}, this.$route.query || {});
155155
}
156156
}

vue/src/views/setting/role/role.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,4 @@
163163
})
164164
}
165165
}
166-
</script>
167-
168-
<style>
169-
170-
</style>
171-
166+
</script>

0 commit comments

Comments
 (0)