效果图

1160762-20180428183033612-264622366.png

实现代码

//页面html
<div>
                <ul class="listinfo">
                    <li>
                        <span class="info">1.身份证正面照片</span>
                        <van-uploader :after-read="onRead" accept="image/gif, image/jpeg" multiple>
                            <div class="uploadimg">
                                <img class="card" src="../../assets/images/idcard1.png" />
                            </div>
                        </van-uploader>
                    </li>
                    <li>
                        <span class="info">2.身份证反面照片</span>
                        <van-uploader :after-read="onRead1" accept="image/gif, image/jpeg" multiple>
                            <div class="uploadimg">
                                <img class="cardback" src="../../assets/images/idcard1.png" />
                            </div>
                        </van-uploader>
                    </li>
                </ul>
                <div class="btn">
                    <van-button size="large" :disabled="disabled" @click="goSearch()">提交图片进行查询</van-button>    //给这个button绑定disabled属性
                </div>
            </div>
//js
    disabled: function() {
                let val;
                if(this.zheng == "" || this.fan == ""){
                    val = true
                }else{
                    val = false
                }
                return val
            }

转载于:https://www.cnblogs.com/lml-lml/p/8969233.html

Logo

前往低代码交流专区

更多推荐