File tree Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Expand file tree Collapse file tree 4 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ # app {
2
+ padding : 20px ;
3
+ height : 400px ;
4
+ }
Original file line number Diff line number Diff line change
1
+ name: Alerts demo - BootstrapVue
2
+ description: Please see BootstrapVue docs for more information https://bootstrap-vue.github.io
3
+ authors:
4
+ - Pooya Parsa
5
+ resources:
6
+ - https://unpkg.com/bootstrap@next/dist/css/bootstrap.min.css
7
+ - https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css
8
+ - https://unpkg.com/vue@latest/dist/vue.min.js
9
+ - https://unpkg.com/tether@latest/dist/js/tether.min.js
10
+ - https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.js
Original file line number Diff line number Diff line change
1
+ < div id ="app ">
2
+ < b-alert show >
3
+ Default Alert
4
+ </ b-alert >
5
+
6
+ < b-alert state ="success " show >
7
+ Success Alert
8
+ </ b-alert >
9
+
10
+ < b-alert state ="danger " dismissible :show ="showDismissibleAlert " @dismissed ="showDismissibleAlert=false ">
11
+ Dismissible Alert!
12
+ </ b-alert >
13
+
14
+ < b-alert :show ="dismissCountDown " dismissible state ="warning " @dismiss-count-down ="countDownChanged ">
15
+ This alert will dismiss after {{dismissCountDown}} seconds...
16
+ </ b-alert >
17
+
18
+ < b-btn @click ="showAlert " variant ="info " class ="m-1 "> Show alert with count-down timer</ b-btn >
19
+ < b-btn @click ="showDismissibleAlert=true " variant ="info " class ="m-1 ">
20
+ Show dismissible alert ({{showDismissibleAlert?'visible':'hidden'}})
21
+ </ b-btn >
22
+ </ div >
Original file line number Diff line number Diff line change
1
+ new Vue ( {
2
+ el : '#app' ,
3
+ data : {
4
+ dismissCountDown : null ,
5
+ showDismissibleAlert : false
6
+ } ,
7
+ methods : {
8
+ countDownChanged ( dismissCountDown ) {
9
+ this . dismissCountDown = dismissCountDown ;
10
+ } ,
11
+ showAlert ( ) {
12
+ this . dismissCountDown = 5 ;
13
+ }
14
+ }
15
+ } ) ;
You can’t perform that action at this time.
0 commit comments