File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ const Base = defineComponent({
166
166
} ) ;
167
167
onMounted ( ( ) => {
168
168
state . clientRendered = true ;
169
+ syncEllipsis ( ) ;
169
170
} ) ;
170
171
171
172
onBeforeUnmount ( ( ) => {
@@ -180,7 +181,7 @@ const Base = defineComponent({
180
181
resizeOnNextFrame ( ) ;
181
182
} ) ;
182
183
} ,
183
- { flush : 'post' , deep : true , immediate : true } ,
184
+ { flush : 'post' , deep : true } ,
184
185
) ;
185
186
186
187
watchEffect ( ( ) => {
@@ -296,7 +297,12 @@ const Base = defineComponent({
296
297
) ;
297
298
298
299
// ============== Ellipsis ==============
299
- function resizeOnNextFrame ( ) {
300
+ function resizeOnNextFrame ( sizeInfo ?: { width : number ; height : number } ) {
301
+ if ( sizeInfo ) {
302
+ const { width, height } = sizeInfo ;
303
+ if ( ! width || ! height ) return ;
304
+ }
305
+
300
306
raf . cancel ( state . rafId ) ;
301
307
state . rafId = raf ( ( ) => {
302
308
// Do not bind `syncEllipsis`. It need for test usage on prototype
You can’t perform that action at this time.
0 commit comments