Vscoded->首选项->用户代码片段
{ "Print to console": { "prefix": "vue3", "body": [ "<template>", " <div></div>", "</template>", "", "<script lang='ts' scope>", "import { reactive, toRefs, onBeforeMount, onMounted } from 'vue'", " const data = reactive({})", " onBeforeMount(() => {", " console.log('2.组件挂载页面之前执行----onBeforeMount')", " })", " onMounted(() => {", " console.log('3.-组件挂载到页面之后执行-------onMounted')", " })", "", "</script>", "<style scoped lang='less'>", "</style>", ], "description": "Log output to console" } }
本文作者:宁骑
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!