diff --git a/src/components/Charts/keyboard.vue b/src/components/Charts/keyboard.vue
index 3f061bd0..0b258f36 100644
--- a/src/components/Charts/keyboard.vue
+++ b/src/components/Charts/keyboard.vue
@@ -53,103 +53,102 @@ export default {
data.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5)
data2.push((Math.sin(i / 5) * (i / 5 + 10) + i / 6) * 3)
}
- this.chart.setOption(
- {
- backgroundColor: '#08263a',
- grid: {
- left: '5%',
- right: '5%'
- },
- xAxis: [{
- show: false,
- data: xAxisData
- }, {
- show: false,
- data: xAxisData
- }],
- visualMap: {
- show: false,
- min: 0,
- max: 50,
- dimension: 0,
- inRange: {
- color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
- }
- },
- yAxis: {
- axisLine: {
- show: false
- },
- axisLabel: {
- textStyle: {
- color: '#4a657a'
- }
- },
- splitLine: {
- show: true,
- lineStyle: {
- color: '#08263f'
- }
- },
- axisTick: {
- show: false
- }
- },
- series: [{
- name: 'back',
- type: 'bar',
- data: data2,
- z: 1,
- itemStyle: {
- normal: {
- opacity: 0.4,
- barBorderRadius: 5,
- shadowBlur: 3,
- shadowColor: '#111'
- }
- }
- }, {
- name: 'Simulate Shadow',
- type: 'line',
- data,
- z: 2,
- showSymbol: false,
- animationDelay: 0,
- animationEasing: 'linear',
- animationDuration: 1200,
- lineStyle: {
- normal: {
- color: 'transparent'
- }
- },
- areaStyle: {
- normal: {
- color: '#08263a',
- shadowBlur: 50,
- shadowColor: '#000'
- }
- }
- }, {
- name: 'front',
- type: 'bar',
- data,
- xAxisIndex: 1,
- z: 3,
- itemStyle: {
- normal: {
- barBorderRadius: 5
- }
- }
- }],
- animationEasing: 'elasticOut',
- animationEasingUpdate: 'elasticOut',
- animationDelay(idx) {
- return idx * 20
- },
- animationDelayUpdate(idx) {
- return idx * 20
+ this.chart.setOption({
+ backgroundColor: '#08263a',
+ grid: {
+ left: '5%',
+ right: '5%'
+ },
+ xAxis: [{
+ show: false,
+ data: xAxisData
+ }, {
+ show: false,
+ data: xAxisData
+ }],
+ visualMap: {
+ show: false,
+ min: 0,
+ max: 50,
+ dimension: 0,
+ inRange: {
+ color: ['#4a657a', '#308e92', '#b1cfa5', '#f5d69f', '#f5898b', '#ef5055']
}
- })
+ },
+ yAxis: {
+ axisLine: {
+ show: false
+ },
+ axisLabel: {
+ textStyle: {
+ color: '#4a657a'
+ }
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#08263f'
+ }
+ },
+ axisTick: {
+ show: false
+ }
+ },
+ series: [{
+ name: 'back',
+ type: 'bar',
+ data: data2,
+ z: 1,
+ itemStyle: {
+ normal: {
+ opacity: 0.4,
+ barBorderRadius: 5,
+ shadowBlur: 3,
+ shadowColor: '#111'
+ }
+ }
+ }, {
+ name: 'Simulate Shadow',
+ type: 'line',
+ data,
+ z: 2,
+ showSymbol: false,
+ animationDelay: 0,
+ animationEasing: 'linear',
+ animationDuration: 1200,
+ lineStyle: {
+ normal: {
+ color: 'transparent'
+ }
+ },
+ areaStyle: {
+ normal: {
+ color: '#08263a',
+ shadowBlur: 50,
+ shadowColor: '#000'
+ }
+ }
+ }, {
+ name: 'front',
+ type: 'bar',
+ data,
+ xAxisIndex: 1,
+ z: 3,
+ itemStyle: {
+ normal: {
+ barBorderRadius: 5
+ }
+ }
+ }],
+ animationEasing: 'elasticOut',
+ animationEasingUpdate: 'elasticOut',
+ animationDelay(idx) {
+ return idx * 20
+ },
+ animationDelayUpdate(idx) {
+ return idx * 20
+ }
+ })
}
}
}
diff --git a/src/components/DragSelect/index.vue b/src/components/DragSelect/index.vue
index 4a2e6300..28256a8b 100644
--- a/src/components/DragSelect/index.vue
+++ b/src/components/DragSelect/index.vue
@@ -49,13 +49,13 @@ export default {
diff --git a/src/filters/index.js b/src/filters/index.js
index b164513a..86e768d8 100644
--- a/src/filters/index.js
+++ b/src/filters/index.js
@@ -1,6 +1,12 @@
// set function parseTime,formatTime to filter
export { parseTime, formatTime } from '@/utils'
+/**
+ * Show plural label if time is plural number
+ * @param {number} time
+ * @param {string} label
+ * @return {string}
+ */
function pluralize(time, label) {
if (time === 1) {
return time + label
@@ -8,6 +14,9 @@ function pluralize(time, label) {
return time + label + 's'
}
+/**
+ * @param {number} time
+ */
export function timeAgo(time) {
const between = Date.now() / 1000 - Number(time)
if (between < 3600) {
@@ -19,7 +28,12 @@ export function timeAgo(time) {
}
}
-/* 数字 格式化*/
+/**
+ * Number formatting
+ * like 10000 => 10k
+ * @param {number} num
+ * @param {number} digits
+ */
export function numberFormatter(num, digits) {
const si = [
{ value: 1E18, symbol: 'E' },
@@ -37,6 +51,10 @@ export function numberFormatter(num, digits) {
return num.toString()
}
+/**
+ * 10000 => "10,000"
+ * @param {number} num
+ */
export function toThousandFilter(num) {
return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
}
diff --git a/src/layout/components/index.js b/src/layout/components/index.js
index e9f79ddd..104bd3ac 100644
--- a/src/layout/components/index.js
+++ b/src/layout/components/index.js
@@ -1,5 +1,5 @@
+export { default as AppMain } from './AppMain'
export { default as Navbar } from './Navbar'
+export { default as Settings } from './Settings'
export { default as Sidebar } from './Sidebar/index.vue'
export { default as TagsView } from './TagsView/index.vue'
-export { default as AppMain } from './AppMain'
-export { default as Settings } from './Settings'
diff --git a/src/layout/index.vue b/src/layout/index.vue
index ec6df90c..965bcd1b 100644
--- a/src/layout/index.vue
+++ b/src/layout/index.vue
@@ -17,19 +17,19 @@