File tree 1 file changed +4
-24
lines changed
1 file changed +4
-24
lines changed Original file line number Diff line number Diff line change 76
76
hasContent: false ,
77
77
MdTabs: {
78
78
items: {}
79
- },
80
- alignmentChanging: false
79
+ }
81
80
}),
82
81
provide () {
83
82
return {
113
112
mdActiveTab (tab ) {
114
113
this .activeTab = tab
115
114
this .$emit (' md-changed' , tab)
116
- },
117
- mdAlignment () {
118
- if (this .alignmentChanging ) {
119
- return false
120
- }
121
-
122
- this .alignmentChanging = true
123
-
124
- this .$nextTick ().then (() => {
125
- let cb = event => {
126
- if (event .propertyName !== ' min-width' ) {
127
- return false
128
- }
129
-
130
- this .$refs .navigation .removeEventListener (' transitionend' , cb)
131
- this .setIndicatorStyles ()
132
- this .alignmentChanging = false
133
- }
134
-
135
- this .$refs .navigation .addEventListener (' transitionend' , cb)
136
- })
137
-
138
115
}
139
116
},
140
117
methods: {
283
260
this .setupWatchers ()
284
261
}, 100 )
285
262
})
263
+
264
+ this .$refs .navigation .addEventListener (' transitionend' , this .setIndicatorStyles )
286
265
},
287
266
beforeDestroy () {
288
267
if (this .resizeObserver ) {
289
268
this .resizeObserver .disconnect ()
290
269
}
291
270
292
271
window .removeEventListener (' resize' , this .setIndicatorStyles )
272
+ this .$refs .navigation .removeEventListener (' transitionend' , this .setIndicatorStyles )
293
273
}
294
274
})
295
275
</script >
You can’t perform that action at this time.
0 commit comments