1 Star 0 Fork 0

amiko / articles

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
vue if-else.md 572 Bytes
Copy Edit Web IDE Raw Blame History
caihaifei authored 2021-03-16 18:01 . update.

Vue v-if以及 v-else 的使用

使用



<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <p v-if="show">显示IF分支</p>
            <p v-else>IF分支隐藏了</p>
        </div>
    </body>
    <script>
        new Vue({
            el:'#app',
            data:{
                show:true,
            }
        })
    </script>

显示

显示IF分支

Comment ( 0 )

Sign in to post a comment

1
https://gitee.com/amiko/articles.git
git@gitee.com:amiko/articles.git
amiko
articles
articles
master

Search

101014 b92fc32e 1850385 101014 af024cb7 1850385