vsCode generates vue templates with one click

vsCode generates vue templates with one click

1. Use the shortcut Ctrl + Shift + P to call out the console

2, then enter "snippets" and select

2. Then enter vue,

vs code automatically generates the vue.json file.

3. Change the vue.json file to the following template (you can modify the template content according to your personal needs)

{
      
        "Print to console": {
            "prefix": "vue",
            "body": [
                "<template>",
                " <div">$0</div>",
                "</template>",
                "",
                "<script>",
                "export default {",
                "components: {},",
                " props: {},",
                " data() {",
                " return {",
                " };",
                " },",
                "watch: {},",
                " computed: {},",
                " methods: {}, ",
                " created() {},",
                "mounted() {}",
                "};",
                "</script>",
                "<style lang=\"scss\" scoped>",
                "</style>"
            ],
            "description": "A vue file template"
        }
    }

Then create a new vue file, enter "vue", press the Enter key or Tab key, and the template will be automatically generated:

This is the end of this article about vsCode generating vue templates with one click. For more relevant vsCode generating vue templates, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • VSCode writes vue project to generate .vue template with one click, and modifies the method of defining other templates

<<:  Install Linux rhel7.3 operating system on virtual machine (specific steps)

>>:  getdata table table data join mysql method

Recommend

Detailed explanation of Vue px to rem configuration

Table of contents Method 1 1. Configuration and i...

HTML+CSS to achieve charging water drop fusion special effects code

Table of contents Preface: accomplish: Summarize:...

Minimalistic website design examples

Web Application Class 1. DownForEveryoneOrJustMe ...

Details of various font formats in HTML web pages

This section starts with the details of text modi...

Installation tutorial of docker in linux

The Docker package is already included in the def...

Windows Server 2008 Tutorial on Monitoring Server Performance

Next, we will learn how to monitor server perform...

Three.js sample code for implementing dewdrop animation effect

Preface Hello everyone, this is the CSS wizard - ...

MySQL permission control details analysis

Table of contents 1. Global level 2. Database lev...

Detailed explanation of pure SQL statement method based on JPQL

JPQL stands for Java Persistence Query Language. ...

linux No space left on device 500 error caused by inode fullness

What is an inode? To understand inode, we must st...