This repository was archived by the owner on Apr 1, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +153
-11
lines changed Expand file tree Collapse file tree 11 files changed +153
-11
lines changed Original file line number Diff line number Diff line change 44
44
"on": "colon"
45
45
}
46
46
}],
47
- "vue/require-default-prop": "warning",
48
- "vue/require-prop-types": "warning",
49
- "vue/prop-name-casing": ["error", "camelCase"]
47
+ "vue/require-default-prop": "off",
48
+ "vue/require-prop-types": "off",
49
+ "vue/prop-name-casing": ["error", "camelCase"],
50
+ "unicorn/catch-error-name": ["error", {
51
+ "name": "err"
52
+ }]
50
53
},
51
54
"overrides": [{
52
55
"files": ["resources/assets/js/coreui/**/*.vue"],
Original file line number Diff line number Diff line change 36
36
"stylelint-scss" : " ^3.1.3"
37
37
},
38
38
"dependencies" : {
39
+ "animate.css" : " ^3.6.1" ,
39
40
"axios" : " ^0.18" ,
40
41
"bootstrap" : " ^4.1.1" ,
41
42
"bootstrap-vue" : " ^2.0.0-rc.11" ,
48
49
"simple-line-icons" : " ^2.4.1" ,
49
50
"vue" : " ^2.5.16" ,
50
51
"vue-chartjs" : " ^3.3.2" ,
52
+ "vue-notification" : " ^1.3.10" ,
51
53
"vue-router" : " ^3.0.1" ,
54
+ "vuejs-datepicker" : " ^1.5.2" ,
52
55
"vuex" : " ^3.0.1"
53
56
},
54
57
"pre-commit" : [
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -11,9 +11,36 @@ window.Vue = require('vue')
11
11
try {
12
12
window . $ = window . jQuery = require ( 'jquery' )
13
13
14
+ // Animate CSS
15
+ window . $ . fn . extend ( {
16
+ animateCss : function ( animationName , callback ) {
17
+ const animationEnd = ( function ( el ) {
18
+ const animations = {
19
+ animation : 'animationend' ,
20
+ OAnimation : 'oAnimationEnd' ,
21
+ MozAnimation : 'mozAnimationEnd' ,
22
+ WebkitAnimation : 'webkitAnimationEnd' ,
23
+ }
24
+
25
+ for ( const t in animations ) {
26
+ if ( el . style [ t ] !== undefined )
27
+ return animations [ t ]
28
+ }
29
+ } ) ( document . createElement ( 'div' ) )
30
+
31
+ this . addClass ( `animated ${ animationName } ` ) . one ( animationEnd , function ( ) {
32
+ $ ( this ) . removeClass ( `animated ${ animationName } ` )
33
+
34
+ if ( typeof callback === 'function' ) callback ( )
35
+ } )
36
+
37
+ return this
38
+ } ,
39
+ } )
40
+
14
41
require ( 'bootstrap' )
15
- } catch ( error ) {
16
- console . error ( error )
42
+ } catch ( err ) {
43
+ console . error ( err )
17
44
}
18
45
19
46
/**
Original file line number Diff line number Diff line change 3
3
<AppHeader />
4
4
<div class =" app-body" >
5
5
<Sidebar :nav-items =" nav" />
6
+ <notifications
7
+ class =" custom-notifications"
8
+ :style =" { 'margin-top': offset }" />
6
9
<main class =" main" >
7
10
<breadcrumb :list =" list" />
8
11
<div class =" container-fluid" >
@@ -30,7 +33,8 @@ export default {
30
33
},
31
34
data () {
32
35
return {
33
- nav: nav .items ,
36
+ nav : nav .items ,
37
+ offset: true ,
34
38
}
35
39
},
36
40
computed: {
@@ -41,5 +45,19 @@ export default {
41
45
return this .$route .matched
42
46
},
43
47
},
48
+ methods: {
49
+ setPosNotify () {
50
+ const top = $ (document ).scrollTop ()
51
+ const offset = top < 55 ? 55 - top : 0
52
+
53
+ this .offset = ` ${ offset} px`
54
+ },
55
+ },
56
+ mounted () {
57
+ $ (window ).on (' scroll' , this .setPosNotify )
58
+ },
59
+ beforeDestroy () {
60
+ $ (window ).off (' scroll' , this .setPosNotify )
61
+ },
44
62
}
45
63
</script >
Original file line number Diff line number Diff line change 2
2
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
3
import Vue from 'vue'
4
4
import BootstrapVue from 'bootstrap-vue'
5
+ import Datepicker from 'vuejs-datepicker'
6
+ import { id } from 'vuejs-datepicker/dist/locale'
7
+ import Notifications from 'vue-notification'
5
8
import App from './App'
6
9
import router from './router'
7
10
import store from './store'
8
11
9
12
Vue . use ( BootstrapVue )
13
+ Vue . use ( Notifications )
14
+
15
+ Vue . component ( 'b-datepicker' , {
16
+ extends : Datepicker ,
17
+ props : {
18
+ bootstrapStyling : {
19
+ type : Boolean ,
20
+ default : true ,
21
+ } ,
22
+ language : {
23
+ type : Object ,
24
+ default : ( ) => id ,
25
+ } ,
26
+ } ,
27
+ } )
10
28
11
29
window . Vue = new Vue ( {
12
30
el : '#app' ,
Original file line number Diff line number Diff line change 162
162
type =" date"
163
163
id =" date" />
164
164
</b-form-group >
165
+ <b-form-group
166
+ label =" Datepicker"
167
+ :label-cols =" 3"
168
+ :horizontal =" true" >
169
+ <b-datepicker
170
+ v-model =" datepicker" />
171
+ </b-form-group >
165
172
<b-form-group
166
173
description =" Please enter your email"
167
174
label =" Email Input"
@@ -1462,7 +1469,8 @@ export default {
1462
1469
name: ' Forms' ,
1463
1470
data () {
1464
1471
return {
1465
- selected: [], // Must be an array reference!
1472
+ selected : [], // Must be an array reference!
1473
+ datepicker: new Date (),
1466
1474
}
1467
1475
},
1468
1476
methods: {
Original file line number Diff line number Diff line change 209
209
</div >
210
210
</b-card >
211
211
</b-col >
212
+ <b-col
213
+ cols =" 12"
214
+ md =" 6" >
215
+ <b-card
216
+ header-tag =" header"
217
+ footer-tag =" footer" >
218
+ <div slot =" header" >
219
+ <i class =" fa fa-align-justify" /> Alerts <small >with <b >Vue Notification</b ></small >
220
+ </div >
221
+ <b-button
222
+ variant =" success"
223
+ @click =" showNotify('success')" >
224
+ Success
225
+ </b-button >
226
+ <b-button
227
+ variant =" warning"
228
+ @click =" showNotify('warning')" >
229
+ Warning
230
+ </b-button >
231
+ <b-button
232
+ variant =" danger"
233
+ @click =" showNotify('danger')" >
234
+ Danger
235
+ </b-button >
236
+ </b-card >
237
+ </b-col >
212
238
</b-row >
213
239
</div >
214
240
</div >
@@ -231,6 +257,13 @@ export default {
231
257
showAlert () {
232
258
this .dismissCountDown = this .dismissSecs
233
259
},
260
+ showNotify (type ) {
261
+ this .$notify ({
262
+ type,
263
+ title: ' Important message' ,
264
+ text : ' Hello user! This is a notification!' ,
265
+ })
266
+ },
234
267
},
235
268
}
236
269
</script >
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ $simple-line-font-path: '~simple-line-icons/fonts/';
19
19
@import ' ~font-awesome/css/font-awesome.min.css' ;
20
20
@import ' ~simple-line-icons/css/simple-line-icons.css' ;
21
21
@import ' ~flag-icon-css/css/flag-icon.min.css' ;
22
+ @import ' ~animate.css/animate.min.css' ;
22
23
23
24
// Import Other CSS Module
24
25
@@ -30,3 +31,4 @@ $simple-line-font-path: '~simple-line-icons/fonts/';
30
31
31
32
// Custom styles
32
33
@import ' custom' ;
34
+ @import ' vendors/vue-notification/notification' ;
You can’t perform that action at this time.
0 commit comments