@@ -25,28 +25,34 @@ const CModal = defineComponent({
25
25
*/
26
26
alignment : {
27
27
default : 'top' ,
28
- required : false ,
29
28
validator : ( value : string ) => {
30
29
return [ 'top' , 'center' ] . includes ( value )
31
30
} ,
32
31
} ,
33
32
/**
34
33
* Apply a backdrop on body while offcanvas is open.
35
34
*
36
- * @values 'static'
35
+ * @values boolean | 'static'
37
36
*/
38
37
backdrop : {
39
38
type : [ Boolean , String ] ,
40
39
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
+ } ,
42
49
} ,
43
50
/**
44
51
* A string of all className you want applied to the modal content component.
45
52
*/
46
53
contentClassName : {
47
54
type : String ,
48
55
default : undefined ,
49
- required : false ,
50
56
} ,
51
57
/**
52
58
* Set modal to covers the entire user viewport
@@ -56,7 +62,6 @@ const CModal = defineComponent({
56
62
fullscreen : {
57
63
type : [ Boolean , String ] ,
58
64
default : undefined ,
59
- required : false ,
60
65
validator : ( value : boolean | string ) => {
61
66
if ( typeof value == 'string' ) {
62
67
return [ 'sm' , 'md' , 'lg' , 'xl' , 'xxl' ] . includes ( value )
@@ -73,14 +78,12 @@ const CModal = defineComponent({
73
78
keyboard : {
74
79
type : Boolean ,
75
80
default : true ,
76
- required : false ,
77
81
} ,
78
82
/**
79
83
* Create a scrollable modal that allows scrolling the modal body.
80
84
*/
81
85
scrollable : {
82
86
type : Boolean ,
83
- required : false ,
84
87
} ,
85
88
/**
86
89
* Size the component small, large, or extra large.
@@ -90,7 +93,6 @@ const CModal = defineComponent({
90
93
size : {
91
94
type : String ,
92
95
default : undefined ,
93
- required : false ,
94
96
validator : ( value : string ) => {
95
97
return [ 'sm' , 'lg' , 'xl' ] . includes ( value )
96
98
} ,
@@ -101,15 +103,13 @@ const CModal = defineComponent({
101
103
transition : {
102
104
type : Boolean ,
103
105
default : true ,
104
- required : false ,
105
106
} ,
106
107
/**
107
108
* By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
108
109
*/
109
110
unmountOnClose : {
110
111
type : Boolean ,
111
112
default : true ,
112
- required : false ,
113
113
} ,
114
114
/**
115
115
* Toggle the visibility of alert component.
0 commit comments