1. 去掉编译打包时为正确配置BannerPlugin
2. fes-core替换Icon组件
3. setDefaultPage改为直接跳转到defaultPage,而不是redirect
This commit is contained in:
万纯 2020-09-03 19:11:47 +08:00 committed by harrywan
parent d6c58ac239
commit bf03315b7e
13 changed files with 37 additions and 43 deletions

View File

@ -392,9 +392,9 @@ module.exports = function webpackConfig(configs, webpack, mode) {
return `chunk-${joinedHash}`;
}),
/* config.plugin('Copyright') */
isBuild
&& new webpack.BannerPlugin(''),
// /* config.plugin('Copyright') */
// isBuild
// && new webpack.BannerPlugin(''),
/* config.plugin('case-sensitive-paths') */
new CaseSensitivePathsPlugin(),

View File

@ -1,6 +1,6 @@
{
"name": "@webank/fes-cli",
"version": "0.1.2",
"version": "0.1.3",
"description": "一个好用的前端管理台快速开发框架",
"preferGlobal": true,
"scripts": {

View File

@ -11,18 +11,17 @@ module.exports = {
},
// 测试环境 --env=sit 触发使用
develop: {
api: ''
api: 'http://test.xxx.com'
},
// 生产环境 --env=prod 触发使用
// 生产环境 --env=sit 触发使用
prod: {
api: ''
api: 'http://xxx.com'
}
},
// 配置角色-路由访问权限使用FesApp.setRole('unLogin')来修改当前用户的角色,控制路由访问权限
roles: {
unLogin: ['/home'],
service: ['/list', '/home'],
admin: ['/list', '/api/fes']
admin: ['/list', '*']
},
// map
map: {

View File

@ -52,6 +52,9 @@
"husky": "^3.0.9",
"lint-staged": "^9.4.2"
},
"dependencies": {},
"dependencies": {
"@webank/fes-core": "^0.1.0",
"@webank/fes-ui": "^0.1.0"
},
"peerDependencies": {}
}

View File

@ -3,9 +3,6 @@ import './assets/styles/main.scss';
export default function () {
this.FesApp.set('FesName', '$i18n.title');
setTimeout(() => {
this.FesApp.setRole('admin', false);
}, 1000);
// 设置退出逻辑
this.on('fes_logout', () => {
@ -26,10 +23,10 @@ export default function () {
console.log(`您浏览到了${route.path}`);
});
// // 设置当前角色
// if (!this.FesStorage.get('userLogin') === true) {
// this.setRole('unLogin')
// }
// 设置当前角色
if (!this.FesStorage.get('userLogin') === true) {
this.setRole('unLogin');
}
// 设置AJAX配置
this.FesApi.option({

View File

@ -1,6 +1,6 @@
{
"name": "@webank/fes-core",
"version": "0.1.0",
"version": "0.1.1",
"description": "一个好用的前端管理台快速开发框架",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"

View File

@ -205,10 +205,7 @@ class App {
async setDefaultPage() {
const defaultPage = await this.getDefaultPage(true);
this.router.addRoutes([{
path: '/',
redirect: () => defaultPage
}]);
this.router.push(defaultPage);
}
async setRole(roleId, redirect = true, update = true) {

View File

@ -16,7 +16,7 @@
<p>{{fesFesx.FesRoleName}}</p>
</div>
<div class="layout-left-user-logout">
<Icon @click="logout" type="logout" size="24" />
<Icon @click="logout" type="md-log-out" size="28" />
</div>
</div>
</div>

View File

@ -3,8 +3,14 @@
<div v-if="left" class="layout-left">
<left />
<span v-if="mode === 'vertical'" @click="toggleMenu" class="layout-left-fold-menu">
<Icon v-show="!leftHidden" type="double-left" />
<Icon v-show="leftHidden" type="double-right" />
<span v-show="!leftHidden">
<Icon type="ios-arrow-back" />
<Icon type="ios-arrow-back" />
</span>
<span v-show="leftHidden">
<Icon type="ios-arrow-forward" />
<Icon type="ios-arrow-forward" />
</span>
</span>
</div>
<div class="layout-right">

View File

@ -380,7 +380,6 @@ $dark-selected-color: #ffffff;
}
.layout-left-user-name {
// flex: 1;
padding: 0 20px;
p {
margin: 10px 0;
@ -389,12 +388,12 @@ $dark-selected-color: #ffffff;
}
.layout-left-user-logout {
// flex: 1;
height: 70px;
line-height: 70px;
text-align: center;
.ui-icon-logout {
.ui-icon {
cursor: pointer;
vertical-align: middle;
}
}

View File

@ -16,7 +16,4 @@
}
input[type=text]::-ms-clear {
display: none;
}
.layout-left-user-logout i {
vertical-align: bottom;
}
}

View File

@ -11,18 +11,17 @@ module.exports = {
},
// 测试环境 --env=sit 触发使用
develop: {
api: 'http://h.adm-test.webank.io'
api: 'http://test.xxx.com'
},
// 生产环境 --env=sit 触发使用
prod: {
api: 'http://adm.webank.io'
api: 'http://xxx.com'
}
},
// 配置角色-路由访问权限使用FesApp.setRole('unLogin')来修改当前用户的角色,控制路由访问权限
roles: {
unLogin: ['/home'],
service: ['/list', '/home'],
admin: ['/list', '/api/fes']
admin: ['/list', '*']
},
// map
map: {

View File

@ -3,9 +3,6 @@ import './assets/styles/main.scss';
export default function () {
this.FesApp.set('FesName', '$i18n.title');
setTimeout(() => {
this.FesApp.setRole('admin', false);
}, 1000);
// 设置退出逻辑
this.on('fes_logout', () => {
@ -26,10 +23,10 @@ export default function () {
console.log(`您浏览到了${route.path}`);
});
// // 设置当前角色
// if (!this.FesStorage.get('userLogin') === true) {
// this.setRole('unLogin')
// }
// 设置当前角色
if (!this.FesStorage.get('userLogin') === true) {
this.setRole('unLogin');
}
// 设置AJAX配置
this.FesApi.option({