Vs codenew code snippet Vue base code

Time:2021-9-19

Create a new code snippet for Vue using vscode

When learning each knowledge point of Vue, you need to create a new Vue basic code every time, and then use the code fragment of vscode, so you don’t have to copy the code every time

  1. Open vscode
  2. Click menu code = “preferences =” user code snippet
  3. Select html.json, copy the following code, save and close
  4. After creating a new HTML file, enter VH and click tab to paste the code
    *Bootstrap is introduced by default

    {
    "vh": {
        "Prefix": "VH", // enter the triggered keyword VH and press tab
        "body": [
            "<!DOCTYPE html>",
            "<html lang=\"en\">",
            "<head>",
            "    <meta charset=\"UTF-8\">",
            "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
            "    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
            "    <title>Document</title>",
            "    <script src=\"https://cdn.jsdelivr.net/npm/vue\"></script>",
            "    <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\">",
            "</head>",
            "<body>",
            "    <div id=\"app\"></div>",
            "    <script>",
            "        var vm=new Vue({",
            "           el:'#app',",
            "           data:{},",
            "           methods:{}",
            "        });",
            "    Vue.config.devtools = true",
            "    </script>",
            "</body>",
            "</html>",
        ],
        "description": "vh components"
    }

}

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Purple smoke from sunshine censer

Recommended Today

A detailed explanation of the differences between Perl and strawberry Perl and ActivePerl

Perl is the abbreviation of practical extraction and report language “practical report extraction language”. Application of activestateperl and strawberry PERL on Windows platformcompiler。 Perl   The relationship between the latter two is that C language and Linux system have their own GCC. The biggest difference between activestate Perl and strawberry Perl is that strawberry Perl […]