vscodeユーザーコードフラグメント
2122 ワード
vueコードフラグメント(xxx.code-snippets(グローバル))
JavaScriptコードフラグメント(javascript.json)
// vue
{
"Print to console": {
"prefix": "vue",
"body": [
"",
"
",
" ",
"
",
"",
"export default {",
" name:\"$2\",",
" components: {},",
" props: {},",
" data() {",
" return {
",
" };",
" },",
" created() {},",
" mounted() {},",
" activited() {},",
" update() {},",
" beforeRouteUpdate() {},",
" methods: {
",
" },",
" filter: {},",
" computed: {},",
" watch: {},",
"};",
"
",
"
",
],
"description": "Create vue template"
}
}
JavaScriptコードフラグメント(javascript.json)
{
"Print to console": {
"prefix": "cs",
"body": [
"console.log($1)"
],
"description": " "
},
"validate Phone": {
"prefix": "vPhone",
"body": "var reg = /^1[34578]\d{9}$/",
"description": " "
},
"validate Telephone": {
"prefix": "vTel",
"body": "var reg = /^0\d{2,3}-?\d{7,8}$/",
"description": " "
},
"validate Password": {
"prefix": "vPassword",
"body": "var reg = /(?!^(\d+|[a-zA-Z]+|[~!@#$%^&*?]+)$)^[\w~!@#$%^&*?]+$/",
"description": " , , "
}
}