Skip to content

Commit

Permalink
feat: Update fork repository (#514)
Browse files Browse the repository at this point in the history
* 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: 花裤衩 <panfree23@gmail.com>

* 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: 花裤衩 <panfree23@gmail.com>

* 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 <aisen60@qq.com>
Co-authored-by: 花裤衩 <panfree23@gmail.com>

* 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: 花裤衩 <panfree23@gmail.com>
Co-authored-by: toruksmakto <42709228+toruksmakto@users.noreply.github.com>
Co-authored-by: Yamel Senih <ysenih@erpya.com>
Co-authored-by: Yamel Senih <yamelsenih@gmail.com>
Co-authored-by: liugq <liugq5713@gmail.com>
Co-authored-by: bpzhang <bpzhang@users.noreply.github.com>
Co-authored-by: Serge <gaosj1993@foxmail.com>
Co-authored-by: MaYuanhai <414199639@qq.com>
Co-authored-by: Jessynt <xr5299@gmail.com>
Co-authored-by: 肖敏 <392716797@qq.com>
Co-authored-by: TinaryTree <mbdkhss@gmail.com>
Co-authored-by: itsccn <chen.sun@itsccn.com>
Co-authored-by: why <w.why@163.com>
Co-authored-by: Baskerville* <wszdlm@gmail.com>
Co-authored-by: Francis <31059354+FrancisSano@users.noreply.github.com>
Co-authored-by: monkeycf <41945134+monkeycf@users.noreply.github.com>
Co-authored-by: BradyBromley <51128276+BradyBromley@users.noreply.github.com>
Co-authored-by: Phạm Ngọc Hòa <thaycacac@gmail.com>
Co-authored-by: bbigcd <bbigcd@163.com>
Co-authored-by: xuanzai <43233731+MikuBlog@users.noreply.github.com>
Co-authored-by: flitrue <812863096@qq.com>
Co-authored-by: 韬 <605682551@qq.com>
Co-authored-by: 任羽飞 <ren12345@126.com>
Co-authored-by: Kaitian Xie <xkaitian@gmail.com>
Co-authored-by: AndyLZC/AndyLZC.github.io <34624589+AndyLZC@users.noreply.github.com>
Co-authored-by: RussXD <shangtouWeb@foxmail.com>
Co-authored-by: 李小斐 <623536309@qq.com>
Co-authored-by: RoBlues <robluesmail@gmail.com>
Co-authored-by: Shota Aratono <195194+artn@users.noreply.github.com>
Co-authored-by: echofly <36875450+echofly@users.noreply.github.com>
Co-authored-by: Aisen60 <1147319086@qq.com>
Co-authored-by: aisen60 <aisen60@qq.com>
Co-authored-by: Alex S <50220345+sabatale@users.noreply.github.com>
Co-authored-by: Aisen <caixusheng60@gmail.com>
Co-authored-by: ntnyq <ntnyq13@gmail.com>
Co-authored-by: garethx <gareth.wilson@gmail.com>
Co-authored-by: AiMe1991 <sxd.08@163.com>
Co-authored-by: cooper <1322849632@qq.com>
Co-authored-by: Nickbing Lao <giscafer@outlook.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 85 changed files with 2,031 additions and 1,343 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

patreon: panjiachen
custom: https://panjiachen.github.io/vue-element-admin-site/donate
8 changes: 0 additions & 8 deletions .postcssrc.js

This file was deleted.

45 changes: 24 additions & 21 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,52 @@
<img src="https://img.shields.io/badge/element--ui-2.7.0-brightgreen.svg" alt="element-ui">
</a>
<a href="https://travis-ci.org/adempiere/adempiere-vue" rel="nofollow">
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Build Status">
<img src="https://travis-ci.org/adempiere/adempiere=vue.svg?branch=develop" alt="Estado de Construcción">
</a>
<a href="https://github.com/adempiere/adempiere-vue/blob/master/LICENSE">
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="license">
<img src="https://img.shields.io/badge/license-GNU/GPL%20(v3)-blue" alt="Licencia">
</a>
<a href="https://github.com/adempiere/adempiere-vue/releases">
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="GitHub release">
<img src="https://img.shields.io/github/release/adempiere/adempiere-vue.svg" alt="Liberación Github">
</a>
<a href="https://gitter.im/adempiere/adempiere-vue">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="gitter">
<img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter">
</a>
</p>

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

## Introducción

[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).
[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.

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).

[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).

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

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

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

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

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

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

**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).**
**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).**

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

## Preparación

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).
Entendiendo y aprendiendo acerca de lo anterior le ayudará a conocer el proyecto.

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)

<p align="center">
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
</p>
Expand All @@ -65,7 +67,7 @@ Entendiendo y aprendiendo acerca de lo anterior le ayudará a conocer el proyect
<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>
<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>

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/?)
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/?)

## Características

Expand Down Expand Up @@ -125,10 +127,11 @@ Sea un patrocinante y coloque su logo en nuestro LEEME en GitHub con un link a s
- Adhesión de objetos
- Contador hasta
- Soporte a ADempiere
- Ventan
- Proceso
- Reporte
- Visor Inteligente
- Ventana
- Proceso
- Reporte
- Consulta Inteligente
- Formulario
- Ejemplo Avanzado
- Registro de Errores
Expand All @@ -145,7 +148,7 @@ Use [gRPC ADempiere Server](https://github.com/erpcya/adempiere-gRPC-Server) com

```bash
# clone el proyecto
git clone -b develop git@github.com:adempiere/vue-element-admin.git
git clone -b develop git@github.com:adempiere/adempiere-vue.git

# vaya al directorio clonado
cd adempiere-vue
Expand Down Expand Up @@ -185,29 +188,29 @@ npm run lint
npm run lint -- --fix
```

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

## Registro de Cambios

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

## Demostración en línea

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

## Donación

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

[Dona por Paypal](https://www.paypal.me/?)
[dona por Paypal](https://www.paypal.me/?)

## Navegadores Soportados

Navegadores modernos e Internet Explorer 10+.

| [<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 |
| --------- | --------- | --------- | --------- |
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
| IE10, IE11, Edge| últimas 2 versiones| últimas 2 versiones| últimas 2 versiones

## Licencia

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ It is a great UI for [ADempiere ERP, CRM & SCM](https://github.com/adempiere/ade
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).
Understanding and learning this knowledge in advance will greatly help the use of this project.

<p align="center">
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/PanJiaChen/vue-element-admin/tree/CodeSandbox)

<p align="center">
<img width="900" src="https://wpimg.wallstcn.com/a5894c1b-f6af-456e-82df-1151da0839bf.png">
</p>

Expand Down
9 changes: 9 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
12 changes: 6 additions & 6 deletions mock/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for (let i = 0; i < count; i++) {
forecast: '@float(0, 100, 2, 2)',
importance: '@integer(1, 3)',
'type|1': ['CN', 'US', 'JP', 'EU'],
'status|1': ['published', 'draft', 'deleted'],
'status|1': ['published', 'draft'],
display_time: '@datetime',
comment_disabled: true,
pageviews: '@integer(300, 5000)',
Expand All @@ -29,7 +29,7 @@ for (let i = 0; i < count; i++) {

export default [
{
url: '/article/list',
url: '/vue-element-admin/article/list',
type: 'get',
response: config => {
const { importance, type, title, page = 1, limit = 20, sort } = config.query
Expand Down Expand Up @@ -58,7 +58,7 @@ export default [
},

{
url: '/article/detail',
url: '/vue-element-admin/article/detail',
type: 'get',
response: config => {
const { id } = config.query
Expand All @@ -74,7 +74,7 @@ export default [
},

{
url: '/article/pv',
url: '/vue-element-admin/article/pv',
type: 'get',
response: _ => {
return {
Expand All @@ -92,7 +92,7 @@ export default [
},

{
url: '/article/create',
url: '/vue-element-admin/article/create',
type: 'post',
response: _ => {
return {
Expand All @@ -103,7 +103,7 @@ export default [
},

{
url: '/article/update',
url: '/vue-element-admin/article/update',
type: 'post',
response: _ => {
return {
Expand Down
15 changes: 1 addition & 14 deletions mock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,4 @@ export function mockXHR() {
}
}

// for mock server
const responseFake = (url, type, respond) => {
return {
url: new RegExp(`/mock${url}`),
type: type || 'get',
response(req, res) {
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
}
}
}

export default mocks.map(route => {
return responseFake(route.url, route.type, route.response)
})
export default mocks
20 changes: 18 additions & 2 deletions mock/mock-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ const chokidar = require('chokidar')
const bodyParser = require('body-parser')
const chalk = require('chalk')
const path = require('path')
const Mock = require('mockjs')

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

function registerRoutes(app) {
let mockLastIndex
const { default: mocks } = require('./index.js')
for (const mock of mocks) {
const mocksForServer = mocks.map(route => {
return responseFake(route.url, route.type, route.response)
})
for (const mock of mocksForServer) {
app[mock.type](mock.url, mock.response)
mockLastIndex = app._router.stack.length
}
const mockRoutesLength = Object.keys(mocks).length
const mockRoutesLength = Object.keys(mocksForServer).length
return {
mockRoutesLength: mockRoutesLength,
mockStartIndex: mockLastIndex - mockRoutesLength
Expand All @@ -27,6 +31,18 @@ function unregisterRoutes() {
})
}

// for mock server
const responseFake = (url, type, respond) => {
return {
url: new RegExp(`${process.env.VUE_APP_BASE_API}${url}`),
type: type || 'get',
response(req, res) {
console.log('request invoke:' + req.path)
res.json(Mock.mock(respond instanceof Function ? respond(req, res) : respond))
}
}
}

module.exports = app => {
// es6 polyfill
require('@babel/register')
Expand Down
4 changes: 2 additions & 2 deletions mock/remote-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NameList.push({ name: 'mock-Pan' })
export default [
// username search
{
url: '/search/user',
url: '/vue-element-admin/search/user',
type: 'get',
response: config => {
const { name } = config.query
Expand All @@ -30,7 +30,7 @@ export default [

// transaction list
{
url: '/transaction/list',
url: '/vue-element-admin/transaction/list',
type: 'get',
response: _ => {
return {
Expand Down
10 changes: 5 additions & 5 deletions mock/role/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const roles = [
export default [
// mock get all routes form server
{
url: '/routes',
url: '/vue-element-admin/routes',
type: 'get',
response: _ => {
return {
Expand All @@ -50,7 +50,7 @@ export default [

// mock get all roles form server
{
url: '/roles',
url: '/vue-element-admin/roles',
type: 'get',
response: _ => {
return {
Expand All @@ -62,7 +62,7 @@ export default [

// add role
{
url: '/role',
url: '/vue-element-admin/role',
type: 'post',
response: {
code: 20000,
Expand All @@ -74,7 +74,7 @@ export default [

// update role
{
url: '/role/[A-Za-z0-9]',
url: '/vue-element-admin/role/[A-Za-z0-9]',
type: 'put',
response: {
code: 20000,
Expand All @@ -86,7 +86,7 @@ export default [

// delete role
{
url: '/role/[A-Za-z0-9]',
url: '/vue-element-admin/role/[A-Za-z0-9]',
type: 'delete',
response: {
code: 20000,
Expand Down
6 changes: 3 additions & 3 deletions mock/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const users = {
export default [
// user login
{
url: '/user/login',
url: '/vue-element-admin/user/login',
type: 'post',
response: config => {
const { username } = config.body
Expand All @@ -49,7 +49,7 @@ export default [

// get user info
{
url: '/user/info\.*',
url: '/vue-element-admin/user/info\.*',
type: 'get',
response: config => {
const { token } = config.query
Expand All @@ -72,7 +72,7 @@ export default [

// user logout
{
url: '/user/logout',
url: '/vue-element-admin/user/logout',
type: 'post',
response: _ => {
return {
Expand Down
Loading

0 comments on commit cc35fd7

Please sign in to comment.