Skip to content

Commit cc35fd7

Browse files
Edwin BetancourtPanJiaChenmarxangelsYamel Senihyamelsenih
authored
feat: Update fork repository (#514)
* 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 * 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) * 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 * Create FUNDING.yml * chore: set localhost => 127.0.0.1 (PanJiaChen#2142) * update github ISSUE_TEMPLATE * chore: add autoprefixer to devDependencies * 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: 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 * 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 * feat: add job * 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) * 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) * 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) * 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 * feat[Search]: route search supports pinyin (PanJiaChen#2643) * 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) * 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) * Add contributor into package.json file. * fixed before merge. 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]>
1 parent 6dd649e commit cc35fd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2031
-1343
lines changed

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
patreon: panjiachen
4+
custom: https://panjiachen.github.io/vue-element-admin-site/donate

.postcssrc.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.es.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,52 @@
1010
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
1111
</a>
1212
<a href="https://travis-ci.org/adempiere/adempiere-vue" rel="nofollow">
13-
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Build Status">
13+
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Estado de Construcción">
1414
</a>
1515
<a href="https://github.com/adempiere/adempiere-vue/blob/master/LICENSE">
16-
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="license">
16+
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="Licencia">
1717
</a>
1818
<a href="https://github.com/adempiere/adempiere-vue/releases">
19-
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="GitHub release">
19+
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="Liberación Github">
2020
</a>
2121
<a href="https://gitter.im/adempiere/adempiere-vue">
22-
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter">
22+
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter">
2323
</a>
2424
</p>
2525

2626
Español | [Inglés](./README.md)
2727

2828
## Introducción
2929

30-
[adempiere-vue](https://github.com/adempiere/adempiere-vue) es una nueva UI para [ADempiere ERP, CRM & SCM](https://github.com/adempiere/adempiere)]. Se basa en [vue](https://github.com/vuejs/vue) y usa el conjunto de herraminentas de UI [element-ui](https://github.com/ElemeFE/element).
30+
[adempiere-vue](https://github.com/adempiere/adempiere-vue) es una nueva UI para [ADempiere ERP, CRM & SCM](https://github.com/adempiere/adempiere)]. Está basada en [vue](https://github.com/vuejs/vue) y usa [element-ui](https://github.com/ElemeFE/element) como conjunto de herramientas de interfáz de usuario.
3131

3232
Este es una gran UI para [ADempiere ERP, CRM & SCM](https://github.com/adempiere/adempiere)] basada en lo último desarrollado por vue, construido con i18n para manejo multi-idioma, plantillas para aplicaciones de negocio y muchas características asombrosas. Este proyecto es derivado de [Vue-Element-Admin](https://github.com/PanJiaChen/vue-element-admin) originalmente escrito por [PanJiaChen / 花裤衩](https://github.com/PanJiaChen) sobre [licencia MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) y cambiado a [licencia GNU/GPL v3](https://github.com/adempiere/adempiere-vue/blob/master/LICENSE) por [Yamel Senih](https://github.com/yamelsenih) después de derivar el proyecto y con permisos del autor original [PanJiaChen / 花裤衩](https://github.com/PanJiaChen) en el reporte ["Extend as GNU/Gpl v3 License #1434"](https://github.com/PanJiaChen/vue-element-admin/issues/1434).
3333

3434
[adempiere-vue](https://github.com/adempiere/adempiere-vue) usa como RPC (Llamado a Procedimientos Remostos)[gRPC](https://grpc.io/) como [server](https://github.com/erpcya/adempiere-gRPC-Server).
3535

36-
- [Vista Prévia](http://adempiere-ui.erpya.com:9526/)
36+
- [Vista Prévia de la Aplicación](http://adempiere-ui.erpya.com:9526/)
3737

3838
- [Documentación](https://panjiachen.github.io/vue-element-admin-site/)
3939

40-
- [Gitter](https://gitter.im/adempiere/adempiere-vue)
40+
- [Canal de Gitter](https://gitter.im/adempiere/adempiere-vue)
4141

42-
- [Donar](https://www.paypal.me/?)
42+
- [Para Donaciones](https://www.paypal.me/?)
4343

44-
- [Wikipedia](http://wiki.adempiere.net/ADempiere_ERP)
44+
- [Enlace de Wiki](http://wiki.adempiere.net/ADempiere_ERP)
4545

4646
- [Derivado De](https://github.com/PanJiaChen/vue-element-admin)
4747

48-
**La versión actual `v1.0+` está construida en `vue-cli`. Si encuentra algún problema, por favor escriba un [reporte de error](https://github.com/adempiere/adempiere-vue/issues/new).**
48+
**La versión actual `v1.0+` está construida con `vue-cli`. Si encuentra algún problema, por favor escriba un [reporte de error](https://github.com/adempiere/adempiere-vue/issues/new).**
4949

50-
**Este proyecto no soporta versiones bajas de los navegadores (e.g. IE).**
50+
**Este proyecto no está soportado para versiones muy viejas de navegadores (e.g. IE).**
5151

5252
## Preparación
5353

5454
Necesita instalar [node](https://nodejs.org/) y [git](https://git-scm.com/) localmente. El proyecto está basado en [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [gRPC](https://grpc.io/) y [element-ui](https://github.com/ElemeFE/element).
5555
Entendiendo y aprendiendo acerca de lo anterior le ayudará a conocer el proyecto.
5656

57+
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)
58+
5759
<p align="center">
5860
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
5961
</p>
@@ -65,7 +67,7 @@ Entendiendo y aprendiendo acerca de lo anterior le ayudará a conocer el proyect
6567
<a href="http://westfalia-it.com/"><img width="150px" src="https://i1.wp.com/spin-suite.com/westfalia/wp-content/uploads/sites/30/2017/12/logo_copy.jpg?fit=265%2C357" /></a>
6668
<a href="http://erpya.com/"><img width="250px" src="https://i0.wp.com/spin-suite.com/openupsolutions/wp-content/uploads/sites/32/2017/05/Openup-Solutions-Logo-2017-80x200px.png" /></a>
6769

68-
Sea un patrocinante y coloque su logo en nuestro LEEME en GitHub con un link a su sitio web. [Sea un Patrocinante](https://www.paypal.me/?)
70+
Sea un patrocinante y coloque su logo en nuestro LEEME en GitHub con un enlace directo a su sitio web. [Sea un Patrocinante](https://www.paypal.me/?)
6971

7072
## Características
7173

@@ -125,10 +127,11 @@ Sea un patrocinante y coloque su logo en nuestro LEEME en GitHub con un link a s
125127
- Adhesión de objetos
126128
- Contador hasta
127129
- Soporte a ADempiere
128-
- Ventan
129-
- Proceso
130-
- Reporte
131-
- Visor Inteligente
130+
- Ventana
131+
- Proceso
132+
- Reporte
133+
- Consulta Inteligente
134+
- Formulario
132135
133136
- Ejemplo Avanzado
134137
- Registro de Errores
@@ -145,7 +148,7 @@ Use [gRPC ADempiere Server](https://github.com/erpcya/adempiere-gRPC-Server) com
145148

146149
```bash
147150
# clone el proyecto
148-
git clone -b develop [email protected]:adempiere/vue-element-admin.git
151+
git clone -b develop [email protected]:adempiere/adempiere-vue.git
149152

150153
# vaya al directorio clonado
151154
cd adempiere-vue
@@ -185,29 +188,29 @@ npm run lint
185188
npm run lint -- --fix
186189
```
187190

188-
Vaya a [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) para mayor información.
191+
Vaya a [Documentación](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) para mayor información.
189192

190193
## Registro de Cambios
191194

192195
Los cambios detallados por cada liberación se encuentran en [notas de liberación](https://github.com/adempiere/adempiere-vue/releases).
193196

194197
## Demostración en línea
195198

196-
[Preview](http://adempiere-ui.erpya.com:9526/)
199+
[Vista Prévia de la Aplicación](http://adempiere-ui.erpya.com:9526/)
197200

198201
## Donación
199202

200203
Si este proyecto es de mucha ayuda para ti, puedes ayudar a hacer una mejor UI
201204

202-
[Dona por Paypal](https://www.paypal.me/?)
205+
[dona por Paypal](https://www.paypal.me/?)
203206

204207
## Navegadores Soportados
205208

206209
Navegadores modernos e Internet Explorer 10+.
207210

208211
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](https://godban.github.io/browsers-support-badges/)</br>Safari |
209212
| --------- | --------- | --------- | --------- |
210-
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
213+
| IE10, IE11, Edge| últimas 2 versiones| últimas 2 versiones| últimas 2 versiones
211214

212215
## Licencia
213216

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ It is a great UI for [ADempiere ERP, CRM & SCM](https://github.com/adempiere/ade
5454
You need to install [node](https://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [gRPC](https://grpc.io/) and [element-ui](https://github.com/ElemeFE/element).
5555
Understanding and learning this knowledge in advance will greatly help the use of this project.
5656

57-
<p align="center">
57+
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)
58+
59+
<p align="center">
5860
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
5961
</p>
6062

jsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "./",
4+
"paths": {
5+
"@/*": ["src/*"]
6+
}
7+
},
8+
"exclude": ["node_modules", "dist"]
9+
}

mock/article.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for (let i = 0; i < count; i++) {
1818
forecast: '@float(0, 100, 2, 2)',
1919
importance: '@integer(1, 3)',
2020
'type|1': ['CN', 'US', 'JP', 'EU'],
21-
'status|1': ['published', 'draft', 'deleted'],
21+
'status|1': ['published', 'draft'],
2222
display_time: '@datetime',
2323
comment_disabled: true,
2424
pageviews: '@integer(300, 5000)',
@@ -29,7 +29,7 @@ for (let i = 0; i < count; i++) {
2929

3030
export default [
3131
{
32-
url: '/article/list',
32+
url: '/vue-element-admin/article/list',
3333
type: 'get',
3434
response: config => {
3535
const { importance, type, title, page = 1, limit = 20, sort } = config.query
@@ -58,7 +58,7 @@ export default [
5858
},
5959

6060
{
61-
url: '/article/detail',
61+
url: '/vue-element-admin/article/detail',
6262
type: 'get',
6363
response: config => {
6464
const { id } = config.query
@@ -74,7 +74,7 @@ export default [
7474
},
7575

7676
{
77-
url: '/article/pv',
77+
url: '/vue-element-admin/article/pv',
7878
type: 'get',
7979
response: _ => {
8080
return {
@@ -92,7 +92,7 @@ export default [
9292
},
9393

9494
{
95-
url: '/article/create',
95+
url: '/vue-element-admin/article/create',
9696
type: 'post',
9797
response: _ => {
9898
return {
@@ -103,7 +103,7 @@ export default [
103103
},
104104

105105
{
106-
url: '/article/update',
106+
url: '/vue-element-admin/article/update',
107107
type: 'post',
108108
response: _ => {
109109
return {

mock/index.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,4 @@ export function mockXHR() {
5454
}
5555
}
5656

57-
// for mock server
58-
const responseFake = (url, type, respond) => {
59-
return {
60-
url: new RegExp(`/mock${url}`),
61-
type: type || 'get',
62-
response(req, res) {
63-
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
64-
}
65-
}
66-
}
67-
68-
export default mocks.map(route => {
69-
return responseFake(route.url, route.type, route.response)
70-
})
57+
export default mocks

mock/mock-server.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@ const chokidar = require('chokidar')
22
const bodyParser = require('body-parser')
33
const chalk = require('chalk')
44
const path = require('path')
5+
const Mock = require('mockjs')
56

67
const mockDir = path.join(process.cwd(), 'mock')
78

89
function registerRoutes(app) {
910
let mockLastIndex
1011
const { default: mocks } = require('./index.js')
11-
for (const mock of mocks) {
12+
const mocksForServer = mocks.map(route => {
13+
return responseFake(route.url, route.type, route.response)
14+
})
15+
for (const mock of mocksForServer) {
1216
app[mock.type](mock.url, mock.response)
1317
mockLastIndex = app._router.stack.length
1418
}
15-
const mockRoutesLength = Object.keys(mocks).length
19+
const mockRoutesLength = Object.keys(mocksForServer).length
1620
return {
1721
mockRoutesLength: mockRoutesLength,
1822
mockStartIndex: mockLastIndex - mockRoutesLength
@@ -27,6 +31,18 @@ function unregisterRoutes() {
2731
})
2832
}
2933

34+
// for mock server
35+
const responseFake = (url, type, respond) => {
36+
return {
37+
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
38+
type: type || 'get',
39+
response(req, res) {
40+
console.log('request invoke:' + req.path)
41+
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
42+
}
43+
}
44+
}
45+
3046
module.exports = app => {
3147
// es6 polyfill
3248
require('@babel/register')

mock/remote-search.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ NameList.push({ name: 'mock-Pan' })
1313
export default [
1414
// username search
1515
{
16-
url: '/search/user',
16+
url: '/vue-element-admin/search/user',
1717
type: 'get',
1818
response: config => {
1919
const { name } = config.query
@@ -30,7 +30,7 @@ export default [
3030

3131
// transaction list
3232
{
33-
url: '/transaction/list',
33+
url: '/vue-element-admin/transaction/list',
3434
type: 'get',
3535
response: _ => {
3636
return {

mock/role/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const roles = [
3838
export default [
3939
// mock get all routes form server
4040
{
41-
url: '/routes',
41+
url: '/vue-element-admin/routes',
4242
type: 'get',
4343
response: _ => {
4444
return {
@@ -50,7 +50,7 @@ export default [
5050

5151
// mock get all roles form server
5252
{
53-
url: '/roles',
53+
url: '/vue-element-admin/roles',
5454
type: 'get',
5555
response: _ => {
5656
return {
@@ -62,7 +62,7 @@ export default [
6262

6363
// add role
6464
{
65-
url: '/role',
65+
url: '/vue-element-admin/role',
6666
type: 'post',
6767
response: {
6868
code: 20000,
@@ -74,7 +74,7 @@ export default [
7474

7575
// update role
7676
{
77-
url: '/role/[A-Za-z0-9]',
77+
url: '/vue-element-admin/role/[A-Za-z0-9]',
7878
type: 'put',
7979
response: {
8080
code: 20000,
@@ -86,7 +86,7 @@ export default [
8686

8787
// delete role
8888
{
89-
url: '/role/[A-Za-z0-9]',
89+
url: '/vue-element-admin/role/[A-Za-z0-9]',
9090
type: 'delete',
9191
response: {
9292
code: 20000,

mock/user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const users = {
2626
export default [
2727
// user login
2828
{
29-
url: '/user/login',
29+
url: '/vue-element-admin/user/login',
3030
type: 'post',
3131
response: config => {
3232
const { username } = config.body
@@ -49,7 +49,7 @@ export default [
4949

5050
// get user info
5151
{
52-
url: '/user/info\.*',
52+
url: '/vue-element-admin/user/info\.*',
5353
type: 'get',
5454
response: config => {
5555
const { token } = config.query
@@ -72,7 +72,7 @@ export default [
7272

7373
// user logout
7474
{
75-
url: '/user/logout',
75+
url: '/vue-element-admin/user/logout',
7676
type: 'post',
7777
response: _ => {
7878
return {

0 commit comments

Comments
 (0)