Skip to content

Commit b94e69b

Browse files
authored
[release] 4.0.0 (PanJiaChen#1291)
* fix[ExternalLink]: fixed bug when url include chinese PanJiaChen#1182 * feature: support Spanish(PanJiaChen#1196) * fix[MockJS]: fix bug with withCredentials after using mockjs (PanJiaChen#1194) * 修复 Mock 导致请求丢失 Cookie 的问题 修复 Mock 导致 Cookie 丢失的问题,只有在 XHR.open() 周期时,自定义的 withCredentials 会被挂载,此时检查是否是未被拦截的 xhr,并挂载自定义的 withCredentials ,无则默认为 false * update readme * perf[tagsView]: refactor the moveToTarget function (PanJiaChen#1195) * fix[tagsView]:fixed visited view move to currentTag * edit the scroll regular friendly * tweak * fix[tagsView]: fixed moveToCurrentTag bug * feature: add pagination component (PanJiaChen#1213) * fix[TagsView]: fixed update tags title demo bug (PanJiaChen#1223) * chore: temporary hack cssnano bug PanJiaChen#1222 * [release] 3.9.2 * chore: restore the hack of cssnano bug cssnano/cssnano#643 * add an example of sort data by table (PanJiaChen#1236) * feature: add drag select component (PanJiaChen#1249) * feat: perfect migrate to @vue/cli-service, upgrade vue babel version (PanJiaChen#1267) * feat: perfect migrate to @vue/cli-service, upgrade vue babel version 1. update to @vue/[email protected], @babel/[email protected] 2. use vue-cli service replace config file in build/ and config/ 3. upgrade vue and babel configuration 4. solve the svg-sprite config problem PanJiaChen#980 refs: PanJiaChen#932 PanJiaChen#1087 PanJiaChen#980 PanJiaChen#1056 * fix: fix breadcrumb dependency * fix: fix index template and static assets load with vue-cli 3 * fix: fix import driver.js in guide page * refactor(mock): mak mock api compatible with both web-view and webpack server 1. 把 Mockjs 功能移到 server 端中间件,同时也兼容前端直接劫持 XHR 2. dev 环境下默认作为 express 中间件通过 webpack server 提供 mock api 3. prod 构建时,默认在前端用 Mockjs 劫持 XHR benefits: - dev 开发调试时能直接看到 XHR 请求,方便调试网络,能和后端对接联调 - 避开在开发时因为 Mockjs 引起的网络 bug - prod 构建时劫持 XHR,保证本项目的 Github Pages preview 能正常显示 (逻辑和 error-log 一样) - 前后台使用的 mock 是同一份代码,不会增加维护负担 ref: [PanJiaChen#562](PanJiaChen#562 (comment)) * update requires the lowest version of node * add favicon * fix(TreeTable): fix `Array.prototype.concat` on custom-tree-table page * update * add test * fix bug * fix[Charts]: fixed charts resize mixins bug PanJiaChen#1285 (PanJiaChen#1290) * perf[Tinymce]: add searchreplace plugin * perf[avatar]:minimize the selected area of avatar on the mobile phone when user clicked avatar (PanJiaChen#1304) * refine css * fix[DragSelect]: fixed querySelectorAll bug * perf[DragSelect]: add $listeners * fix link * fix[Breadcurmb]: fixed pathCompile bug * fix[Breadcurmb]: fixed router-link bug * perf[style]: use webpack alias instead of hard code src path (PanJiaChen#1338) * perf[style]: use webpack alias instead of hard code src path * add sponsors * fix import path bug * update vue-router to fixed url path for non ascii urls PanJiaChen#1362 * fix[Pagination]: apply PageSizes property to el-pagination (PanJiaChen#1355) Apply PageSizes property to el-pagination * update dependence * add tui.editor (PanJiaChen#1374) * tweak * add preview * fix return back bug * update guide page * fix[Tinymce]: fixed fullScreen bug PanJiaChen#1400 * feat[Breadcrumb]: add hide Breadcrumb option PanJiaChen#1442 * perf: use WeChat 7.0 new version icon color * refactor[login]: refactor login page style * perf[ScrollPane]: refine moveToTarget code (PanJiaChen#1460) * feature[PDF]: add PDF demo (PanJiaChen#1469) * perf[v-permission]: refine v-permission demo * perf[Sidebar]: refine sidebar store PanJiaChen#1473 (PanJiaChen#1474) * refine: GetUserInfo error message * fix typo (PanJiaChen#1505) * perf: add sidebar width to variables.scss (PanJiaChen#1494) * tweak * fix[ThemePicker]: fixed bug when oldVal is null (PanJiaChen#1517) * update README.md * fix[Breadcrumb]: fixed eslint error (PanJiaChen#1521) * fix[DndList]: fixed drag bug (PanJiaChen#1527) PanJiaChen#1524 * pref[Hamburger]: refactor Hamburger component (PanJiaChen#1528) * 美化侧栏菜单切换按钮 * tweak * perf[Login Form]: optimize eye icon style (PanJiaChen#1545) * optimiz: eye icon style for login form * change eye-open svg * perf[Sticky]: export reset method (PanJiaChen#1550) * perf[Sticky]: refine width default value * perf[utils]: refine parseTime function (PanJiaChen#1546) * 优化 parseTime 修复传入的时间戳是字符串类型,不能转换时间的问题 例:parseTime("1548221490638") * Update index.js * perf[UploadExcel]: optimized code (PanJiaChen#1552) * perf: adjust the import order to make it more elegant PanJiaChen#1537 * perf[Sidebar]: use sass variables in vue template * perf[Style]: optimize the sidebar style to make it better to set (PanJiaChen#1568) * perf[SizeSelect]: add default size option (PanJiaChen#1566) * fix[SIdebar]: fixed bug in mobile PanJiaChen#1567 (PanJiaChen#1569) * perf: fixed eslint errors * perf[Lang]: make up for miss keywords * perf: optimize some code * perf[Navbar]: refactor navbar style * perf[Login]: refine css * feature[Navbar]: add header-search component(PanJiaChen#1591) * fix[Screenfull]: fix screenfull click bug * perf[Screenfull]: refactor screenfull component * fix[Screenfull]: fix screenfull bug (PanJiaChen#1603) * fix typo * fearure[TagsView]: add affix option (PanJiaChen#1577) * perf[utils]: optimize code * perf[utils]: optimizate variable name * perf[Navbar]: add scroll bar when the subMenu is too long (PanJiaChen#1619) * perf[ThemePicker]: refine updateStyle function (PanJiaChen#554) * theme replacing should cut tons of irrelevant css * perf[ResizeHandler]: optimized the judgment of isMobile (PanJiaChen#1633) perf[ResizeHandler]: optimized the judgment of isMobile * fix[Sidebar]: fixed infinite loop bug(PanJiaChen#1333) * fixed infinite loop Bug when in hasOneShowingChild Edit the onlyOneChild * tweak * fix[Sidebar]: data should return a object * perf[Sidebar]: optimize code logic (PanJiaChen#1349) * fix[TagsView]: fixed refresh affixed-tag bug (PanJiaChen#1653) * perf[utils.js]: refactor byteLength function (PanJiaChen#1650) * perf[TagsView]: refine code * perf[TagsView]: set the scrollPane as a business component (PanJiaChen#1660) * fix[DragTable]: support multiple drag-table (PanJiaChen#1666) * perf[Tree-Table]: refactor tree-table * perf[Tree-Table]: organize the structure and add documentation (PanJiaChen#1673) * fix[Sidebar]: fixed nested router hover bug * update version * set preserveWhitespace * lint code * fix jest test case * update config * bump * remove empty file * docs: add link * fix[Sidebar]: fixed collapse animation problem (PanJiaChen#1690) * fix[Tree-Table]: fixed update item data bug (PanJiaChen#1692) * fix[Waves-Directive]: fixed v-waves does not support update (PanJiaChen#1705) * update husky * rm cli-plugin-eslint * add settings (PanJiaChen#1707) * refine settings * fix[utils]: fixed param2Obj not decoding plus sign (PanJiaChen#1712) * feature[Directive]: add auto-height table directive (PanJiaChen#1702) * fix bug * feature[Permission]: add role permission management page (PanJiaChen#1605) * feature[Excel]: support export merged header export (PanJiaChen#1718) * feature[Excel]: add export merge header excel demo * lint * refine theme color * add role mock * tweak mock * fix[Excel]: fixed export merge-header excel bug * refine code * add ThemePicker to setting * fix[HeaderSearch]: fixed bug in vue2.6+ (PanJiaChen#1733) * fix[Sticky]: fixed bug when set stickyTop * perf[Sticky]: refine demo * refine code * tweak mock * vuex add namespaced * fix[Excel]: fixed export bug (PanJiaChen#1736) * rm * refactor permission * perf[ThemePicker]: add predefine (PanJiaChen#1743) * fix[Utils]: fixed deepClone error msg (PanJiaChen#1748) * feature: add fixedHeader settings * fix style in mobile * fix chore * perf[Eslint]: update eslint rules * feature: add create template (PanJiaChen#1762) * add comment * update vue.config.js * feature: add sidebar logo (PanJiaChen#1767) * rm * perf settings * bump * refine script and css * update * refine settings * refine config * update docs * refine * rm * fix jest * add theme setting * dump vue-cli * perf: remove redundant code * update element-ui * fix sticky demo bug * docs * fixed password input bug * refine login form css * remove tree-table * update version * mock error * refine layout name * refine
1 parent 96d3cfa commit b94e69b

File tree

212 files changed

+3499
-3348
lines changed

Some content is hidden

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

212 files changed

+3499
-3348
lines changed

.babelrc

-17
This file was deleted.

.env.development

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# just a flag
2+
ENV = 'development'
3+
4+
# base api
5+
VUE_APP_BASE_API = '/dev-api'
6+
7+
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
8+
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.
9+
# It only does one thing by converting all import() to require().
10+
# This configuration can significantly increase the speed of hot updates,
11+
# when you have a large number of pages.
12+
# Detail: https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/babel-preset-app/index.js
13+
14+
VUE_CLI_BABEL_TRANSPILE_MODULES = true

.env.production

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# just a flag
2+
ENV = 'production'
3+
4+
# base api
5+
VUE_APP_BASE_API = '/prod-api'
6+

.env.staging

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
NODE_ENV = production
2+
3+
# just a flag
4+
ENV = 'staging'
5+
6+
# base api
7+
VUE_APP_BASE_API = '/stage-api'
8+

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/*.js
2-
config/*.js
32
src/assets
3+
public
4+
dist

.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
"vue/singleline-html-element-content-newline": "off",
2525
"vue/multiline-html-element-content-newline":"off",
2626
"vue/name-property-casing": ["error", "PascalCase"],
27+
"vue/no-v-html": "off",
2728
'accessor-pairs': 2,
2829
'arrow-spacing': [2, {
2930
'before': true,
@@ -46,7 +47,7 @@ module.exports = {
4647
'curly': [2, 'multi-line'],
4748
'dot-location': [2, 'property'],
4849
'eol-last': 2,
49-
'eqeqeq': [2, 'allow-null'],
50+
'eqeqeq': ["error", "always", {"null": "ignore"}],
5051
'generator-star-spacing': [2, {
5152
'before': true,
5253
'after': true

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ yarn-debug.log*
66
yarn-error.log*
77
**/*.log
88

9-
test/unit/coverage
10-
test/e2e/reports
9+
tests/**/coverage/
10+
tests/e2e/reports
1111
selenium-debug.log
1212

1313
# Editor directories and files
@@ -17,5 +17,7 @@ selenium-debug.log
1717
*.ntvs*
1818
*.njsproj
1919
*.sln
20+
*.local
2021

2122
package-lock.json
23+
yarn.lock

.postcssrc.js

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
module.exports = {
44
"plugins": {
5-
"postcss-import": {},
6-
"postcss-url": {},
75
// to edit target browsers: use "browserslist" field in package.json
86
"autoprefixer": {}
97
}

README.md

+22-29
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
<p align="center">
66
<a href="https://github.com/vuejs/vue">
7-
<img src="https://img.shields.io/badge/vue-2.5.17-brightgreen.svg" alt="vue">
7+
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
88
</a>
99
<a href="https://github.com/ElemeFE/element">
10-
<img src="https://img.shields.io/badge/element--ui-2.4.11-brightgreen.svg" alt="element-ui">
10+
<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/PanJiaChen/vue-element-admin" rel="nofollow">
1313
<img src="https://travis-ci.org/PanJiaChen/vue-element-admin.svg?branch=master" alt="Build Status">
@@ -30,48 +30,41 @@ English | [简体中文](./README.zh-CN.md)
3030

3131
## Introduction
3232

33-
[vue-element-admin](http://panjiachen.github.io/vue-element-admin) is a front-end management background integration solution. It based on [vue](https://github.com/vuejs/vue) and use the UI Toolkit [element](https://github.com/ElemeFE/element).
33+
[vue-element-admin](http://panjiachen.github.io/vue-element-admin) is a production-ready front-end solution for admin interfaces. It based on [vue](https://github.com/vuejs/vue) and use the UI Toolkit [element-ui](https://github.com/ElemeFE/element).
3434

3535
It is a magical vue admin based on the newest development stack of vue, built-in i18n solution, typical templates for enterprise applications, lots of awesome features. It helps you build a large complex Single-Page Applications. I believe whatever your needs are, this project will help you.
3636

37-
**[v4.0](https://github.com/PanJiaChen/vue-element-admin/tree/v4.0) has in beta. It built on vue-cli@3, optimized a lot of code and added a lot of new features. Welcome to use and make suggestions.**
38-
3937
- [Preview](http://panjiachen.github.io/vue-element-admin)
4038

4139
- [Documentation](https://panjiachen.github.io/vue-element-admin-site/)
4240

4341
- [Gitter](https://gitter.im/vue-element-admin/discuss)
4442

45-
- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
46-
4743
- [Donate](https://panjiachen.github.io/vue-element-admin-site/donate/)
4844

49-
- [Gitee](https://panjiachen.gitee.io/vue-element-admin/) 国内用户可访问该地址在线预览
45+
- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki)
5046

51-
**This project is positioned as a background integration solution and is not suitable for secondary development as a basic template.**
47+
- [Gitee](https://panjiachen.gitee.io/vue-element-admin/) 国内用户可访问该地址在线预览
5248

5349
- Base template recommends using: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
5450
- Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
5551
- Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
5652

57-
**This project does not support low version browsers (e.g. IE). Please add polyfill yourself if you need them.**
58-
59-
**Note: This project uses [email protected]+ version, so the minimum compatible [email protected]+**
53+
**The current version is `4.0-beta`. If you find a problem, please put [issue](https://github.com/PanJiaChen/vue-element-admin/issues/new). If you want to use the old version - stable version, you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)**
6054

61-
**Start using `webpack4` from `v3.8.0`. If you still want to continue using `webpack3`, please use this branch [webpack3](https://github.com/PanJiaChen/vue-element-admin/tree/webpack3)**
55+
**This project does not support low version browsers (e.g. IE). Please add polyfill by yourself.**
6256

6357
## Preparation
6458

65-
You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](http://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/), [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), all request data is simulated using [Mock.js](https://github.com/nuysoft/Mock).
59+
You need to install [node](http://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](http://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) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), all request data is simulated using [Mock.js](https://github.com/nuysoft/Mock).
6660
Understanding and learning this knowledge in advance will greatly help the use of this project.
6761

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

7466
## Sponsors
67+
7568
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen)
7669

7770
<a href="https://flatlogic.com/admin-dashboards?from=vue-element-admin"><img width="150px" src="https://wpimg.wallstcn.com/9c0b719b-5551-4c1e-b776-63994632d94a.png" /></a><p>Admin Dashboard Templates made with Vue, React and Angular.</p>
@@ -84,6 +77,7 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
8477
- Permission Authentication
8578
- Page permission
8679
- Directive permission
80+
- Permission configuration page
8781
- Two-step login
8882
8983
- Multi-environment build
@@ -107,14 +101,13 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
107101
108102
- Excel
109103
- Export Excel
110-
- Export zip
111104
- Upload Excel
112105
- Visualization Excel
106+
- Export zip
113107
114108
- Table
115109
- Dynamic Table
116110
- Drag And Drop Table
117-
- Tree Table
118111
- Inline Edit Table
119112
120113
- Error Page
@@ -148,20 +141,23 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s
148141
# clone the project
149142
git clone https://github.com/PanJiaChen/vue-element-admin.git
150143

144+
# enter the project directory
145+
cd vue-element-admin
146+
151147
# install dependency
152148
npm install
153149

154150
# develop
155151
npm run dev
156152
```
157153

158-
This will automatically open http://localhost:9527.
154+
This will automatically open http://localhost:9527
159155

160156
## Build
161157

162158
```bash
163159
# build for test environment
164-
npm run build:sit
160+
npm run build:stage
165161

166162
# build for production environment
167163
npm run build:prod
@@ -170,19 +166,16 @@ npm run build:prod
170166
## Advanced
171167

172168
```bash
173-
# --report to build with bundle size analytics
174-
npm run build:prod --report
175-
176-
# --generate a bundle size analytics. default: bundle-report.html
177-
npm run build:prod --generate_report
169+
# preview the release environment effect
170+
npm run preview
178171

179-
# --preview to start a server in local to preview
180-
npm run build:prod --preview
172+
# preview the release environment effect + static resource analysis
173+
npm run preview -- --report
181174

182-
# lint code
175+
# code format check
183176
npm run lint
184177

185-
# auto fix
178+
# code format check and auto fix
186179
npm run lint -- --fix
187180
```
188181

0 commit comments

Comments
 (0)