File tree Expand file tree Collapse file tree 16 files changed +16
-18
lines changed Expand file tree Collapse file tree 16 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ const TransButton = defineComponent({
68
68
onKeyup = { this . onKeyUp }
69
69
style = { { ...( ! noStyle ? inlineStyle : null ) } }
70
70
>
71
- { this . $slots . default && this . $slots . default ( ) }
71
+ { this . $slots . default ?. ( ) }
72
72
</ div >
73
73
) ;
74
74
} ,
Original file line number Diff line number Diff line change @@ -169,6 +169,6 @@ export default defineComponent({
169
169
if ( csp ) {
170
170
this . csp = csp ;
171
171
}
172
- return this . $slots . default && this . $slots . default ( ) [ 0 ] ;
172
+ return this . $slots . default ?. ( ) [ 0 ] ;
173
173
} ,
174
174
} ) ;
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ const Affix = defineComponent({
258
258
>
259
259
< div { ...props } style = { placeholderStyle } ref = "placeholderNode" >
260
260
< div class = { className } ref = "fixedNode" style = { affixStyle } >
261
- { $slots . default && $slots . default ( ) }
261
+ { $slots . default ?. ( ) }
262
262
</ div >
263
263
</ div >
264
264
</ ResizeObserver >
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ export default defineComponent({
283
283
< div class = { `${ prefixCls } -ink` } >
284
284
< span class = { inkClass } ref = "inkNode" />
285
285
</ div >
286
- { $slots . default && $slots . default ( ) }
286
+ { $slots . default ?. ( ) }
287
287
</ div >
288
288
</ div >
289
289
) ;
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export default defineComponent({
82
82
>
83
83
{ title }
84
84
</ a >
85
- { $slots . default && $slots . default ( ) }
85
+ { $slots . default ?. ( ) }
86
86
</ div >
87
87
) ;
88
88
} ,
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ export default defineComponent({
118
118
}
119
119
: { } ;
120
120
121
- let children : VueNode = this . $slots . default && this . $slots . default ( ) ;
121
+ let children : VueNode = this . $slots . default ?. ( ) ;
122
122
if ( src && isImgExist ) {
123
123
children = (
124
124
< img src = { src } srcset = { srcset || srcSet } onError = { this . handleImgLoadError } alt = { alt } />
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ const BackTop = defineComponent({
93
93
} ;
94
94
95
95
const backTopBtn = this . visible ? (
96
- < div { ...divProps } > { ( $slots . default && $slots . default ( ) ) || defaultElement } </ div >
96
+ < div { ...divProps } > { $slots . default ?. ( ) || defaultElement } </ div >
97
97
) : null ;
98
98
const transitionProps = getTransitionProps ( 'fade' ) ;
99
99
return < Transition { ...transitionProps } > { backTopBtn } </ Transition > ;
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ const Drawer = defineComponent({
187
187
>
188
188
{ this . renderHeader ( prefixCls ) }
189
189
< div key = "body" class = { `${ prefixCls } -body` } style = { bodyStyle } >
190
- { this . $slots . default && this . $slots . default ( ) }
190
+ { this . $slots . default ?. ( ) }
191
191
</ div >
192
192
</ div >
193
193
) ;
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ const Select = defineComponent({
216
216
dropdownClassName = { rcSelectRtlDropDownClassName }
217
217
onChange = { triggerChange }
218
218
>
219
- { slots . default && slots . default ( ) }
219
+ { slots . default ?. ( ) }
220
220
</ RcSelect >
221
221
) ;
222
222
} ,
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export default defineComponent({
43
43
[ `${ prefixCls } -reverse` ] : ! ! reverse ,
44
44
[ `${ prefixCls } -${ mode } ` ] : ! ! mode ,
45
45
} ) ;
46
- const children = filterEmpty ( this . $slots . default && this . $slots . default ( ) ) ;
46
+ const children = filterEmpty ( this . $slots . default ?. ( ) ) ;
47
47
// // Remove falsy items
48
48
// const falsylessItems = filterEmpty(this.$slots.default)
49
49
// const items = falsylessItems.map((item, idx) => {
You can’t perform that action at this time.
0 commit comments