Home > Development Tools > VSCode > Introduction to how to quickly create vue file templates using VSCode

Introduction to how to quickly create vue file templates using VSCode

青灯夜游
Release: 2021-02-03 18:51:40
forward
3612 people have browsed it

How to customize code template in VSCode? The following article will introduce to you VSCodeHow to quickly create a vue file template. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Introduction to how to quickly create vue file templates using VSCode

Related recommendations: "vscode Basic Tutorial"

Modify location

Open vscode preferences-user snippets, you can search for existing file names, or create a new json file.

Create a custom template

{
"Print to console": {
"prefix": "ybase",
"body": [
"<template>",
"  <div>",
"    <!-- Page -->",
"  </div>",
"</template>",
"<script lang=\"ts\">",
"import { Vue, Component } from \"vue-property-decorator\";",
"",
"@Component({})",
"export default class NAME extends Vue {",
"  // component",
"}",
"</script>",
"<style lang=\"scss\">",
"// style",
"</style>",
""
],
"description": "YBASE"
}
}
Copy after login

Usage method

Above What I created is to quickly create a vue file template.
After creating a new page, you can quickly generate the page code through the configured shortcut command "ybase".

For more programming-related knowledge, please visit: Introduction to Programming! !

The above is the detailed content of Introduction to how to quickly create vue file templates using VSCode. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template