vscode全局用户代码片段

 

设置全局代码片段

{
  "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"
	}
  }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值