设置全局代码片段
{
"Print to console": {
"prefix": "vue3",
"body": [
clo:"console.log('$1',$1);", //clo快捷键打印
"<template>",
" <div></div>",
"</template>",
"",
"<script setup lang=\"ts\">",
"import { ref, reactive, toRefs, onMounted,watch,computed,getCurrentInstance} from 'vue'",
"import { ElMessageBox, ElMessage, ElLoading } from 'element-plus'",
"import { dateFormat } from '/@/utils/TuiGuang/methods';",
"import { useRouter } from 'vue-router'",
"",
"const state = reactive({",
"",
"})",
"const { proxy } = getCurrentInstance() as any",
"watch( () => state, (newValue, oldValue) => {",
"",
"},{deep:true});",
"const a = computed(() => {",
" return",
"});",
"</script>",
"<style scoped lang=\"scss\">",
"</style>",
],
"description": "clo output to console"
}
}
el-form
{
"Print to console": {
"prefix": "el-form",
"body": [
"<el-form ref=\"form\" :model=\"form\" label-width=\"80px\">",
" <el-form-item label=\"活动名称\" prop=\"\">",
" <el-input v-model='form.name'></el-input>",
" </el-form-item>",
" <el-form-item label=\"活动区域\" prop=\"\">",
" <el-select v-model=\"form.region\" placeholder=\"请选择活动区域\">",
" <el-option label=\"区域一\" value=\"shanghai\"></el-option>",
" <el-option label=\"区域一\" value=\"shanghai\"></el-option>",
" </el-select>",
" </el-form-item>",
" <el-form-item>",
" <el-button type=\"primary\" @click=\"submitForm('ruleForm')\">立即创建</el-button>",
" <el-button @click=\"resetForm('ruleForm')\">重置</el-button>",
" </el-form-item>",
"</el-form>",
],
"description": "clo output to console"
}
}
el-pagination-v2
{
"Print to console": {
"prefix": "el-pagination-v2",
"body": [
"<el-pagination",
" @size-change=\"handleSizeChange\"",
" @current-change=\"handleCurrentChange\"",
" :current-page=\"search.curpage\"",
" :page-sizes=\"[10, 20, 50, 100]\"",
" :page-size=\"search.pagesize\"",
" layout=\"total, sizes, prev, pager, next, jumper\"",
" :total=\"total\">",
"</el-pagination>",
],
"description": "clo output to console"
}
}