Vue
Learn More →
<script setup>
import { onMounted } from 'vue'
onMounted(() => {
console.log(`the component is now mounted.`)
})
</script>
setTimeout(() => {
onMounted(() => {
//this won't work.
})
}, 100)
所有的 api: https://vuejs.org/api/composition-api-lifecycle.html
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up