File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ export default {
1414 prompt : Object ,
1515 options : Object ,
1616 ok : {
17- type : Boolean ,
17+ type : [ String , Boolean ] ,
1818 default : true
1919 } ,
20- cancel : Boolean ,
20+ cancel : [ String , Boolean ] ,
2121 stackButtons : Boolean ,
2222 preventClose : Boolean ,
2323 position : String ,
@@ -107,6 +107,16 @@ export default {
107107 computed : {
108108 hasForm ( ) {
109109 return this . prompt || this . options
110+ } ,
111+ okLabel ( ) {
112+ return this . ok === true
113+ ? 'OK'
114+ : this . ok
115+ } ,
116+ cancelLabel ( ) {
117+ return this . cancel === true
118+ ? 'Cancel'
119+ : this . cancel
110120 }
111121 } ,
112122 methods : {
@@ -187,13 +197,13 @@ export default {
187197
188198 if ( this . cancel ) {
189199 child . push ( h ( QBtn , {
190- props : { color : this . color , flat : true , label : 'Cancel' } ,
200+ props : { color : this . color , flat : true , label : this . cancelLabel } ,
191201 on : { click : this . __onCancel }
192202 } ) )
193203 }
194204 if ( this . ok ) {
195205 child . push ( h ( QBtn , {
196- props : { color : this . color , flat : true , label : 'OK' } ,
206+ props : { color : this . color , flat : true , label : this . okLabel } ,
197207 on : { click : this . __onOk }
198208 } ) )
199209 }
You can’t perform that action at this time.
0 commit comments