html.json
{// Place your snippets for html here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected.// Example:// "Print to console": {// "prefix": "log",// "body": [// "console.log('$1');",// "$2"// ],// "description": "Log output to console"// }"script":{"prefix":"sci","body":["<script>","\t$1","</script>"],"description":"script"},"style":{"prefix":"sty","body":["<style>","\t$1","</style>"],"description":"style"},"function":{"prefix":"fun","body":["function(){","\t$1","}"],"description":"function"},"script(text/html)":{"prefix":"my_temp","body":["<script id=\"$1\" type=\"text/html\">","\t","</script>"],"description":"模板引擎"},"axios(config)":{"prefix":"as","body":["<div id='app'>","\t","</div>","<script src='./vue.js'></script>","<script src='./axios.js'></script>","<script>","\tnew Vue({","\t\tel:'#app',","\t\tdata:{","\t\t},","\t\tmethods: {","\t\t},","\t});","</script>"],"description":"axios(config配置模式使用)"},"vue(实例化)":{"prefix":"vue","body":["<div id='app'>","\t","</div>","<script src='./vue.js'></script>","<script>","\tnew Vue({","\t\tel:'#app',","\t\tdata:{","\t\t},","\t\tmethods: {","\t\t},","\t});","</script>"],"description":"vue(实例化)"},}
javascript.json
{// Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected.// Example:// "Print to console": {// "prefix": "log",// "body": [// "console.log('$1');",// "$2"// ],// "description": "Log output to console"// }"Print to console":{"prefix":"lg","body":["console.log('$1');"],"description":"Log output to console"},"Print to console in vue":{"prefix":"wlg","body":["window.console.log('$1');"],"description":"在vue中打印"},"window onload":{"prefix":"wod","body":["window.onload = function () {","\t$1","}"],"description":"window onload"},"document.getElementById":{"prefix":"dgi","body":["document.getElementById('$1')"],"description":"document.getElementById"},"document.createElement":{"prefix":"dce","body":["document.createElement('$1')"],"description":"document.createElement"},"$(function ()":{"prefix":"$f","body":["$(function () {","\t$1","});"],"description":"$(function ()入口函数"},"$()":{"prefix":"$f","body":["$('$1')"],"description":"$()"},"function":{"prefix":"fun","body":["function(){","\t$1","}"],"description":"function"},"my_ajax_postHeader":{"prefix":"srh","body":["xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');"],"description":"原生js发送ajax的post请求,需要设置的请求头"},"my_jqajax_postHeader":{"prefix":"jqa","body":["$.ajax({","\turl: '$1',","\ttype: 'post',","\tdataType: 'json',","\tdata: {},","\tsuccess: function (data) {","","\t}","});"],"description":"jq中的ajax请求"},"my_picPreview":{"prefix":"pic","body":["$('上传文件的表单按钮').on('change',function(){","\tvar file = this.files[0];","\tvar url = URL.createObjectURL(file);","\t$('预览的图片img标签').attr('src',url);","});"],"description":"上传图片的预览"},"my_ajaxSubmit":{"prefix":"fd","body":["$('提交按钮').on('click', function (e) {","\te.preventDefault();","\tvar fd = new FormData($('提交的form表单')[0]);","\t$.ajax({","\t\turl: '',","\t\ttype: 'post',","\t\tdataType: 'json',","\t\tdata: fd,","\t\tcontentType: false,","\t\tprocessData: false,","\t\tsuccess: function (data) {","\t\t\t","\t\t}","\t});","});"],"description":"fd形式提交"},"server_setHeader":{"prefix":"acao","body":["res.setHeader('Access-Control-Allow-Origin','*');"],"description":"服务端设置响应头,解决跨域问题"},"function description":{"prefix":"my_com","body":["/**","* @description:","* @param {type}","* @return:","*/"],"description":"函数注释"},"vue-router(路由配置)":{"prefix":"vue-router","body":["import Vue from 'vue'","import App from './App.vue'","import VueRouter from 'vue-router'","Vue.use(VueRouter)","const router = new VueRouter({","\troutes: [","\t\t{}","\t]","});","Vue.config.productionTip = false","new Vue({","\trouter,","\trender: h => h(App),","}).$mount('#app');"],"description":"vue-router(路由配置)"},"解决vue中的NavigationDuplicated(导航重复)":{"prefix":"vue-NavigationDuplicated","body":["const originalPush = VueRouter.prototype.push","VueRouter.prototype.push = function push(location) {","\treturn originalPush.call(this, location).catch(err => err)","}",],"description":"路由重复"},}
vue.json
{// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected.// Example:// "Print to console": {// "prefix": "log",// "body": [// "console.log('$1');",// "$2"// ],// "description": "Log output to console"// }"vue of base":{"prefix":"vue","body":["<template>","\t<div>","\t</div>","</template>","<script>","export default {};","</script>","<style>","</style>"],"description":"vue基本模板"}}