Welcome to OStack Knowledge Sharing 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 Answer

0 votes
by (71.8m points)

v-if v-else


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...