File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export default defineComponent({
107
107
}
108
108
keyMapStore . value = newKeyMapStore ;
109
109
} ,
110
- { immediate : true } ,
110
+ { flush : 'post' } ,
111
111
) ;
112
112
watchEffect ( ( ) => {
113
113
if ( props . activeKey !== undefined ) {
@@ -209,12 +209,17 @@ export default defineComponent({
209
209
{ immediate : true } ,
210
210
) ;
211
211
212
+ let timeout : number ;
212
213
const changeActiveKeys = ( keys : Key [ ] ) => {
213
- if ( props . activeKey === undefined ) {
214
- activeKeys . value = keys ;
215
- }
216
- emit ( 'update:activeKey' , keys [ keys . length - 1 ] ) ;
214
+ window . clearTimeout ( timeout ) ;
215
+ timeout = window . setTimeout ( ( ) => {
216
+ if ( props . activeKey === undefined ) {
217
+ activeKeys . value = keys ;
218
+ }
219
+ emit ( 'update:activeKey' , keys [ keys . length - 1 ] ) ;
220
+ } ) ;
217
221
} ;
222
+
218
223
const disabled = computed ( ( ) => ! ! props . disabled ) ;
219
224
const isRtl = computed ( ( ) => direction . value === 'rtl' ) ;
220
225
const mergedMode = ref < MenuMode > ( 'vertical' ) ;
@@ -389,10 +394,8 @@ export default defineComponent({
389
394
) ) ;
390
395
const overflowedIndicator = < EllipsisOutlined /> ;
391
396
392
- // data-hack-store-update 初步判断是 vue bug,先用hack方式
393
397
return (
394
398
< Overflow
395
- data-hack-store-update = { store . value }
396
399
prefixCls = { `${ prefixCls . value } -overflow` }
397
400
component = "ul"
398
401
itemComponent = { MenuItem }
You can’t perform that action at this time.
0 commit comments