{
"Print to console": {
"prefix": "vue3.2",
"body": [
"<template>",
" <div $1></div>",
"</template>",
"",
"<script setup lang='ts'>",
// "import { ref, reactive, toRefs, onBeforeMount, onMounted, watchEffect, computed } from 'vue';",
// "import { useStore } from 'vuex';",
// "import { useRoute, useRouter } from 'vue-router';",
// "/**",
// "* 仓库",
// "*/",
// "const store = useStore();",
// "/**",
// "* 路由对象",
// "*/",
// "const route = useRoute();",
// "/**",
// "* 路由实例",
// "*/",
// "const router = useRouter();",
// "//console.log('1-开始创建组件-setup')",
// "/**",
// "* 数据部分",
// "*/",
// "const data = reactive({})",
// "onBeforeMount(() => {",
// " //console.log('2.组件挂载页面之前执行----onBeforeMount')",
// "})",
// "onMounted(() => {",
// " //console.log('3.-组件挂载到页面之后执行-------onMounted')",
// "})",
// "watchEffect(()=>{",
// "})",
// "// 使用toRefs解构",
// "// let { } = { ...toRefs(data) } ",
// "defineExpose({",
// " ...toRefs(data)",
// "})",
// "",
"",
"</script>",
"<style scoped lang='less'>",
"",
"</style>"
],
"description": "Log output to console"
}
}
vue3.2快速生成模板
猜你喜欢
转载自blog.csdn.net/picktheshy/article/details/130763677
今日推荐
周排行