Skip to content

Commit e40e487

Browse files
EdwinBetanc0urtPanJiaChenmarxangelsYamel Senihyamelsenih
authored
feat: Update repository (#580)
* chore: remove i18n (#1828) * [release] 4.1.0 * perf[Profile]: adapt the profile page to the mobile (PanJiaChen#2020) * Revert "perf: optimize page scrolling when setting fixedHeader" This reverts commit e8e6c7e. * perf[Style]: refine fixed-header style when open el-dialog * doc: add new article * chore: use mockjs in production environment * fix[sidebar.css]: remove redundant css * perf[style]: refine dashboard style in mobile (PanJiaChen#2060) * feat[ErrorLog]: add a clear button in ErrorLog component (PanJiaChen#2065) * fix[redirect]: fix redirect bug in vue-devtools (PanJiaChen#2066) * perf[Tinymce]: update tinymce cdn version * fix[redirect]: fix redirect bug in vue-devtool again * docs: add support to readme for Spanish (PanJiaChen#2070) * docs[es]: add some translation(PanJiaChen#2080) * perf[Exapme]: set page title according to article id * perf[RightPanel]: tidy css (PanJiaChen#2101) * feat[SvgIcon]: support import svg from url (PanJiaChen#2052) * fix: fixed change roles bug (PanJiaChen#2072) * perf[Breadcrumb]: do not update breadcrumbs when go to redirect page (PanJiaChen#2086) * perf[store]: add support to sub-modules (PanJiaChen#2047) * perf[Login]: support other query (PanJiaChen#2013) * refactor[chore]: generate postcss.config.js instead of .postcssrc.js consistent with vue-cli * perf[Tinymce]: dynamic import tinymce(PanJiaChen#2102) * [release] 4.2.0 * perf[Style]: refine example css * fix[Chart]: fixed chart bug in keep-alive (PanJiaChen#2119) * Create FUNDING.yml * chore: set localhost => 127.0.0.1 (PanJiaChen#2142) * update github ISSUE_TEMPLATE * chore: add autoprefixer to devDependencies * perf[Tinymce]: add language option (PanJiaChen#2159) * fix[Tinymce]: fixed bug when init multiple tinymces at the same time (PanJiaChen#2152) * feat: add tab url demo (PanJiaChen#2114) * perf[request.js]: refine error reject (PanJiaChen#2160) * [release] 4.2.1 * perf: default not set withCredentials * fix[ImageCropper]: removeEventListener when destroyed(PanJiaChen#2169) * docs: fix typo (PanJiaChen#2170) * fix: input attribute autocomplete error (PanJiaChen#2191) * perf[PanThumb]: Replace the image tag with background-image to prevent the stretching (PanJiaChen#2202) * docs: fix typo README.zh-CN.md (PanJiaChen#2283) 修改错别字 * perf[clipboard.js]: remove redundant code (PanJiaChen#2307) * bump: update axios for security vulnerability * bump: update @vue/cli-plugin-eslint version (PanJiaChen#2327) FIx cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231. * chore: allow dynamic set port * fix[complex-table]: form header sort icon is out of sync (PanJiaChen#2382) * fix: fixed missing icons * fix: typos (PanJiaChen#2532) Role Nmae => Role Name * docs: add awesome-project * fix[Dashboard]: fixed debounce bug (PanJiaChen#2586) (PanJiaChen#2597) To fixed PanJiaChen#2586 * perf: VS Code support webpack alias file jump (PanJiaChen#2609) * perf: optimize import file-saver way(PanJiaChen#2347) * refactor[ImageCropper]: fix lint error (PanJiaChen#2365) * fix: fixed numberFormatter bug PanJiaChen#2568 * fix[example]: fixed create.vue cache error PanJiaChen#2608 * perf[utils.js]: perf parseTime function (PanJiaChen#2625) * perf[tagsView]: pref DEL_CACHED_VIEW and DEL_OTHERS_CACHED_VIEWS function (PanJiaChen#2626) * fix[tagsView]: fixed DEL_OTHERS_CACHED_VIEWS bug * fix[logout]: empty tagsview when logout (PanJiaChen#2632) * fix[TagsView]: fixed toLastView bug (PanJiaChen#2634) * perf[SvgIcon]: change xlink:href to href(PanJiaChen#2645) https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href * fix[TagsView]: fixed click.middle can close affixed tag bug (PanJiaChen#2649) * docs: add job ad * docs: improved README.md (PanJiaChen#2656) * style: fix el-date-picker css style * perf: format dropdown menu code (PanJiaChen#2720) * perf: format inline edit table (PanJiaChen#2725) move one format `{row}` * perf: format drag table (PanJiaChen#2733) move one format `{row}` * perf: complex table (PanJiaChen#2732) Move ont format `{row}` * perf: text i18n (PanJiaChen#2739) * update 'MarkdownEditor' components name * format: space in user card (PanJiaChen#2744) * perf: format pdf download (PanJiaChen#2791) * perf[views/icons]: use grid (PanJiaChen#2803) * feat: plop new generate store (PanJiaChen#2805) * fix[icons]:fixed eslint 1 error and 2 warnings (PanJiaChen#2835) * perf[documentation]: refine css * fix[Logout]: click blank area of ​​dropDown able to logout (PanJiaChen#2896) Fixed clicking blank area of ​​drop-down unable to log out * perf: import mockXHR only in production (PanJiaChen#2910) * 自动排除mock 生产环境,使用webpack的条件编译自动排除mock数据 * perf: refine Co-authored-by: 花裤衩 <[email protected]> * perf[Menu]: remove unused menu-wrapper (PanJiaChen#2903) * perf[complex-table]:refine code (PanJiaChen#2825) * 解决无法删除列表的bug;优化代码; * perf: refine Co-authored-by: 花裤衩 <[email protected]> * perf: optimize checkCapslock method (PanJiaChen#2635) * optimize checkCapslock method * update Co-authored-by: 花裤衩 <[email protected]> * fix[Charts]: fix charts resize in keep-alive bug (PanJiaChen#2922) * fix[Charts]: fix charts resize in keep-alive bug * refine * fix: fixed mock server (PanJiaChen#2929) * init * refine * update * bump: update element-ui version * fix: fixed require mock bug in production * fix: fixed redirect path regex (PanJiaChen#2933) * perf[Mock]: set responseFake to mock-server.js(PanJiaChen#2966) * modify 把mock/index.js中与mock-server相关的代码转移到mock-server.js中去,实现两则功能分割 * docs: improve Japanese translation (PanJiaChen#2970) * perf: change script-loader to dependencies * fix[profile/UserCard]: fixed wrong key name (PanJiaChen#3056) roles => role * fix:fixed parseTime bug in ie and safari(PanJiaChen#3066) * /src/utils/index.js parseTime 添加IE浏览器(版本10以下,包括版本10)兼容。 * perf: update Co-authored-by: aisen60 <[email protected]> Co-authored-by: 花裤衩 <[email protected]> * perf: format component names as PascalCase (PanJiaChen#3074) format: component names should be PascalCase * docs: add smallsticker * Update README.zh-CN.md * fix: svg support old broswer (PanJiaChen#3085) * fixed typo (PanJiaChen#3091) * fix: use vue-cli default source-map (PanJiaChen#3097) cheap-module-eval-source-map * perf[Tinymce]: editor try to keep these URLs intact (PanJiaChen#3141) * fix[element-variables]: missing space in element-variables (PanJiaChen#3144) * fix: compatibility with vetur (#1700) * perf: change default element-ui language to english (PanJiaChen#2741) * feat: add option to try project on CodeSandbox (PanJiaChen#2976) * docs: add tips * perf: when tags-view scroll close the right-menu * fix[parseTime]: fixed when pass null (PanJiaChen#3038) * fix[css]: min btn width (PanJiaChen#3164) * docs: Improve read me files and changes in Spanish. (PanJiaChen#3234) * [release] 4.2.2 * chore: change node-sass to dart-sass (PanJiaChen#3040) * perf: change >>> ::v-deep * [release] 4.3.0 * docs: fix wrong link * chore: turn on the preload * refactor: change mock files to commonjs (PanJiaChen#3246) * feat[Menu]: menu icon support el-icon(PanJiaChen#3048) * fix[utils]: param2Obj bug when url params includes ==(PanJiaChen#3100) * perf: remove unused showdown Co-authored-by: 花裤衩 <[email protected]> * perf: lint code * fix[v-permission]: support dynamic set roles (PanJiaChen#3251) * chore: update element-ui to 2.13.2 * fix[plop]: set trim => trim() (PanJiaChen#3254) notEmpty * fix some typos * [release] 4.3.1 * bump: update to vue-cli@4 (PanJiaChen#3028) * [release] 4.4.0 * fix[chore]: do not preload runtime.js (PanJiaChen#3279) * perf[chore]: remove preserveWhitespace config (PanJiaChen#3280) * perf[Tinymce]: remove useless code (PanJiaChen#3295) * perf[permission.js]: remove useless code (PanJiaChen#3301) * typo: replace Css with CSS (PanJiaChen#3323) * docs: add GitAds * docs: remove gitads * docs: add vue-java-admin-dashboard-spring * perf: refine documentation button css * docs: add coupon * feat: add new sponsored * update dependencies. * fix: chart components, TODO: eslint-plugin-vue. * Update FUNDING.yml Co-authored-by: 花裤衩 <[email protected]> Co-authored-by: toruksmakto <[email protected]> Co-authored-by: Yamel Senih <[email protected]> Co-authored-by: Yamel Senih <[email protected]> Co-authored-by: liugq <[email protected]> Co-authored-by: bpzhang <[email protected]> Co-authored-by: Serge <[email protected]> Co-authored-by: MaYuanhai <[email protected]> Co-authored-by: Jessynt <[email protected]> Co-authored-by: 肖敏 <[email protected]> Co-authored-by: TinaryTree <[email protected]> Co-authored-by: itsccn <[email protected]> Co-authored-by: why <[email protected]> Co-authored-by: Baskerville* <[email protected]> Co-authored-by: Francis <[email protected]> Co-authored-by: monkeycf <[email protected]> Co-authored-by: BradyBromley <[email protected]> Co-authored-by: Phạm Ngọc Hòa <[email protected]> Co-authored-by: bbigcd <[email protected]> Co-authored-by: xuanzai <[email protected]> Co-authored-by: flitrue <[email protected]> Co-authored-by: 韬 <[email protected]> Co-authored-by: 任羽飞 <[email protected]> Co-authored-by: Kaitian Xie <[email protected]> Co-authored-by: AndyLZC/AndyLZC.github.io <[email protected]> Co-authored-by: RussXD <[email protected]> Co-authored-by: 李小斐 <[email protected]> Co-authored-by: RoBlues <[email protected]> Co-authored-by: Shota Aratono <[email protected]> Co-authored-by: echofly <[email protected]> Co-authored-by: Aisen60 <[email protected]> Co-authored-by: aisen60 <[email protected]> Co-authored-by: Alex S <[email protected]> Co-authored-by: Aisen <[email protected]> Co-authored-by: ntnyq <[email protected]> Co-authored-by: garethx <[email protected]> Co-authored-by: AiMe1991 <[email protected]> Co-authored-by: cooper <[email protected]> Co-authored-by: Nickbing Lao <[email protected]> Co-authored-by: Edwin Betancourt <[email protected]> Co-authored-by: Cat73 <[email protected]> Co-authored-by: Silentdoer <[email protected]> Co-authored-by: qige2016 <[email protected]> Co-authored-by: Dihak <[email protected]> Co-authored-by: crayymumu <[email protected]> Co-authored-by: dyz <[email protected]> Co-authored-by: Kerollos Magdy <[email protected]> Co-authored-by: EdwinBetanc0urt <[email protected]>
1 parent a1bc8bb commit e40e487

File tree

30 files changed

+149
-119
lines changed

30 files changed

+149
-119
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
root: true,
33
parserOptions: {
4-
parser: 'babel-eslint',
4+
parser: '@babel/eslint-parser',
55
sourceType: 'module'
66
},
77
env: {

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# These are supported funding model platforms
22

3-
patreon: panjiachen
4-
custom: https://panjiachen.github.io/vue-element-admin-site/donate
3+
github: [YamelSenih]
4+
custom: [paypal.me/YamelSenih, https://adempiere.github.io/adempiere-vue-site/donate/]

package.json

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "adempiere-vue",
3-
"version": "4.3.1",
3+
"version": "4.4.0",
44
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
55
"author": "Pan <[email protected]>",
66
"contributors": [
@@ -30,17 +30,17 @@
3030
"test:ci": "npm run lint && npm run test:unit"
3131
},
3232
"dependencies": {
33-
"@toast-ui/vue-editor": "^2.5.0",
34-
"axios": "0.21.0",
33+
"@toast-ui/vue-editor": "2.5.1",
34+
"axios": "0.21.1",
3535
"clipboard": "2.0.6",
36-
"codemirror": "5.58.2",
37-
"core-js": "3.7.0",
36+
"codemirror": "5.59.2",
37+
"core-js": "3.8.3",
3838
"driver.js": "0.9.8",
39-
"dropzone": "5.7.2",
40-
"echarts": "4.9.0",
41-
"element-ui": "2.14.1",
42-
"file-saver": "2.0.2",
43-
"fuse.js": "6.4.3",
39+
"dropzone": "5.7.3",
40+
"echarts": "5.0.2",
41+
"element-ui": "2.15.0",
42+
"file-saver": "2.0.5",
43+
"fuse.js": "6.4.6",
4444
"js-cookie": "2.2.1",
4545
"jsonlint": "1.6.3",
4646
"jszip": "3.5.0",
@@ -49,52 +49,53 @@
4949
"nprogress": "0.2.0",
5050
"path-to-regexp": "6.2.0",
5151
"pinyin": "2.9.1",
52-
"screenfull": "5.0.2",
52+
"screenfull": "5.1.0",
5353
"script-loader": "0.7.2",
54-
"sortablejs": "1.10.2",
54+
"sortablejs": "1.13.0",
5555
"tui-editor": "1.4.10",
5656
"v-markdown": "^1.0.2",
5757
"vue": "2.6.12",
5858
"vue-content-loading": "^1.6.0",
5959
"vue-count-to": "1.0.13",
60-
"vue-i18n": "8.22.1",
60+
"vue-i18n": "8.22.4",
6161
"vue-multipane": "^0.9.5",
62-
"vue-resize": "^0.5.0",
63-
"vue-router": "3.4.9",
62+
"vue-resize": "1.0.0",
63+
"vue-router": "3.5.1",
6464
"vue-shortkey": "^3.1.7",
6565
"vue-split-panel": "^1.0.4",
6666
"vue-splitpane": "1.0.6",
67-
"vuedraggable": "^2.24.3",
68-
"vuex": "3.5.1",
69-
"xlsx": "0.16.8"
67+
"vuedraggable": "2.24.3",
68+
"vuex": "3.6.2",
69+
"xlsx": "0.16.9"
7070
},
7171
"devDependencies": {
72-
"@vue/cli-plugin-babel": "4.5.8",
73-
"@vue/cli-plugin-eslint": "4.5.8",
74-
"@vue/cli-plugin-pwa": "4.5.8",
75-
"@vue/cli-plugin-unit-jest": "4.5.8",
76-
"@vue/cli-service": "4.5.8",
77-
"@vue/test-utils": "1.1.1",
72+
"@babel/core": "7.12.13",
73+
"@babel/eslint-parser": "7.12.13",
74+
"@vue/cli-plugin-babel": "4.5.11",
75+
"@vue/cli-plugin-eslint": "4.5.11",
76+
"@vue/cli-plugin-pwa": "4.5.11",
77+
"@vue/cli-plugin-unit-jest": "4.5.11",
78+
"@vue/cli-service": "4.5.11",
79+
"@vue/test-utils": "1.1.3",
7880
"autoprefixer": "9.8.6",
79-
"babel-eslint": "10.1.0",
8081
"babel-jest": "26.6.3",
8182
"babel-plugin-dynamic-import-node": "2.3.3",
8283
"chalk": "4.1.0",
83-
"chokidar": "3.4.3",
84+
"chokidar": "3.5.1",
8485
"connect": "3.7.0",
85-
"eslint": "7.13.0",
86+
"eslint": "7.19.0",
8687
"eslint-plugin-vue": "6.2.2",
8788
"fs": "0.0.1-security",
88-
"html-webpack-plugin": "4.5.0",
89-
"husky": "4.3.0",
90-
"lint-staged": "10.5.1",
89+
"html-webpack-plugin": "5.0.0",
90+
"husky": "4.3.8",
91+
"lint-staged": "10.5.4",
9192
"mockjs": "1.1.0",
9293
"plop": "2.7.4",
93-
"sass": "1.29.0",
94-
"sass-loader": "10.1.0",
94+
"sass": "1.32.6",
95+
"sass-loader": "10.1.1",
9596
"script-ext-html-webpack-plugin": "2.1.5",
9697
"serve-static": "1.14.1",
97-
"svg-sprite-loader": "5.0.0",
98+
"svg-sprite-loader": "5.2.1",
9899
"svgo": "1.3.2",
99100
"tasksfile": "5.1.1",
100101
"vue-template-compiler": "2.6.12"
@@ -111,6 +112,7 @@
111112
"npm": ">= 3.0.0"
112113
},
113114
"keywords": [
115+
"adempiere",
114116
"vue",
115117
"admin",
116118
"dashboard",

src/api/user.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,6 @@ export function requestSessionInfo(token) {
6060
})
6161
}
6262

63-
/**
64-
* Logout from server
65-
* @param {string} token or session UUID
66-
*/
67-
export function logout(token) {
68-
return requestRest({
69-
url: '/user/logout',
70-
data: {
71-
token
72-
}
73-
})
74-
}
75-
7663
/**
7764
* Get User menu from server
7865
* @param {string} sessionUuid
@@ -89,3 +76,16 @@ export function requestMenu({
8976
})
9077
.then(evaluateResponse)
9178
}
79+
80+
/**
81+
* Logout from server
82+
* @param {string} token or session UUID
83+
*/
84+
export function logout(token) {
85+
return requestRest({
86+
url: '/user/logout',
87+
data: {
88+
token
89+
}
90+
})
91+
}

src/components/Charts/Keyboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</template>
44

55
<script>
6-
import echarts from 'echarts'
6+
import * as echarts from 'echarts'
77
import resize from './mixins/resize'
88
99
export default {

src/components/Charts/LineMarker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</template>
44

55
<script>
6-
import echarts from 'echarts'
6+
import * as echarts from 'echarts'
77
import resize from './mixins/resize'
88
99
export default {

src/components/Charts/MixChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</template>
44

55
<script>
6-
import echarts from 'echarts'
6+
import * as echarts from 'echarts'
77
import resize from './mixins/resize'
88
99
export default {

src/components/Tinymce/index.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,7 @@ export default {
211211
window.tinymce.get(this.tinymceId).getContent()
212212
},
213213
imageSuccessCBK(arr) {
214-
const _this = this
215-
arr.forEach(v => {
216-
window.tinymce.get(_this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`)
217-
})
214+
arr.forEach(v => window.tinymce.get(this.tinymceId).insertContent(`<img class="wscnph" src="${v.url}" >`))
218215
}
219216
}
220217
}

src/lang/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import enLocale from './en'
99
import zhLocale from './zh'
1010
import esLocale from './es'
1111
import jaLocale from './ja'
12+
1213
import esADempiere from './ADempiere/es'
1314
import enADempiere from './ADempiere/en'
1415

@@ -44,17 +45,17 @@ const dateTimeFormats = {
4445
const messages = {
4546
en: {
4647
...enLocale,
47-
...elementEnLocale,
48-
...enADempiere
48+
...enADempiere,
49+
...elementEnLocale
4950
},
5051
zh: {
5152
...zhLocale,
5253
...elementZhLocale
5354
},
5455
es: {
5556
...esLocale,
56-
...elementEsLocale,
57-
...esADempiere
57+
...esADempiere,
58+
...elementEsLocale
5859
},
5960
ja: {
6061
...jaLocale,

src/layout/components/Navbar.vue

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<div class="navbar">
33
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
4+
45
<el-button
56
v-if="isMenuMobile && isMobile"
67
type="text"
@@ -12,7 +13,21 @@
1213
<div v-show="isMenuMobile && isMobile" style="display: inline-flex; float: right;">
1314
<search id="header-search" class="right-menu-item" style="padding-top: 10px;" />
1415
<badge style="padding-top: 6px;" />
15-
<!-- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover">
16+
</div>
17+
<!--
18+
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
19+
20+
<error-log class="errLog-container right-menu-item hover-effect" />
21+
22+
<screenfull id="screenfull" class="right-menu-item hover-effect" />
23+
24+
<el-tooltip content="Global Size" effect="dark" placement="bottom">
25+
<size-select id="size-select" class="right-menu-item hover-effect" />
26+
</el-tooltip>
27+
28+
</template>
29+
30+
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
1631
<div class="avatar-wrapper">
1732
<img :src="avatar+'?imageView2/1/w/80/h/80'" class="user-avatar">
1833
<i class="el-icon-caret-bottom" />
@@ -40,8 +55,8 @@
4055
<span style="display:block;">{{ $t('navbar.logOut') }}</span>
4156
</el-dropdown-item>
4257
</el-dropdown-menu>
43-
</el-dropdown> -->
44-
</div>
58+
</el-dropdown>
59+
-->
4560
<div class="right-menu">
4661
<template v-if="device!=='mobile'">
4762
<search id="header-search" class="right-menu-item" />

src/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import 'normalize.css/normalize.css' // a modern alternative to CSS resets
66

77
import Element from 'element-ui'
88
import './styles/element-variables.scss'
9+
import enLang from 'element-ui/lib/locale/lang/en'// 如果使用中文语言包请默认支持,无需额外引入,请删除该依赖
10+
911
import VueSplit from 'vue-split-panel'
1012
import 'vue-resize/dist/vue-resize.css'
1113
import VueResize from 'vue-resize'
@@ -51,7 +53,8 @@ Vue.use(VueSplit)
5153
Vue.use(VueResize)
5254
Vue.use(Element, {
5355
size: Cookies.get('size') || 'medium', // set element-ui default size
54-
i18n: (key, value) => i18n.t(key, value)
56+
i18n: (key, value) => i18n.t(key, value),
57+
locale: enLang // 如果使用中文,无需设置,请删除
5558
})
5659

5760
// register global utility filters

src/router/index.js

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import chartsRouter from './modules/charts'
1212
import tableRouter from './modules/table'
1313
import nestedRouter from './modules/nested'
1414

15+
import enrollmentRoute from './modules/ADempiere/enrollment.js'
16+
1517
/**
1618
* Note: sub-menu only appear when route children.length >= 1
1719
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@@ -39,6 +41,7 @@ import nestedRouter from './modules/nested'
3941
* all roles can be accessed
4042
*/
4143
export const constantRoutes = [
44+
...enrollmentRoute,
4245
{
4346
path: '/redirect',
4447
component: Layout,
@@ -70,28 +73,6 @@ export const constantRoutes = [
7073
component: () => import('@/views/error-page/401'),
7174
hidden: true
7275
},
73-
{
74-
path: '/userEnrollment',
75-
component: () => import('@/views/login/userEnrollment'),
76-
hidden: true
77-
},
78-
{
79-
path: '/forgotPassword',
80-
component: () => import('@/views/login/forgotPassword'),
81-
hidden: true
82-
},
83-
{
84-
path: '/passwordReset',
85-
name: 'passwordReset',
86-
component: () => import('@/views/login/setPassword'),
87-
hidden: true
88-
},
89-
{
90-
path: '/createPassword',
91-
name: 'createPassword',
92-
component: () => import('@/views/login/setPassword'),
93-
hidden: true
94-
},
9576
{
9677
path: '/',
9778
component: Layout,
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
const enrollmentRoute = [
3+
{
4+
path: '/userEnrollment',
5+
component: () => import('@/views/login/userEnrollment'),
6+
hidden: true
7+
},
8+
{
9+
path: '/forgotPassword',
10+
component: () => import('@/views/login/forgotPassword'),
11+
hidden: true
12+
},
13+
{
14+
path: '/passwordReset',
15+
name: 'passwordReset',
16+
component: () => import('@/views/login/setPassword'),
17+
hidden: true
18+
},
19+
{
20+
path: '/createPassword',
21+
name: 'createPassword',
22+
component: () => import('@/views/login/setPassword'),
23+
hidden: true
24+
}
25+
]
26+
27+
export default enrollmentRoute

src/utils/permission.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@ export default function checkPermission(value) {
1313
const hasPermission = roles.some(role => {
1414
return permissionRoles.includes(role)
1515
})
16-
17-
if (!hasPermission) {
18-
return false
19-
}
20-
return true
16+
return hasPermission
2117
} else {
2218
console.error(`need roles! Like v-permission="['admin','editor']"`)
2319
return false

src/views/components-demo/avatar-upload.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ export default {
5858
border-radius: 50%;
5959
}
6060
</style>
61-

0 commit comments

Comments
 (0)