Vue3中的生命周期里面的内容可以拆开在多个相同生命周期里面写吗?
在我的Vue3的项目里,我发现可以写多个相同生命周期方法,未见冲突的报错:
import { onUnmounted } from 'vue';
onUnmounted(() => {
if (protyleInstance) {
protyleInstance = null;
}
});
onUnmounted(() => {
console.log('Component unmounted, unbinding hotkey');
hotkeys.unbind('command+option+a', handleCmdOptA);
});