@@ -25,28 +25,34 @@ const CModal = defineComponent({
2525 */
2626 alignment : {
2727 default : 'top' ,
28- required : false ,
2928 validator : ( value : string ) => {
3029 return [ 'top' , 'center' ] . includes ( value )
3130 } ,
3231 } ,
3332 /**
3433 * Apply a backdrop on body while offcanvas is open.
3534 *
36- * @values 'static'
35+ * @values boolean | 'static'
3736 */
3837 backdrop : {
3938 type : [ Boolean , String ] ,
4039 default : true ,
41- require : false ,
40+ validator : ( value : boolean | string ) => {
41+ if ( typeof value == 'string' ) {
42+ return [ 'static' ] . includes ( value )
43+ }
44+ if ( typeof value == 'boolean' ) {
45+ return true
46+ }
47+ return false
48+ } ,
4249 } ,
4350 /**
4451 * A string of all className you want applied to the modal content component.
4552 */
4653 contentClassName : {
4754 type : String ,
4855 default : undefined ,
49- required : false ,
5056 } ,
5157 /**
5258 * Set modal to covers the entire user viewport
@@ -56,7 +62,6 @@ const CModal = defineComponent({
5662 fullscreen : {
5763 type : [ Boolean , String ] ,
5864 default : undefined ,
59- required : false ,
6065 validator : ( value : boolean | string ) => {
6166 if ( typeof value == 'string' ) {
6267 return [ 'sm' , 'md' , 'lg' , 'xl' , 'xxl' ] . includes ( value )
@@ -73,14 +78,12 @@ const CModal = defineComponent({
7378 keyboard : {
7479 type : Boolean ,
7580 default : true ,
76- required : false ,
7781 } ,
7882 /**
7983 * Create a scrollable modal that allows scrolling the modal body.
8084 */
8185 scrollable : {
8286 type : Boolean ,
83- required : false ,
8487 } ,
8588 /**
8689 * Size the component small, large, or extra large.
@@ -90,7 +93,6 @@ const CModal = defineComponent({
9093 size : {
9194 type : String ,
9295 default : undefined ,
93- required : false ,
9496 validator : ( value : string ) => {
9597 return [ 'sm' , 'lg' , 'xl' ] . includes ( value )
9698 } ,
@@ -101,15 +103,13 @@ const CModal = defineComponent({
101103 transition : {
102104 type : Boolean ,
103105 default : true ,
104- required : false ,
105106 } ,
106107 /**
107108 * By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
108109 */
109110 unmountOnClose : {
110111 type : Boolean ,
111112 default : true ,
112- required : false ,
113113 } ,
114114 /**
115115 * Toggle the visibility of alert component.
0 commit comments