{
"setup111": {
"prefix": "setup111",
"body": [
"<template>",
"\t<div>",
"\t",
"\t</div>",
"</template>",
"<script setup>",
"import { useRouter } from 'vue-router'",
"const router = useRouter()",
"const { ctx, proxy } = getCurrentInstance()",
"const emit = defineEmits(['update:modelValue'])",
"const props = defineProps({",
" propData: {",
" type: String,",
" default: '',",
" },",
"})",
"const {data} = toRefs(reactive({",
" //定义数组和对象",
" data:''",
" }))",
"const data2 = ref('')//定义普通类型",
"// onMounted(() => {})",
"// watch(propData,(newVal,oldVal)=>{})",
"</script>",
"",
"<style scoped>",
"\t",
"</style>"
],
"description": "vue3语法糖"
}
}
vscode中设置setup语法糖代码片段
最新推荐文章于 2024-05-30 11:27:58 发布