Skip to content

Commit d2d3f3b

Browse files
committed
fix: revert react antd style
1 parent 2e2cefe commit d2d3f3b

File tree

5 files changed

+50
-38
lines changed

5 files changed

+50
-38
lines changed

src/components/Charts/Bar.vue

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,43 +14,48 @@
1414
</template>
1515

1616
<script>
17-
const data = []
18-
for (let i = 0; i < 12; i += 1) {
19-
data.push({
20-
x: `${i + 1}`,
21-
y: Math.floor(Math.random() * 1000) + 200
22-
})
23-
}
24-
const tooltip = [
25-
'x*y',
26-
(x, y) => ({
27-
name: x,
28-
value: y
29-
})
30-
]
31-
const scale = [{
32-
dataKey: 'x',
33-
min: 2
34-
}, {
35-
dataKey: 'y',
36-
title: '时间',
37-
min: 1,
38-
max: 22
39-
}]
40-
4117
export default {
4218
name: 'Bar',
4319
props: {
4420
title: {
4521
type: String,
4622
default: ''
23+
},
24+
data: {
25+
type: Array,
26+
default: () => {
27+
return []
28+
}
29+
},
30+
scale: {
31+
type: Array,
32+
default: () => {
33+
return [{
34+
dataKey: 'x',
35+
min: 2
36+
}, {
37+
dataKey: 'y',
38+
title: '时间',
39+
min: 1,
40+
max: 22
41+
}]
42+
}
43+
},
44+
tooltip: {
45+
type: Array,
46+
default: () => {
47+
return [
48+
'x*y',
49+
(x, y) => ({
50+
name: x,
51+
value: y
52+
})
53+
]
54+
}
4755
}
4856
},
4957
data () {
5058
return {
51-
data,
52-
scale,
53-
tooltip
5459
}
5560
}
5661
}

src/components/SettingDrawer/SettingDrawer.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
@close="onClose"
77
:closable="false"
88
:visible="visible"
9-
:getContainer="() => $refs.settingDrawer"
10-
:style="{}"
119
>
1210
<div class="setting-drawer-index-content">
1311

src/components/global.less

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
@import './index.less';
22

3-
html {
4-
overflow: auto;
5-
}
6-
73
body {
8-
// 打开滚动条固定显示
9-
overflow-y: scroll;
104

115
&.colorWeak {
126
filter: invert(80%);

src/config/router.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export const asyncRouterMap = [
1717
name: 'dashboard',
1818
redirect: '/dashboard/workplace',
1919
component: RouteView,
20-
hideChildrenInMenu: true,
2120
meta: { title: '仪表盘', keepAlive: true, icon: bxAnaalyse, permission: [ 'dashboard' ] },
2221
children: [
2322
{

src/views/dashboard/Analysis.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
<a-tab-pane loading="true" tab="销售额" key="1">
7979
<a-row>
8080
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
81-
<bar title="销售额排行" />
81+
<bar :data="barData" title="销售额排行" />
8282
</a-col>
8383
<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
8484
<rank-list title="门店销售排行榜" :list="rankList"/>
@@ -88,7 +88,7 @@
8888
<a-tab-pane tab="访问量" key="2">
8989
<a-row>
9090
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
91-
<bar title="销售额趋势" />
91+
<bar :data="barData2" title="销售额趋势" />
9292
</a-col>
9393
<a-col :xl="8" :lg="12" :md="12" :sm="24" :xs="24">
9494
<rank-list title="门店销售排行榜" :list="rankList"/>
@@ -216,6 +216,19 @@ import moment from 'moment'
216216
import { ChartCard, MiniArea, MiniBar, MiniProgress, RankList, Bar, Trend, NumberInfo, MiniSmoothArea } from '@/components'
217217
import { mixinDevice } from '@/utils/mixin'
218218
219+
const barData = []
220+
const barData2 = []
221+
for (let i = 0; i < 12; i += 1) {
222+
barData.push({
223+
x: `${i + 1}`,
224+
y: Math.floor(Math.random() * 1000) + 200
225+
})
226+
barData2.push({
227+
x: `${i + 1}`,
228+
y: Math.floor(Math.random() * 1000) + 200
229+
})
230+
}
231+
219232
const rankList = []
220233
for (let i = 0; i < 7; i++) {
221234
rankList.push({
@@ -327,6 +340,9 @@ export default {
327340
searchTableColumns,
328341
searchData,
329342
343+
barData,
344+
barData2,
345+
330346
//
331347
pieScale,
332348
pieData,

0 commit comments

Comments
 (0)