Skip to content

Commit 74b325a

Browse files
committed
refactor: refactoring template
1 parent f7a2634 commit 74b325a

Some content is hidden

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

64 files changed

+1261
-1634
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ module.exports = {
1414
parserOptions: {
1515
parser: 'babel-eslint'
1616
}
17-
}
17+
}

babel.config.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
module.exports = {
22
presets: [
3-
'@vue/app'
3+
['@vue/app', {
4+
polyfills: [
5+
'es6.promise', // already default included now
6+
'es6.array.iterator', // already default included now
7+
'es6.symbol',
8+
'es6.object.assign'
9+
]
10+
}]
411
]
5-
}
12+
}

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
"test:e2e": "vue-cli-service test:e2e"
1515
},
1616
"dependencies": {
17-
"@coreui/coreui": "^2.0.14",
17+
"@coreui/coreui": "^2.0.20",
1818
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
1919
"@coreui/icons": "0.3.0",
20-
"@coreui/vue": "^2.0.2",
20+
"@coreui/vue": "github:coreui/coreui-vue#vue_cli3",
2121
"bootstrap": "^4.1.3",
2222
"bootstrap-vue": "^2.0.0-rc.11",
23-
"chart.js": "^2.7.2",
23+
"chart.js": "^2.7.3",
2424
"core-js": "^2.5.7",
2525
"css-vars-ponyfill": "^1.11.1",
2626
"flag-icon-css": "^3.2.0",
@@ -33,17 +33,17 @@
3333
"vue-router": "^3.0.1"
3434
},
3535
"devDependencies": {
36-
"@vue/cli-plugin-babel": "^3.0.4",
37-
"@vue/cli-plugin-e2e-nightwatch": "^3.0.4",
38-
"@vue/cli-plugin-eslint": "^3.0.4",
39-
"@vue/cli-plugin-unit-jest": "^3.0.4",
40-
"@vue/cli-service": "^3.0.4",
36+
"@vue/cli-plugin-babel": "^3.0.5",
37+
"@vue/cli-plugin-e2e-nightwatch": "^3.0.5",
38+
"@vue/cli-plugin-eslint": "^3.0.5",
39+
"@vue/cli-plugin-unit-jest": "^3.0.5",
40+
"@vue/cli-service": "^3.0.5",
4141
"@vue/test-utils": "^1.0.0-beta.25",
4242
"babel-core": "^7.0.0-bridge.0",
4343
"babel-jest": "^23.6.0",
4444
"growl": "^1.10.5",
4545
"https-proxy-agent": "^2.2.1",
46-
"node-sass": "^4.9.3",
46+
"node-sass": "^4.9.4",
4747
"sass-loader": "^7.1.0",
4848
"vue-template-compiler": "^2.5.17"
4949
},

src/containers/DefaultAside.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
<div class="py-3 pb-5 mr-3 float-left">
103103
<div class="avatar">
104104
<img src="img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
105-
<b-badge variant="success" class="avatar-status"></b-badge>
105+
<CBadge variant="success" class="avatar-status"/>
106106
</div>
107107
</div>
108108
<div>
@@ -117,7 +117,7 @@
117117
<div class="py-3 pb-5 mr-3 float-left">
118118
<div class="avatar">
119119
<img src="img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
120-
<b-badge variant="danger" class="avatar-status"></b-badge>
120+
<c-badge variant="danger" class="avatar-status"></c-badge>
121121
</div>
122122
</div>
123123
<div>
@@ -132,7 +132,7 @@
132132
<div class="py-3 pb-5 mr-3 float-left">
133133
<div class="avatar">
134134
<img src="img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
135-
<b-badge variant="info" class="avatar-status"></b-badge>
135+
<c-badge variant="info" class="avatar-status"></c-badge>
136136
</div>
137137
</div>
138138
<div>
@@ -147,7 +147,7 @@
147147
<div class="py-3 pb-5 mr-3 float-left">
148148
<div class="avatar">
149149
<img src="img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
150-
<b-badge variant="warning" class="avatar-status"></b-badge>
150+
<c-badge variant="warning" class="avatar-status"></c-badge>
151151
</div>
152152
</div>
153153
<div>
@@ -162,7 +162,7 @@
162162
<div class="py-3 pb-5 mr-3 float-left">
163163
<div class="avatar">
164164
<img src="img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
165-
<b-badge variant="dark" class="avatar-status"></b-badge>
165+
<c-badge variant="dark" class="avatar-status"></c-badge>
166166
</div>
167167
</div>
168168
<div>

src/containers/DefaultContainer.vue

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<SidebarMinimizer/>
3838
</AppSidebar>
3939
<main class="main">
40-
<Breadcrumb :list="list"/>
40+
<CBreadcrumbRouter/>
4141
<div class="container-fluid">
4242
<router-view></router-view>
4343
</div>
@@ -63,7 +63,7 @@
6363

6464
<script>
6565
import nav from '@/_nav'
66-
import { Header as AppHeader, SidebarToggler, Sidebar as AppSidebar, SidebarFooter, SidebarForm, SidebarHeader, SidebarMinimizer, SidebarNav, Aside as AppAside, AsideToggler, Footer as TheFooter, Breadcrumb } from '@coreui/vue'
66+
import { Header as AppHeader, SidebarToggler, Sidebar as AppSidebar, SidebarFooter,SidebarNav, SidebarForm, SidebarHeader, SidebarMinimizer, Aside as AppAside, AsideToggler, Footer as TheFooter } from '@coreui/vue'
6767
import DefaultAside from './DefaultAside'
6868
import DefaultHeaderDropdownAccnt from './DefaultHeaderDropdownAccnt'
6969
@@ -75,7 +75,6 @@ export default {
7575
AppSidebar,
7676
AppAside,
7777
TheFooter,
78-
Breadcrumb,
7978
DefaultAside,
8079
DefaultHeaderDropdownAccnt,
8180
SidebarForm,
@@ -89,14 +88,6 @@ export default {
8988
return {
9089
nav: nav.items
9190
}
92-
},
93-
computed: {
94-
name () {
95-
return this.$route.name
96-
},
97-
list () {
98-
return this.$route.matched.filter((route) => route.name || route.meta.label )
99-
}
10091
}
10192
}
10293
</script>
Lines changed: 35 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,50 @@
11
<template>
2-
<AppHeaderDropdown right no-caret>
3-
<template slot="header">
2+
<c-nav-item-dropdown no-caret right>
3+
<template slot="button-content">
44
<img
55
src="img/avatars/6.jpg"
66
class="img-avatar"
77
alt="admin@bootstrapmaster.com" />
8-
</template>\
9-
<template slot="dropdown">
10-
<b-dropdown-header tag="div" class="text-center"><strong>Account</strong></b-dropdown-header>
11-
<b-dropdown-item><i class="fa fa-bell-o" /> Updates
12-
<b-badge variant="info">{{ itemsCount }}</b-badge>
13-
</b-dropdown-item>
14-
<b-dropdown-item><i class="fa fa-envelope-o" /> Messages
15-
<b-badge variant="success">{{ itemsCount }}</b-badge>
16-
</b-dropdown-item>
17-
<b-dropdown-item><i class="fa fa-tasks" /> Tasks
18-
<b-badge variant="danger">{{ itemsCount }}</b-badge>
19-
</b-dropdown-item>
20-
<b-dropdown-item><i class="fa fa-comments" /> Comments
21-
<b-badge variant="warning">{{ itemsCount }}</b-badge>
22-
</b-dropdown-item>
23-
<b-dropdown-header
24-
tag="div"
25-
class="text-center">
26-
<strong>Settings</strong>
27-
</b-dropdown-header>
28-
<b-dropdown-item><i class="fa fa-user" /> Profile</b-dropdown-item>
29-
<b-dropdown-item><i class="fa fa-wrench" /> Settings</b-dropdown-item>
30-
<b-dropdown-item><i class="fa fa-usd" /> Payments
31-
<b-badge variant="secondary">{{ itemsCount }}</b-badge>
32-
</b-dropdown-item>
33-
<b-dropdown-item><i class="fa fa-file" /> Projects
34-
<b-badge variant="primary">{{ itemsCount }}</b-badge>
35-
</b-dropdown-item>
36-
<b-dropdown-divider />
37-
<b-dropdown-item><i class="fa fa-shield" /> Lock Account</b-dropdown-item>
38-
<b-dropdown-item><i class="fa fa-lock" /> Logout</b-dropdown-item>
398
</template>
40-
</AppHeaderDropdown>
9+
10+
<b-dropdown-header tag="div" class="text-center"><strong>Account</strong></b-dropdown-header>
11+
<b-dropdown-item><i class="fa fa-bell-o" /> Updates
12+
<c-badge variant="info" additionalClasses="hehe">{{ itemsCount }}</c-badge>
13+
</b-dropdown-item>
14+
<b-dropdown-item><i class="fa fa-envelope-o" /> Messages
15+
<c-badge variant="success">{{ itemsCount }}</c-badge>
16+
</b-dropdown-item>
17+
<b-dropdown-item><i class="fa fa-tasks" /> Tasks
18+
<c-badge variant="danger">{{ itemsCount }}</c-badge>
19+
</b-dropdown-item>
20+
<b-dropdown-item><i class="fa fa-comments" /> Comments
21+
<c-badge variant="warning">{{ itemsCount }}</c-badge>
22+
</b-dropdown-item>
23+
<b-dropdown-header
24+
tag="div"
25+
class="text-center">
26+
<strong>Settings</strong>
27+
</b-dropdown-header>
28+
<b-dropdown-item><i class="fa fa-user" /> Profile</b-dropdown-item>
29+
<b-dropdown-item><i class="fa fa-wrench" /> Settings</b-dropdown-item>
30+
<b-dropdown-item><i class="fa fa-usd" /> Payments
31+
<c-badge variant="secondary">{{ itemsCount }}</c-badge>
32+
</b-dropdown-item>
33+
<b-dropdown-item><i class="fa fa-file" /> Projects
34+
<c-badge variant="primary">{{ itemsCount }}</c-badge>
35+
</b-dropdown-item>
36+
<b-dropdown-divider />
37+
<b-dropdown-item><i class="fa fa-shield" /> Lock Account</b-dropdown-item>
38+
<b-dropdown-item><i class="fa fa-lock" /> Logout</b-dropdown-item>
39+
</c-nav-item-dropdown>
4140
</template>
4241

4342
<script>
44-
import { HeaderDropdown as AppHeaderDropdown } from '@coreui/vue'
43+
4544
export default {
4645
name: 'DefaultHeaderDropdownAccnt',
47-
components: {
48-
AppHeaderDropdown
49-
},
5046
data: () => {
5147
return { itemsCount: 42 }
52-
}
48+
},
5349
}
5450
</script>

src/main.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,28 @@
33
import 'core-js/es6/promise'
44
import 'core-js/es6/string'
55
import 'core-js/es7/array'
6+
67
// import cssVars from 'css-vars-ponyfill'
78
import Vue from 'vue'
89
import BootstrapVue from 'bootstrap-vue'
910
import App from './App'
1011
import router from './router'
12+
import CoreuiVue from '@coreui/vue'
13+
14+
Vue.config.performance = true
1115

1216
// todo
1317
// cssVars()
14-
1518
Vue.use(BootstrapVue)
19+
Vue.use(CoreuiVue)
20+
1621

1722
/* eslint-disable no-new */
18-
new Vue({
23+
var vm = new Vue({
1924
el: '#app',
2025
router,
2126
template: '<App/>',
2227
components: {
2328
App
24-
}
29+
},
2530
})

src/mixins/charts/chartMixins.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/views/Charts.vue

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,35 @@
22
<div class="animated fadeIn">
33
<b-card-group columns class="card-columns">
44
<b-card header="Line Chart">
5-
<div class="chart-wrapper">
6-
<line-example chartId="chart-line-01"/>
7-
</div>
5+
<line-example/>
86
</b-card>
97
<b-card header="Bar Chart">
10-
<div class="chart-wrapper">
11-
<bar-example chartId="chart-bar-01"/>
12-
</div>
8+
<bar-example/>
139
</b-card>
1410
<b-card header="Doughnut Chart">
15-
<div class="chart-wrapper">
16-
<doughnut-example chartId="chart-doughnut-01"/>
17-
</div>
11+
<doughnut-example/>
1812
</b-card>
1913
<b-card header="Radar Chart">
20-
<div class="chart-wrapper">
21-
<radar-example chartId="chart-radar-01"/>
22-
</div>
14+
<radar-example/>
2315
</b-card>
2416
<b-card header="Pie Chart">
25-
<div class="chart-wrapper">
26-
<pie-example chartId="chart-pie-01"/>
27-
</div>
17+
<pie-example/>
2818
</b-card>
2919
<b-card header="Polar Area Chart">
30-
<div class="chart-wrapper">
31-
<polar-area-example chartId="chart-polar-area-01"/>
32-
</div>
20+
<polar-area-example/>
21+
</b-card>
22+
<b-card header="Simple line chart">
23+
<c-simple-line-chart style="height:80px" :data='[10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]'
24+
label='Sales' borderColor='success'/>
25+
</b-card>
26+
<b-card header="Simple pointed chart">
27+
<c-simple-pointed-chart class='px-3' :data='[65, 59, 84, 84, 51, 55, 40]'
28+
:labels="['January', 'February', 'March', 'April', 'May', 'June', 'July']"
29+
style='height:80px' label='Members' pointHoverColor='warning' borderColor='warning'/>
30+
</b-card>
31+
<b-card header="Simple bar chart">
32+
<c-simple-bar-chart style="height:80px" :data='[10, 22, 34, 46, 58, 70, 46, 23, 45, 78, 34, 12]'
33+
label='Sales' color='danger'/>
3334
</b-card>
3435
</b-card-group>
3536
</div>
@@ -43,7 +44,7 @@ import PieExample from './charts/PieExample'
4344
import PolarAreaExample from './charts/PolarAreaExample'
4445
4546
export default {
46-
name: 'charts',
47+
name: 'Charts',
4748
components: {
4849
BarExample,
4950
LineExample,

0 commit comments

Comments
 (0)