2016-11-16 19:56:26 +00:00
< template >
2016-11-25 19:21:26 +00:00
< page-content page -title = " Components - Dialog " >
2016-11-25 19:10:40 +00:00
< docs-component >
< div slot = "description" >
< p > Dialogs inform users about a specific task and may contain critical information , require decisions , or involve multiple tasks . < / p >
< p > The dialog component works with any plain html content . You can have tabs , all form components and more . < / p >
< p > Alternativelly you can use three presets to build Alerts , Confirms and Prompt dialogs . < / p >
< p > The preset component is created on top of < code > & lt ; md - dialog & gt ; < / code > . You should provide the content or the HTML content at least . < / p >
< p > All the pressets can use the same options and events from the < code > & lt ; md - dialog & gt ; < / code > component . < / p >
< / div >
< div slot = "api" >
< api-table name = "md-dialog" >
< md-table slot = "properties" >
< md-table-header >
< md-table-row >
< md-table-head > Name < / md-table-head >
< md-table-head > Type < / md-table-head >
< md-table-head > Description < / md-table-head >
< / md-table-row >
< / md-table-header >
< md-table-body >
< md-table-row >
< md-table-cell > md - click - outside - to - close < / md-table-cell >
< md-table-cell > < code > Boolean < / code > < / md-table-cell >
< md-table-cell > Enable or disable click outside to close . Default : < code > true < / code > < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - esc - to - close < / md-table-cell >
< md-table-cell > < code > Boolean < / code > < / md-table-cell >
< md-table-cell > Enable or disable close on esc key . Default : < code > true < / code > < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - backdrop < / md-table-cell >
< md-table-cell > < code > Boolean < / code > < / md-table-cell >
< md-table-cell > Create an opaque backdrop behind the dialog . Default : < code > true < / code > < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - open - from < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > The query selector of the element that is used to determine from which the Dialog will open . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - close - to < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > The query selector of the element that is used to determine from which the Dialog will close . < / md-table-cell >
< / md-table-row >
< / md-table-body >
< / md-table >
< md-table slot = "events" >
< md-table-header >
< md-table-row >
< md-table-head > Name < / md-table-head >
< md-table-head > Value < / md-table-head >
< md-table-head > Description < / md-table-head >
< / md-table-row >
< / md-table-header >
< md-table-body >
< md-table-row >
< md-table-cell > open < / md-table-cell >
< md-table-cell > Receive the state of the dialog : < code > ok < / code > | < code > cancel < / code > < br > Works only for Confirm and Prompt < / md-table-cell >
< md-table-cell > Triggered when the dialog open . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > close < / md-table-cell >
< md-table-cell > Receive the state of the dialog : < code > ok < / code > | < code > cancel < / code > < br > Works only for Confirm and Prompt < / md-table-cell >
< md-table-cell > Triggered when the dialog closes . < / md-table-cell >
< / md-table-row >
< / md-table-body >
< / md-table >
2016-11-28 03:15:00 +00:00
< md-table slot = "methods" >
< md-table-header >
< md-table-row >
< md-table-head > Name < / md-table-head >
< md-table-head > Description < / md-table-head >
< / md-table-row >
< / md-table-header >
< md-table-body >
< md-table-row >
< md-table-cell > open < / md-table-cell >
< md-table-cell > Open the dialog . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > close < / md-table-cell >
< md-table-cell > Close the dialog . < / md-table-cell >
< / md-table-row >
< / md-table-body >
< / md-table >
2016-11-25 19:10:40 +00:00
< / api-table >
< api-table name = "md-dialog-title" >
< p > Can display a title on the top of the Dialog . < / p >
< p > No options available < / p >
< / api-table >
< api-table name = "md-dialog-content" >
< p > Used to display rich content inside the Dialog . < / p >
< p > No options available < / p >
< / api-table >
< api-table name = "md-dialog-actions" >
< p > Hold the actions of a dialog and align them on the right . Here you can add < code > & lt ; md - button & gt ; < / code > with or without icons . < / p >
< p > No options available < / p >
< / api-table >
< api-table name = "md-dialog-alert" >
< div slot = "properties" >
< md-table >
< md-table-header >
< md-table-row >
< md-table-head > Name < / md-table-head >
< md-table-head > Type < / md-table-head >
< md-table-head > Description < / md-table-head >
< / md-table-row >
< / md-table-header >
< md-table-body >
< md-table-row >
< md-table-cell > md - title < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the alert title . Optional . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - content < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the alert content . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - content - html < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the alert content with a custom html . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - ok - text < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the alert "Okay" button text . < / md-table-cell >
< / md-table-row >
< / md-table-body >
< / md-table >
< / div >
< / api-table >
< api-table name = "md-dialog-confirm" >
< div slot = "properties" >
< md-table >
< md-table-header >
< md-table-row >
< md-table-head > Name < / md-table-head >
< md-table-head > Type < / md-table-head >
< md-table-head > Description < / md-table-head >
< / md-table-row >
< / md-table-header >
< md-table-body >
< md-table-row >
< md-table-cell > md - title < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the confirm title . Optional . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - content < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the confirm content . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - content - html < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the confirm content with a custom html . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - ok - text < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the confirm "Okay" button text . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - cancel - text < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the confirm "Cancel" button text . < / md-table-cell >
< / md-table-row >
< / md-table-body >
< / md-table >
< / div >
< / api-table >
< api-table name = "md-dialog-prompt" >
< div slot = "properties" >
< md-table >
< md-table-header >
< md-table-row >
< md-table-head > Name < / md-table-head >
< md-table-head > Type < / md-table-head >
< md-table-head > Description < / md-table-head >
< / md-table-row >
< / md-table-header >
< md-table-body >
< md-table-row >
< md-table-cell > md - title < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the prompt title . Optional . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - content < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the prompt content . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - content - html < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the prompt content with a custom html . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - ok - text < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the prompt "Okay" button text . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - cancel - text < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Sets the prompt "Cancel" button text . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > v - model < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > A required model object to be bind when the value is confirmed . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - input - id < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Set the ID of the field inside the prompt dialog . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - input - name < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Set the name of the field inside the prompt dialog . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - input - maxlength < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Set the optional maxlength of the field inside the prompt dialog with the text count . < / md-table-cell >
< / md-table-row >
< md-table-row >
< md-table-cell > md - input - placeholder < / md-table-cell >
< md-table-cell > < code > String < / code > < / md-table-cell >
< md-table-cell > Set the optional placeholder of the field inside the prompt dialog . < / md-table-cell >
< / md-table-row >
< / md-table-body >
< / md-table >
< / div >
< / api-table >
< / div >
< div slot = "example" >
< example-box card -title = " Custom " >
< div class = "dialog-fab" slot = "demo" >
2016-12-07 22:07:19 +00:00
< md-dialog md -open -from = " # custom " md -close -to = " # custom " ref = "dialog1" >
< md-dialog-title > Lorem ipsum dolor sit amet < / md-dialog-title >
2016-12-08 11:47:16 +00:00
< md-dialog-content > Nemo , nobis necessitatibus ut illo , ducimus ex . < / md-dialog-content >
2016-12-07 22:07:19 +00:00
2016-11-25 19:10:40 +00:00
< md-dialog-actions >
< md-button class = "md-primary" @click ="closeDialog('dialog1')" > Cancel < / md -button >
< md-button class = "md-primary" @click ="closeDialog('dialog1')" > Ok < / md -button >
< / md-dialog-actions >
< / md-dialog >
< md-dialog md -open -from = " # fab " md -close -to = " # fab " ref = "dialog2" >
< md-dialog-title > Create new note < / md-dialog-title >
< md-dialog-content >
< form >
< md-input-container >
< label > Note < / label >
< md-textarea > < / md-textarea >
< / md-input-container >
< / form >
< / md-dialog-content >
< md-dialog-actions >
< md-button class = "md-primary" @click ="closeDialog('dialog2')" > Cancel < / md -button >
< md-button class = "md-primary" @click ="closeDialog('dialog2')" > Create < / md -button >
< / md-dialog-actions >
< / md-dialog >
< md-button class = "md-primary md-raised" id = "custom" @click ="openDialog('dialog1')" > Custom < / md -button >
< md-button class = "md-fab md-fab-bottom-right" id = "fab" @click ="openDialog('dialog2')" >
< md-icon > add < / md-icon >
< / md-button >
< / div >
< div slot = "code" >
< code-block lang = "xml" >
& lt ; md - dialog md - open - from = & quot ; # custom & quot ; md - close - to = & quot ; # custom & quot ; ref = & quot ; dialog1 & quot ; & gt ;
& lt ; md - dialog - title & gt ; Lorem ipsum dolor sit amet & lt ; / m d - d i a l o g - t i t l e & g t ;
& lt ; md - dialog - content & gt ; Nemo , nobis necessitatibus ut illo , ducimus ex . & lt ; / m d - d i a l o g - c o n t e n t & g t ;
& lt ; md - dialog - actions & gt ;
& lt ; md - button class = & quot ; md - primary & quot ; @ click = & quot ; closeDialog ( & apos ; dialog1 & apos ; ) & quot ; & gt ; Cancel & lt ; / m d - b u t t o n & g t ;
& lt ; md - button class = & quot ; md - primary & quot ; @ click = & quot ; closeDialog ( & apos ; dialog1 & apos ; ) & quot ; & gt ; Ok & lt ; / m d - b u t t o n & g t ;
& lt ; / m d - d i a l o g - a c t i o n s & g t ;
& lt ; / m d - d i a l o g & g t ;
& lt ; md - dialog md - open - from = & quot ; # fab & quot ; md - close - to = & quot ; # fab & quot ; ref = & quot ; dialog2 & quot ; & gt ;
& lt ; md - dialog - title & gt ; Create new note & lt ; / m d - d i a l o g - t i t l e & g t ;
& lt ; md - dialog - content & gt ;
& lt ; form & gt ;
& lt ; md - input - container & gt ;
& lt ; label & gt ; Note & lt ; / l a b e l & g t ;
& lt ; md - textarea & gt ; & lt ; / m d - t e x t a r e a & g t ;
& lt ; / m d - i n p u t - c o n t a i n e r & g t ;
& lt ; / f o r m & g t ;
& lt ; / m d - d i a l o g - c o n t e n t & g t ;
& lt ; md - dialog - actions & gt ;
& lt ; md - button class = & quot ; md - primary & quot ; @ click = & quot ; closeDialog ( & apos ; dialog2 & apos ; ) & quot ; & gt ; Cancel & lt ; / m d - b u t t o n & g t ;
& lt ; md - button class = & quot ; md - primary & quot ; @ click = & quot ; closeDialog ( & apos ; dialog2 & apos ; ) & quot ; & gt ; Create & lt ; / m d - b u t t o n & g t ;
& lt ; / m d - d i a l o g - a c t i o n s & g t ;
& lt ; / m d - d i a l o g & g t ;
& lt ; md - button class = & quot ; md - primary md - raised & quot ; id = & quot ; custom & quot ; @ click = & quot ; openDialog ( & apos ; dialog1 & apos ; ) & quot ; & gt ; Custom & lt ; / m d - b u t t o n & g t ;
& lt ; md - button class = & quot ; md - fab md - fab - bottom - right & quot ; id = & quot ; fab & quot ; @ click = & quot ; openDialog ( & apos ; dialog2 & apos ; ) & quot ; & gt ;
& lt ; md - icon & gt ; add & lt ; / m d - i c o n & g t ;
& lt ; / m d - b u t t o n & g t ;
< / code-block >
< code-block lang = "javascript" >
export default {
methods : {
openDialog ( ref ) {
this . $refs [ ref ] . open ( ) ;
} ,
closeDialog ( ref ) {
this . $refs [ ref ] . close ( ) ;
} ,
onOpen ( ) {
console . log ( & apos ; Opened & apos ; ) ;
} ,
onClose ( type ) {
console . log ( & apos ; Closed & apos ; , type ) ;
}
}
} ;
< / code-block >
< / div >
< / example-box >
< example-box card -title = " Alerts " >
< div slot = "demo" >
< md-dialog-alert
: md - content = "alert.content"
: md - ok - text = "alert.ok"
@ open = "onOpen"
@ close = "onClose"
ref = "dialog3" >
< / md-dialog-alert >
< md-dialog-alert
: md - title = "alert2.title"
: md - content - html = "alert2.contentHtml"
@ open = "onOpen"
@ close = "onClose"
ref = "dialog4" >
< / md-dialog-alert >
< md-button class = "md-primary md-raised" @click ="openDialog('dialog3')" > Alert < / md -button >
< md-button class = "md-primary md-raised" @click ="openDialog('dialog4')" > Alert with HTML < / md -button >
< / div >
< div slot = "code" >
< code-block lang = "xml" >
& lt ; md - dialog - alert
: md - content = & quot ; alert . content & quot ;
: md - ok - text = & quot ; alert . ok & quot ;
@ open = & quot ; onOpen & quot ;
@ close = & quot ; onClose & quot ;
ref = & quot ; dialog3 & quot ; & gt ;
& lt ; / m d - d i a l o g - a l e r t & g t ;
& lt ; md - dialog - alert
: md - title = & quot ; alert2 . title & quot ;
: md - content - html = & quot ; alert2 . contentHtml & quot ;
@ open = & quot ; onOpen & quot ;
@ close = & quot ; onClose & quot ;
ref = & quot ; dialog4 & quot ; & gt ;
& lt ; / m d - d i a l o g - a l e r t & g t ;
& lt ; md - button class = & quot ; md - primary md - raised & quot ; @ click = & quot ; openDialog ( & apos ; dialog3 & apos ; ) & quot ; & gt ; Alert & lt ; / m d - b u t t o n & g t ;
& lt ; md - button class = & quot ; md - primary md - raised & quot ; @ click = & quot ; openDialog ( & apos ; dialog4 & apos ; ) & quot ; & gt ; Alert with HTML & lt ; / m d - b u t t o n & g t ;
< / code-block >
< code-block lang = "javascript" >
export default {
data : ( ) = & gt ; ( {
alert : {
content : & apos ; Your post has been deleted ! & apos ; ,
ok : & apos ; Cool ! & apos ;
} ,
alert2 : {
title : & apos ; Post created ! & apos ; ,
contentHtml : & apos ; Your post & lt ; strong & gt ; Material Design is awesome & lt ; / s t r o n g & g t ; h a s b e e n c r e a t e d . & a p o s ;
}
} ) ,
methods : {
openDialog ( ref ) {
this . $refs [ ref ] . open ( ) ;
} ,
closeDialog ( ref ) {
this . $refs [ ref ] . close ( ) ;
} ,
onOpen ( ) {
console . log ( & apos ; Opened & apos ; ) ;
} ,
onClose ( type ) {
console . log ( & apos ; Closed & apos ; , type ) ;
}
}
} ;
< / code-block >
< / div >
< / example-box >
< example-box card -title = " Confirm " >
< div slot = "demo" >
< md-dialog-confirm
: md - title = "confirm.title"
: md - content - html = "confirm.contentHtml"
: md - ok - text = "confirm.ok"
: md - cancel - text = "confirm.cancel"
@ open = "onOpen"
@ close = "onClose"
ref = "dialog5" >
< / md-dialog-confirm >
< md-button class = "md-primary md-raised" @click ="openDialog('dialog5')" > Confirm < / md -button >
< / div >
< div slot = "code" >
< code-block lang = "xml" >
& lt ; md - dialog - confirm
: md - title = & quot ; confirm . title & quot ;
: md - content - html = & quot ; confirm . contentHtml & quot ;
: md - ok - text = & quot ; confirm . ok & quot ;
: md - cancel - text = & quot ; confirm . cancel & quot ;
@ open = & quot ; onOpen & quot ;
@ close = & quot ; onClose & quot ;
ref = & quot ; dialog5 & quot ; & gt ;
& lt ; / m d - d i a l o g - c o n f i r m & g t ;
& lt ; md - button class = & quot ; md - primary md - raised & quot ; @ click = & quot ; openDialog ( & apos ; dialog5 & apos ; ) & quot ; & gt ; Confirm & lt ; / m d - b u t t o n & g t ;
< / code-block >
< code-block lang = "javascript" >
export default {
data : ( ) = & gt ; ( {
confirm : {
title : & apos ; Use Google \ & apos ; s location service ? & apos ; ,
contentHtml : & apos ; Let Google help apps determine location . & lt ; br & gt ; This means sending & lt ; strong & gt ; anonymous & lt ; / s t r o n g & g t ; l o c a t i o n d a t a t o G o o g l e , e v e n w h e n n o a p p s a r e r u n n i n g . & a p o s ; ,
ok : & apos ; Agree & apos ; ,
cancel : & apos ; Disagree & apos ;
}
} ) ,
methods : {
openDialog ( ref ) {
this . $refs [ ref ] . open ( ) ;
} ,
closeDialog ( ref ) {
this . $refs [ ref ] . close ( ) ;
} ,
onOpen ( ) {
console . log ( & apos ; Opened & apos ; ) ;
} ,
onClose ( type ) {
console . log ( & apos ; Closed & apos ; , type ) ;
}
}
} ;
< / code-block >
< / div >
< / example-box >
< example-box card -title = " Prompt " >
< div slot = "demo" >
< md-dialog-prompt
: md - title = "prompt.title"
: md - ok - text = "prompt.ok"
: md - cancel - text = "prompt.cancel"
: md - input - id = "prompt.id"
: md - input - name = "prompt.name"
: md - input - maxlength = "prompt.maxlength"
: md - input - placeholder = "prompt.placeholder"
v - model = "prompt.value"
@ open = "onOpen"
@ close = "onClose"
ref = "dialog6" >
< / md-dialog-prompt >
< md-button class = "md-primary md-raised" @click ="openDialog('dialog6')" > Prompt < / md -button >
< / div >
< div slot = "code" >
< code-block lang = "xml" >
2016-12-06 00:49:47 +00:00
& lt ; md - dialog - prompt
: md - title = & quot ; prompt . title & quot ;
: md - ok - text = & quot ; prompt . ok & quot ;
: md - cancel - text = & quot ; prompt . cancel & quot ;
2016-11-25 19:10:40 +00:00
@ open = & quot ; onOpen & quot ;
@ close = & quot ; onClose & quot ;
2016-12-06 00:49:47 +00:00
ref = & quot ; dialog6 & quot ; & gt ;
& lt ; / m d - d i a l o g - p r o m p t & g t ;
2016-11-25 19:10:40 +00:00
2016-12-06 00:49:47 +00:00
& lt ; md - button class = & quot ; md - primary md - raised & quot ; @ click = & quot ; openDialog ( & apos ; dialog6 & apos ; ) & quot ; & gt ; Prompt & lt ; / m d - b u t t o n & g t ;
2016-11-25 19:10:40 +00:00
< / code-block >
< code-block lang = "javascript" >
export default {
data : ( ) = & gt ; ( {
prompt : {
title : & apos ; What \ & apos ; s your name ? & apos ; ,
ok : & apos ; Done & apos ; ,
cancel : & apos ; Cancel & apos ; ,
id : & apos ; name & apos ; ,
name : & apos ; name & apos ; ,
placeholder : & apos ; Type your name ... & apos ; ,
maxlength : 30 ,
value : & apos ; & apos ;
}
} ) ,
methods : {
openDialog ( ref ) {
this . $refs [ ref ] . open ( ) ;
} ,
closeDialog ( ref ) {
this . $refs [ ref ] . close ( ) ;
} ,
onOpen ( ) {
console . log ( & apos ; Opened & apos ; ) ;
} ,
onClose ( type ) {
console . log ( & apos ; Closed & apos ; , type ) ;
}
}
} ;
< / code-block >
< / div >
< / example-box >
< / div >
< / docs-component >
< / page-content >
2016-11-16 19:56:26 +00:00
< / template >
2017-01-08 17:50:26 +00:00
< style lang = "sass" scoped >
2016-11-25 19:10:40 +00:00
. dialog - fab {
height : 200 px ;
}
2016-11-16 19:56:26 +00:00
< / style >
< script >
export default {
2016-11-22 02:26:10 +00:00
data : ( ) => ( {
2016-11-22 03:23:40 +00:00
alert : {
content : 'Your post has been deleted!' ,
ok : 'Cool!'
} ,
2016-11-25 19:10:40 +00:00
alert2 : {
title : 'Post created!' ,
contentHtml : 'Your post <strong>Material Design is awesome</strong> has been created.'
} ,
2016-11-22 02:26:10 +00:00
confirm : {
title : 'Use Google\'s location service?' ,
2016-11-22 03:34:29 +00:00
contentHtml : 'Let Google help apps determine location. <br> This means sending <strong>anonymous</strong> location data to Google, even when no apps are running.' ,
2016-11-22 02:26:10 +00:00
ok : 'Agree' ,
cancel : 'Disagree'
2016-11-22 02:37:59 +00:00
} ,
2016-11-22 03:23:40 +00:00
prompt : {
title : 'What\'s your name?' ,
ok : 'Done' ,
cancel : 'Cancel' ,
id : 'name' ,
name : 'name' ,
placeholder : 'Type your name...' ,
maxlength : 30 ,
value : ''
2016-11-22 02:26:10 +00:00
}
} ) ,
2016-11-16 19:56:26 +00:00
methods : {
2016-11-17 05:08:40 +00:00
openDialog ( ref ) {
this . $refs [ ref ] . open ( ) ;
2016-11-16 19:56:26 +00:00
} ,
2016-11-17 05:08:40 +00:00
closeDialog ( ref ) {
this . $refs [ ref ] . close ( ) ;
2016-11-22 02:26:10 +00:00
} ,
onOpen ( ) {
console . log ( 'Opened' ) ;
} ,
onClose ( type ) {
console . log ( 'Closed' , type ) ;
2016-11-16 19:56:26 +00:00
}
}
} ;
< / script >