Element tabs 切换组件钩子函数未调用
分析原因应该是点击切换标签页时,组件没有销毁。
解决办法:给组件添加 v-if
判断,使组件真正的创建和销毁。然后就在组件中定义的 mounted
和 destoryed
钩子函数就可以被正常调用了。
1 | <template> |
分析原因应该是点击切换标签页时,组件没有销毁。
解决办法:给组件添加 v-if
判断,使组件真正的创建和销毁。然后就在组件中定义的 mounted
和 destoryed
钩子函数就可以被正常调用了。
1 | <template> |
Return the number (count) of vowels in the given string.
We will consider a, e, i, o, u as vowels for this Kata (but not y).
The input string will only consist of lower case letters and/or spaces.
includes()
方法1 | function getCount(str) { |