Skip to content

Commit 6ed6c90

Browse files
committed
fix: Add IE polyfills, add vue-perfect-scrollbar to DefaultContainer, change packages
1 parent 41db896 commit 6ed6c90

File tree

5 files changed

+48
-23
lines changed

5 files changed

+48
-23
lines changed

babel.config.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
module.exports = {
22
presets: [
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-
]
3+
[ "@vue/app", {
4+
"useBuiltIns": 'entry'
105
}]
116
]
127
}

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@coreui/coreui-free-vue-admin-template",
3-
"version": "2.0.1",
3+
"version": "v3-alpha.1",
44
"description": "Open Source Bootstrap Admin Template",
55
"author": "Łukasz Holeczek",
66
"homepage": "http://coreui.io",
77
"copyright": "Copyright 2018 creativeLabs Łukasz Holeczek",
88
"license": "MIT",
99
"scripts": {
1010
"serve": "vue-cli-service serve",
11-
"build": "vue-cli-service build",
11+
"build": "vue-cli-service build --modern",
1212
"lint": "vue-cli-service lint",
1313
"test:unit": "vue-cli-service test:unit",
1414
"test:e2e": "vue-cli-service test:e2e"
@@ -18,11 +18,12 @@
1818
"@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.2.0",
1919
"@coreui/icons": "0.3.0",
2020
"@coreui/vue": "../coreui-vue",
21+
"babel-polyfill": "^6.26.0",
2122
"bootstrap": "^4.1.3",
22-
"bootstrap-vue": "^2.0.0-rc.11",
2323
"chart.js": "^2.7.3",
2424
"core-js": "^2.5.7",
2525
"css-vars-ponyfill": "^1.11.1",
26+
"current-script-polyfill": "^1.0.0",
2627
"element-resize-detector": "^1.2.0",
2728
"flag-icon-css": "^3.2.0",
2829
"font-awesome": "^4.7.0",
@@ -41,7 +42,10 @@
4142
"@vue/cli-plugin-unit-jest": "^3.0.5",
4243
"@vue/cli-service": "^3.0.5",
4344
"@vue/test-utils": "^1.0.0-beta.25",
44-
"babel-core": "^7.0.0-bridge.0",
45+
"babel-core": "^6.26.3",
46+
"babel-plugin-dynamic-import-node": "^2.2.0",
47+
"babel-plugin-module-resolver": "^3.1.2",
48+
"babel-preset-vue-app": "^2.0.0",
4549
"babel-jest": "^23.6.0",
4650
"growl": "^1.10.5",
4751
"https-proxy-agent": "^2.2.1",

src/containers/DefaultContainer.vue

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@
3232
<CSidebar fixed>
3333
<CSidebarHeader/>
3434
<CSidebarForm/>
35-
<CSidebarNav :navItems="computedNav"></CSidebarNav>
35+
<!-- <CSidebarNav :navItems="computedNav"/> -->
36+
<nav class="sidebar-nav">
37+
<VuePerfectScrollbar class="scroll-area" :settings="psSettings"
38+
@ps-scroll-y="scrollHandle">
39+
<CSidebarNavItems :items="computedNav"/>
40+
</VuePerfectScrollbar>
41+
</nav>
3642
<CSidebarFooter/>
3743
<CSidebarMinimizer/>
3844
</CSidebar>
@@ -65,12 +71,14 @@
6571
import nav from '@/_nav'
6672
import DefaultAside from './DefaultAside'
6773
import DefaultHeaderDropdownAccnt from './DefaultHeaderDropdownAccnt'
74+
import VuePerfectScrollbar from 'vue-perfect-scrollbar'
6875
6976
export default {
7077
name: 'full',
7178
components: {
7279
DefaultAside,
7380
DefaultHeaderDropdownAccnt,
81+
VuePerfectScrollbar
7482
},
7583
data () {
7684
return {
@@ -80,7 +88,31 @@ export default {
8088
computed: {
8189
computedNav () {
8290
return this.nav.filter((item) => item.name !== 'Dashboard')
91+
},
92+
psSettings: () => {
93+
// ToDo: find better rtl fix
94+
return {
95+
maxScrollbarLength: 200,
96+
minScrollbarLength: 40,
97+
suppressScrollX: getComputedStyle(document.querySelector('html')).direction !== 'rtl',
98+
wheelPropagation: false,
99+
interceptRailY: styles => ({ ...styles, height: 0 })
100+
}
101+
}
102+
},
103+
methods: {
104+
/*eslint no-unused-vars: ["error", { "argsIgnorePattern": "evt" }]*/
105+
scrollHandle (evt) {
106+
// console.log(evt)
83107
}
84108
}
85109
}
86110
</script>
111+
112+
<style scoped lang="css">
113+
.scroll-area {
114+
position: absolute;
115+
height: 100%;
116+
margin: auto;
117+
}
118+
</style>

src/main.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
// The Vue build version to load with the `import` command
22
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3+
34
import 'core-js/es6/promise'
45
import 'core-js/es6/string'
56
import 'core-js/es7/array'
7+
import '@babel/polyfill'
68

79
// import cssVars from 'css-vars-ponyfill'
810
import Vue from 'vue'
9-
import BootstrapVue from 'bootstrap-vue'
1011
import App from './App'
1112
import router from './router'
12-
13-
14-
15-
//only for development with link
16-
import CoreuiVueLink from '@coreui/vue/src'
17-
// import CoreuiVue from '@coreui/vue'
18-
13+
import CoreuiVue from '@coreui/vue'
1914
Vue.config.performance = true
2015

2116
// todo
2217
// cssVars()
23-
Vue.use(BootstrapVue)
24-
Vue.use(CoreuiVueLink)
18+
Vue.use(CoreuiVue)
2519

2620

2721
/* eslint-disable no-new */

src/views/users/Users.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<CRow>
3-
<CCol cols="12" xl="6">
3+
<CCol cols="12" xl="8">
44
<transition name="slide">
55
<CCard header="users">
66
<CTable hover

0 commit comments

Comments
 (0)