zoukankan      html  css  js  c++  java
  • vue非空校验

    效果图

    实现代码

    //页面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
    		  	}
    
  • 相关阅读:
    树的可视化
    图的可视化
    1+1=2
    用xapian来做索引
    学习的快乐
    项目小结
    z=sin(xy)
    Min Stack
    互联网公司的文化
    为什么要读数学书
  • 原文地址:https://www.cnblogs.com/lml-lml/p/8969233.html
Copyright © 2011-2022 走看看