-
-
Save minskmaz/f02ffdcd89fc73c0a2dc9eb45e790ddd to your computer and use it in GitHub Desktop.
lifecycle events for a V3 single-file router component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="block"> | |
<a @click="openAlert" class="button">Open Alert</a> | |
</div> | |
</template> | |
<style scoped> | |
</style> | |
<script> | |
export default { | |
data: function () { | |
return { | |
title: "My Special Component", | |
} | |
}, | |
methods: { | |
openAlert: function () { | |
var self = this.$app.dialog.alert('Hello world!'); | |
}, | |
setMapObject: function(){ | |
console.log("setMapObject"); | |
} | |
}, | |
//render(){}, | |
beforeCreate(){ | |
console.log("beforeCreate"); | |
}, | |
created(){ | |
console.log("created"); | |
}, | |
beforeMount(){ | |
console.log("beforeMount"); | |
this.map.invalidateSize(); | |
}, | |
mounted(){ | |
console.log("mounted"); | |
}, | |
updated(){ | |
console.log("updated"); | |
}, | |
beforeDestroy(){ | |
console.log("beforeDestroy"); | |
}, | |
destroyed(){ | |
console.log("destroyed"); | |
}, | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment