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

Summary of 7 reasons why Docker is not suitable for deploying databases

Docker has been very popular in the past two year...

A brief understanding of the differences between MySQL InnoDB and MyISAM

Preface MySQL supports many types of tables (i.e....

Website User Experience Design (UE)

I just saw a post titled "Flow Theory and Des...

Sharing some details about MySQL indexes

A few days ago, a colleague asked me a question a...

Command to view binlog file creation time in Linux

Table of contents background analyze method backg...

Markup Language - List

Standardized design solutions - markup languages ...

Implementation of Redis master-slave cluster based on Docker

Table of contents 1. Pull the Redis image 2. Crea...

Network configuration of Host Only+NAT mode under VirtualBox

The network configuration of Host Only+NAT mode u...

JavaScript data flattening detailed explanation

Table of contents What is Flattening recursion to...

Summary of @ usage in CSS (with examples and explanations)

An at-rule is a declaration that provides instruc...

Basic Implementation of AOP Programming in JavaScript

Introduction to AOP The main function of AOP (Asp...

Should nullable fields in MySQL be set to NULL or NOT NULL?

People who often use MySQL may encounter the foll...

What are the file attributes of crw, brw, lrw, etc. in Linux?

What is a file? All files are actually a string o...

MySQL 5.7.18 installation and configuration method graphic tutorial (CentOS7)

How to install MySQL 5.7.18 on Linux 1. Download ...