Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.8k views
in Technique[技术] by (71.8m points)

v-for中怎么判断渲染条件

怎么根据type类型 渲染 服务1和服务2其中的一个

<tr v-for="i in orderList">
    <td>{{i.billNum}}</td>
    
    <td v-if="i.type == 1">服务1</td>
    <td v-if="i.type == 2">服务2</td>
    
    <td>1000.00</td>
    <td>2020-10-10 12:30:30</td>
    <td>待支付</td>
    <td class="c-cz-td">
        <div class="call">
            <a href="">下载</a>
        </div>
    </td>
</tr>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

v-if v-else


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...