Skip to content

Commit c89883d

Browse files
committed
fix: fix eslint && cleanup.
1 parent d90042b commit c89883d

36 files changed

+683
-630
lines changed

src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<a-locale-provider :locale="locale">
3-
<div id="app">
4-
<router-view/>
5-
</div>
3+
<div id="app">
4+
<router-view/>
5+
</div>
66
</a-locale-provider>
77
</template>
88
<script>

src/components/ChartCard.vue

Lines changed: 33 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,42 @@
11
<template>
2-
<a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false">
3-
<div class="chart-card-header">
4-
<div class="meta">
5-
<span class="chart-card-title">{{ title }}</span>
6-
<span class="chart-card-action">
7-
<slot name="action"></slot>
8-
</span>
9-
</div>
10-
<div class="total"><span>{{ total }}</span></div>
11-
</div>
12-
<div class="chart-card-content">
13-
<div class="content-fix">
14-
<slot></slot>
15-
</div>
16-
</div>
17-
<div class="chart-card-footer">
18-
<slot name="footer"></slot>
19-
</div>
20-
</a-card>
2+
<a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false">
3+
<div class="chart-card-header">
4+
<div class="meta">
5+
<span class="chart-card-title">{{ title }}</span>
6+
<span class="chart-card-action">
7+
<slot name="action"></slot>
8+
</span>
9+
</div>
10+
<div class="total"><span>{{ total }}</span></div>
11+
</div>
12+
<div class="chart-card-content">
13+
<div class="content-fix">
14+
<slot></slot>
15+
</div>
16+
</div>
17+
<div class="chart-card-footer">
18+
<slot name="footer"></slot>
19+
</div>
20+
</a-card>
2121
</template>
2222

2323
<script>
2424
export default {
2525
name: "ChartCard",
26-
props: ['title', 'total', 'loading']
26+
props: {
27+
title: {
28+
type: String,
29+
default: ''
30+
},
31+
total: {
32+
type: String,
33+
default: ''
34+
},
35+
loading: {
36+
type: String,
37+
default: ''
38+
}
39+
}
2740
}
2841
</script>
2942

src/components/chart/Bar.vue

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<template>
2-
<div :style="{ padding: '0 0 32px 32px' }">
3-
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
4-
<v-chart
5-
height="254"
6-
:data="data"
7-
:forceFit="true"
8-
:padding="['auto', 'auto', '40', '50']">
9-
<v-tooltip />
10-
<v-axis />
11-
<v-bar position="x*y"/>
12-
</v-chart>
13-
</div>
2+
<div :style="{ padding: '0 0 32px 32px' }">
3+
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
4+
<v-chart
5+
height="254"
6+
:data="data"
7+
:forceFit="true"
8+
:padding="['auto', 'auto', '40', '50']">
9+
<v-tooltip />
10+
<v-axis />
11+
<v-bar position="x*y"/>
12+
</v-chart>
13+
</div>
1414
</template>
1515

1616
<script>
@@ -40,7 +40,12 @@
4040
4141
export default {
4242
name: "Bar",
43-
props: ['title'],
43+
props: {
44+
title: {
45+
type: String,
46+
default: ''
47+
}
48+
},
4449
data () {
4550
return {
4651
data,

src/components/chart/MiniArea.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
2-
<div class="antv-mini-chart">
3-
<div class="chart-content" :style="{ height: 46 }">
4-
<v-chart :force-fit="true" :height="height" :data="data" :padding="[36, 5, 18, 5]">
5-
<v-tooltip />
6-
<v-smooth-area position="x*y" />
7-
</v-chart>
8-
</div>
2+
<div class="antv-mini-chart">
3+
<div class="chart-content" :style="{ height: 46 }">
4+
<v-chart :force-fit="true" :height="height" :data="data" :padding="[36, 5, 18, 5]">
5+
<v-tooltip />
6+
<v-smooth-area position="x*y" />
7+
</v-chart>
98
</div>
9+
</div>
1010
</template>
1111

1212
<script>

src/components/chart/Radar.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<v-chart :forceFit="true" height="400" :data="data" :padding="[20, 20, 95, 20]" :scale="scale">
3-
<v-tooltip />
3+
<v-tooltip></v-tooltip>
44
<v-axis :dataKey="axis1Opts.dataKey" :line="axis1Opts.line" :tickLine="axis1Opts.tickLine" :grid="axis1Opts.grid" />
55
<v-axis :dataKey="axis2Opts.dataKey" :line="axis2Opts.line" :tickLine="axis2Opts.tickLine" :grid="axis2Opts.grid" />
66
<v-legend dataKey="user" marker="circle" :offset="30" />
@@ -47,7 +47,12 @@
4747
4848
export default {
4949
name: 'Radar',
50-
props: ['data'],
50+
props: {
51+
data: {
52+
type: Array,
53+
default: null,
54+
}
55+
},
5156
data () {
5257
return {
5358
axis1Opts,

src/components/chart/RankList.vue

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
<template>
2-
<div class="rank">
3-
<h4 class="title">{{ title }}</h4>
4-
<ul class="list">
5-
<li :key="index" v-for="(item, index) in list">
6-
<span :class="index < 3 ? 'active' : null">{{ index + 1 }}</span>
7-
<span >{{ item.name }}</span>
8-
<span >{{ item.total }}</span>
9-
</li>
10-
</ul>
11-
</div>
2+
<div class="rank">
3+
<h4 class="title">{{ title }}</h4>
4+
<ul class="list">
5+
<li :key="index" v-for="(item, index) in list">
6+
<span :class="index < 3 ? 'active' : null">{{ index + 1 }}</span>
7+
<span >{{ item.name }}</span>
8+
<span >{{ item.total }}</span>
9+
</li>
10+
</ul>
11+
</div>
1212
</template>
1313

1414
<script>
1515
export default {
1616
name: "RankList",
17-
props: ['title', 'list']
17+
// ['title', 'list']
18+
props: {
19+
title: {
20+
type: String,
21+
default: ''
22+
},
23+
list: {
24+
type: Array,
25+
default: null
26+
}
27+
}
1828
}
1929
</script>
2030

src/components/chart/TransferBar.vue

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<template>
2-
<div :style="{ padding: '0 0 32px 32px' }">
3-
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
4-
<v-chart
5-
height="254"
6-
:data="data"
7-
:scale="scale"
8-
:forceFit="true"
9-
:padding="['auto', 'auto', '40', '50']">
10-
<v-tooltip />
11-
<v-axis />
12-
<v-bar position="x*y"/>
13-
</v-chart>
14-
</div>
2+
<div :style="{ padding: '0 0 32px 32px' }">
3+
<h4 :style="{ marginBottom: '20px' }">{{ title }}</h4>
4+
<v-chart
5+
height="254"
6+
:data="data"
7+
:scale="scale"
8+
:forceFit="true"
9+
:padding="['auto', 'auto', '40', '50']">
10+
<v-tooltip />
11+
<v-axis />
12+
<v-bar position="x*y"/>
13+
</v-chart>
14+
</div>
1515
</template>
1616

1717
<script>

src/components/layout/LayoutFooter.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<template>
2-
<div class="footer">
3-
<div class="links">
4-
<a href="#">Pro 首页</a>
5-
<a href="#"><a-icon type="github"/></a>
6-
<a href="#">Ant Design</a>
7-
</div>
8-
<div class="copyright">
9-
Copyright <a-icon type="copyright" /> 2018 <span>白鹭学园技术组出品</span>
10-
</div>
2+
<div class="footer">
3+
<div class="links">
4+
<a href="#">Pro 首页</a>
5+
<a href="#"><a-icon type="github"/></a>
6+
<a href="#">Ant Design</a>
117
</div>
8+
<div class="copyright">
9+
Copyright <a-icon type="copyright" /> 2018 <span>白鹭学园技术组出品</span>
10+
</div>
11+
</div>
1212
</template>
1313

1414
<script>

src/components/layout/LayoutHeader.vue

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
<template>
2-
<a-layout-header style="padding: 0px;">
3-
<div class="header">
4-
<a-icon class="trigger" :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click.native="toggle"/>
5-
<div class="user-wrapper">
6-
<span class="action">
7-
<a-icon type="question-circle-o"></a-icon>
8-
</span>
9-
<header-notice class="action"/>
10-
<a-dropdown>
11-
<span class="action ant-dropdown-link user-dropdown-menu">
12-
<a-avatar class="avatar" size="small" :src="avatar()"/>
13-
<span>{{ nickname() }}</span>
14-
</span>
15-
<a-menu slot="overlay" class="user-dropdown-menu-wrapper">
16-
<a-menu-item key="0">
17-
<a-icon type="user"/>
18-
<span>个人中心</span>
19-
</a-menu-item>
20-
<a-menu-item key="1">
21-
<router-link :to="{ name: 'settings' }">
22-
<a-icon type="setting"/>
23-
<span>账户设置</span>
24-
</router-link>
25-
</a-menu-item>
26-
<a-menu-item key="2" disabled>
27-
<a-icon type="setting"/>
28-
<span>测试</span>
29-
</a-menu-item>
30-
<a-menu-divider/>
31-
<a-menu-item key="3">
32-
<a href="javascript:;" @click="handleLogout">
33-
<a-icon type="logout"/>
34-
<span>退出登录</span>
35-
</a>
36-
</a-menu-item>
37-
</a-menu>
38-
</a-dropdown>
39-
</div>
40-
</div>
41-
</a-layout-header>
2+
<a-layout-header style="padding: 0px;">
3+
<div class="header">
4+
<a-icon class="trigger" :type="collapsed ? 'menu-unfold' : 'menu-fold'" @click.native="toggle"/>
5+
<div class="user-wrapper">
6+
<span class="action">
7+
<a-icon type="question-circle-o"></a-icon>
8+
</span>
9+
<header-notice class="action"/>
10+
<a-dropdown>
11+
<span class="action ant-dropdown-link user-dropdown-menu">
12+
<a-avatar class="avatar" size="small" :src="avatar()"/>
13+
<span>{{ nickname() }}</span>
14+
</span>
15+
<a-menu slot="overlay" class="user-dropdown-menu-wrapper">
16+
<a-menu-item key="0">
17+
<a-icon type="user"/>
18+
<span>个人中心</span>
19+
</a-menu-item>
20+
<a-menu-item key="1">
21+
<router-link :to="{ name: 'settings' }">
22+
<a-icon type="setting"/>
23+
<span>账户设置</span>
24+
</router-link>
25+
</a-menu-item>
26+
<a-menu-item key="2" disabled>
27+
<a-icon type="setting"/>
28+
<span>测试</span>
29+
</a-menu-item>
30+
<a-menu-divider/>
31+
<a-menu-item key="3">
32+
<a href="javascript:;" @click="handleLogout">
33+
<a-icon type="logout"/>
34+
<span>退出登录</span>
35+
</a>
36+
</a-menu-item>
37+
</a-menu>
38+
</a-dropdown>
39+
</div>
40+
</div>
41+
</a-layout-header>
4242
</template>
4343

4444
<script>

src/components/layout/PageHeader.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,22 @@
4747
props: {
4848
title: {
4949
type: String,
50+
default: '',
5051
required: false
5152
},
5253
breadcrumb: {
5354
type: Array,
55+
default: null,
5456
required: false
5557
},
5658
logo: {
5759
type: String,
60+
default: '',
5861
required: false
5962
},
6063
avatar: {
6164
type: String,
65+
default: '',
6266
required: false
6367
}
6468
},

0 commit comments

Comments
 (0)