Vue basic introduction notes 05: V-for, V-IF


Vue basic introduction notes 05

  1. V-IF deletes or creates elements every time
  2. V-show every display: none or block

    <!DOCTYPE html>
    <html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src=""></script>
    <div id="app">
        < button @ Click = "show =! Show" > button < / button >
        <!--  V-IF deletes or creates elements every time -- >
        <p v-if='show'>show</p>
        <!--  Every time display: none or block -- >
        <p v-show='show'>show</p>
        var vm=new Vue({

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 […]