Skip to content

Commit ee47029

Browse files
committed
Merge branch 'master' into refactor/filename
2 parents bd05ec6 + d0651ad commit ee47029

File tree

16 files changed

+258
-164
lines changed

16 files changed

+258
-164
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# http://editorconfig.org
1+
# https://editorconfig.org
22
root = true
33

44
[*]

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ English | [简体中文](./README.zh-CN.md)
3030

3131
## Introduction
3232

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).
33+
[vue-element-admin](https://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-
- [Preview](http://panjiachen.github.io/vue-element-admin)
37+
- [Preview](https://panjiachen.github.io/vue-element-admin)
3838

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

@@ -50,13 +50,13 @@ It is a magical vue admin based on the newest development stack of vue, built-in
5050
- Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
5151
- Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour))
5252

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)**
53+
**The current version is `v4.0+` build on `vue-cli`. 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 , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0), it does not rely on `vue-cli'**
5454

5555
**This project does not support low version browsers (e.g. IE). Please add polyfill by yourself.**
5656

5757
## Preparation
5858

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).
59+
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) , [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).
6060
Understanding and learning this knowledge in advance will greatly help the use of this project.
6161

6262
<p align="center">
@@ -187,7 +187,7 @@ Detailed changes for each release are documented in the [release notes](https://
187187

188188
## Online Demo
189189

190-
[Preview](http://panjiachen.github.io/vue-element-admin)
190+
[Preview](https://panjiachen.github.io/vue-element-admin)
191191

192192
## Donate
193193

@@ -203,7 +203,7 @@ If you find this project useful, you can buy author a glass of juice :tropical_d
203203

204204
Modern browsers and Internet Explorer 10+.
205205

206-
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://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" />](http://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" />](http://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" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
206+
| [<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 |
207207
| --------- | --------- | --------- | --------- |
208208
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
209209

README.zh-CN.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030

3131
## 简介
3232

33-
[vue-element-admin](http://panjiachen.github.io/vue-element-admin) 是一个后台前端解决方案,它基于 [vue](https://github.com/vuejs/vue)[element-ui](https://github.com/ElemeFE/element)实现。它使用了最新的前端技术栈,内置了 i18n 国际化解决方案,动态路由,权限验证,提炼了典型的业务模型,提供了丰富的功能组件,它可以帮助你快速搭建企业级中后台产品原型。相信不管你的需求是什么,本项目都能帮助到你。
33+
[vue-element-admin](https://panjiachen.github.io/vue-element-admin) 是一个后台前端解决方案,它基于 [vue](https://github.com/vuejs/vue)[element-ui](https://github.com/ElemeFE/element)实现。它使用了最新的前端技术栈,内置了 i18n 国际化解决方案,动态路由,权限验证,提炼了典型的业务模型,提供了丰富的功能组件,它可以帮助你快速搭建企业级中后台产品原型。相信不管你的需求是什么,本项目都能帮助到你。
3434

35-
- [在线预览](http://panjiachen.github.io/vue-element-admin)
35+
- [在线预览](https://panjiachen.github.io/vue-element-admin)
3636

3737
- [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/)
3838

@@ -50,7 +50,7 @@
5050
- 桌面端: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin)
5151
- Typescript 版: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour))
5252

53-
**目前版本为 `4.0-beta`,若发现问题,欢迎提[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)。若你想使用旧版本-稳定版,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)**
53+
**目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若发现问题,欢迎提[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)。若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0),它不依赖 `vue-cli`**
5454

5555
**该项目不支持低版本浏览器(如 ie),有需求请自行添加 polyfill [详情](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)**
5656

@@ -204,7 +204,7 @@ Detailed changes for each release are documented in the [release notes](https://
204204

205205
## Online Demo
206206

207-
[在线 Demo](http://panjiachen.github.io/vue-element-admin)
207+
[在线 Demo](https://panjiachen.github.io/vue-element-admin)
208208

209209
## Donate
210210

@@ -221,7 +221,7 @@ Detailed changes for each release are documented in the [release notes](https://
221221

222222
Modern browsers and Internet Explorer 10+.
223223

224-
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://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" />](http://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" />](http://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" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
224+
| [<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 |
225225
| --------- | --------- | --------- | --------- |
226226
| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions
227227

mock/mock-server.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ const bodyParser = require('body-parser')
33
const chalk = require('chalk')
44

55
function registerRoutes(app) {
6-
let mockStartIndex
6+
let mockLastIndex
77
const { default: mocks } = require('./index.js')
88
for (const mock of mocks) {
99
app[mock.type](mock.url, mock.response)
10-
mockStartIndex = app._router.stack.length
10+
mockLastIndex = app._router.stack.length
1111
}
1212
const mockRoutesLength = Object.keys(mocks).length
1313
return {
1414
mockRoutesLength: mockRoutesLength,
15-
mockStartIndex: mockStartIndex - mockRoutesLength
15+
mockStartIndex: mockLastIndex - mockRoutesLength
1616
}
1717
}
1818

@@ -29,7 +29,7 @@ module.exports = app => {
2929
require('@babel/register')
3030

3131
// parse app.body
32-
// http://expressjs.com/en/4x/api.html#req.body
32+
// https://expressjs.com/en/4x/api.html#req.body
3333
app.use(bodyParser.json())
3434
app.use(bodyParser.urlencoded({
3535
extended: true

src/components/Charts/Keyboard.vue

Lines changed: 87 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -53,103 +53,102 @@ export default {
5353
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5)
5454
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3)
5555
}
56-
this.chart.setOption(
57-
{
58-
backgroundColor: '#08263a',
59-
grid: {
60-
left: '5%',
61-
right: '5%'
56+
this.chart.setOption({
57+
backgroundColor: '#08263a',
58+
grid: {
59+
left: '5%',
60+
right: '5%'
61+
},
62+
xAxis: [{
63+
show: false,
64+
data: xAxisData
65+
}, {
66+
show: false,
67+
data: xAxisData
68+
}],
69+
visualMap: {
70+
show: false,
71+
min: 0,
72+
max: 50,
73+
dimension: 0,
74+
inRange: {
75+
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
76+
}
77+
},
78+
yAxis: {
79+
axisLine: {
80+
show: false
6281
},
63-
xAxis: [{
64-
show: false,
65-
data: xAxisData
66-
}, {
67-
show: false,
68-
data: xAxisData
69-
}],
70-
visualMap: {
71-
show: false,
72-
min: 0,
73-
max: 50,
74-
dimension: 0,
75-
inRange: {
76-
color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
82+
axisLabel: {
83+
textStyle: {
84+
color: '#4a657a'
7785
}
7886
},
79-
yAxis: {
80-
axisLine: {
81-
show: false
82-
},
83-
axisLabel: {
84-
textStyle: {
85-
color: '#4a657a'
86-
}
87-
},
88-
splitLine: {
89-
show: true,
90-
lineStyle: {
91-
color: '#08263f'
92-
}
93-
},
94-
axisTick: {
95-
show: false
87+
splitLine: {
88+
show: true,
89+
lineStyle: {
90+
color: '#08263f'
9691
}
9792
},
98-
series: [{
99-
name: 'back',
100-
type: 'bar',
101-
data: data2,
102-
z: 1,
103-
itemStyle: {
104-
normal: {
105-
opacity: 0.4,
106-
barBorderRadius: 5,
107-
shadowBlur: 3,
108-
shadowColor: '#111'
109-
}
110-
}
111-
}, {
112-
name: 'Simulate Shadow',
113-
type: 'line',
114-
data,
115-
z: 2,
116-
showSymbol: false,
117-
animationDelay: 0,
118-
animationEasing: 'linear',
119-
animationDuration: 1200,
120-
lineStyle: {
121-
normal: {
122-
color: 'transparent'
123-
}
124-
},
125-
areaStyle: {
126-
normal: {
127-
color: '#08263a',
128-
shadowBlur: 50,
129-
shadowColor: '#000'
130-
}
93+
axisTick: {
94+
show: false
95+
}
96+
},
97+
series: [{
98+
name: 'back',
99+
type: 'bar',
100+
data: data2,
101+
z: 1,
102+
itemStyle: {
103+
normal: {
104+
opacity: 0.4,
105+
barBorderRadius: 5,
106+
shadowBlur: 3,
107+
shadowColor: '#111'
131108
}
132-
}, {
133-
name: 'front',
134-
type: 'bar',
135-
data,
136-
xAxisIndex: 1,
137-
z: 3,
138-
itemStyle: {
139-
normal: {
140-
barBorderRadius: 5
141-
}
109+
}
110+
}, {
111+
name: 'Simulate Shadow',
112+
type: 'line',
113+
data,
114+
z: 2,
115+
showSymbol: false,
116+
animationDelay: 0,
117+
animationEasing: 'linear',
118+
animationDuration: 1200,
119+
lineStyle: {
120+
normal: {
121+
color: 'transparent'
142122
}
143-
}],
144-
animationEasing: 'elasticOut',
145-
animationEasingUpdate: 'elasticOut',
146-
animationDelay(idx) {
147-
return idx * 20
148123
},
149-
animationDelayUpdate(idx) {
150-
return idx * 20
124+
areaStyle: {
125+
normal: {
126+
color: '#08263a',
127+
shadowBlur: 50,
128+
shadowColor: '#000'
129+
}
130+
}
131+
}, {
132+
name: 'front',
133+
type: 'bar',
134+
data,
135+
xAxisIndex: 1,
136+
z: 3,
137+
itemStyle: {
138+
normal: {
139+
barBorderRadius: 5
140+
}
151141
}
152-
})
142+
}],
143+
animationEasing: 'elasticOut',
144+
animationEasingUpdate: 'elasticOut',
145+
animationDelay(idx) {
146+
return idx * 20
147+
},
148+
animationDelayUpdate(idx) {
149+
return idx * 20
150+
}
151+
})
153152
}
154153
}
155154
}

src/components/DragSelect/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ export default {
4949
</script>
5050

5151
<style scoped>
52-
.drag-select >>> .sortable-ghost{
52+
.drag-select >>> .sortable-ghost {
5353
opacity: .8;
5454
color: #fff!important;
5555
background: #42b983!important;
5656
}
5757
58-
.drag-select >>> .el-tag{
58+
.drag-select >>> .el-tag {
5959
cursor: pointer;
6060
}
6161
</style>

src/filters/index.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
// set function parseTime,formatTime to filter
22
export { parseTime, formatTime } from '@/utils'
33

4+
/**
5+
* Show plural label if time is plural number
6+
* @param {number} time
7+
* @param {string} label
8+
* @return {string}
9+
*/
410
function pluralize(time, label) {
511
if (time === 1) {
612
return time + label
713
}
814
return time + label + 's'
915
}
1016

17+
/**
18+
* @param {number} time
19+
*/
1120
export function timeAgo(time) {
1221
const between = Date.now() / 1000 - Number(time)
1322
if (between < 3600) {
@@ -19,7 +28,12 @@ export function timeAgo(time) {
1928
}
2029
}
2130

22-
/* 数字 格式化*/
31+
/**
32+
* Number formatting
33+
* like 10000 => 10k
34+
* @param {number} num
35+
* @param {number} digits
36+
*/
2337
export function numberFormatter(num, digits) {
2438
const si = [
2539
{ value: 1E18, symbol: 'E' },
@@ -37,6 +51,10 @@ export function numberFormatter(num, digits) {
3751
return num.toString()
3852
}
3953

54+
/**
55+
* 10000 => "10,000"
56+
* @param {number} num
57+
*/
4058
export function toThousandFilter(num) {
4159
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
4260
}

src/layout/components/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
export { default as AppMain } from './AppMain'
12
export { default as Navbar } from './Navbar'
3+
export { default as Settings } from './Settings'
24
export { default as Sidebar } from './Sidebar/index.vue'
35
export { default as TagsView } from './TagsView/index.vue'
4-
export { default as AppMain } from './AppMain'
5-
export { default as Settings } from './Settings'

0 commit comments

Comments
 (0)