在vue中使用input required属性不起作用
vue构建的项目,有个表单提交页,因为有文件提交,采取的formdata的提交方式
input的required属性不起作用,求问是哪里的问题
:
<form id= "uploadForm" name="regForm" enctype="multipart/form-data" >
<label class="ivu-form-item-label" style="width: 80px;">服务厂商</label>
<input type="text" name="bankName" v-model="input.input1" class="ivu-input" :disabled="isReadOnly" :required="true"><br>
<label class="ivu-form-item-label" style="width: 80px; position: relative;bottom: 100px;">厂商简介</label>
<textarea name="bankInfo" v-model="input.input2" class="ivu-text" :disabled="isReadOnly" required="required"></textarea><br>
<label class="ivu-form-item-label" style="width: 80px;">厂商人数</label>
<input type="text" name="peopleNumber" v-model="input.input3" class="ivu-input" :disabled="isReadOnly" required="required"><br>
<label class="ivu-form-item-label" style="width: 80px;">产品图片</label>
<input type="file" name="businessLicence" v-show="fileshow" class="ivu-input" :disabled="isReadOnly" required="required" accept="image/gif,image/jpeg,image/jpg,image/png"><br>
<label class="ivu-form-item-label" style="width: 80px;">产品许可文件</label>
<input type="file" name="openingLermission" v-show="fileshow" class="ivu-input" :disabled="isReadOnly" required="required" accept="image/gif,image/jpeg,image/jpg,image/png"><br>
<label class="ivu-form-item-label" style="width: 80px;">产品名称</label>
<input type="text" name="workNake" v-model="input.input6" class="ivu-input" :disabled="isReadOnly" required="required"><br>
<label class="ivu-form-item-label" style="width: 80px;">产品介绍</label>
<input type="text" name="workFlowInfo" v-model="input.input7" class="ivu-input" :disabled="isReadOnly" required="required"><br>
<label class="ivu-form-item-label" style="width: 80px;">开发者</label>
<input type="text" name="developer" v-model="input.input8" class="ivu-input" :disabled="isReadOnly" required="required"><br>
<label class="ivu-form-item-label" style="width: 80px;">管理部门</label>
<input type="text" name="adminDept" v-model="input.input9" class="ivu-input" :disabled="isReadOnly" required="required"><br>
<label class="ivu-form-item-label" style="width: 80px;">运行时间</label>
<input type="text" name="setTime" v-model="input.input10" class="ivu-input" :disabled="isReadOnly" required="required"><br>
<label class="ivu-form-item-label" style="width: 80px;">目前运行状态</label>
<input type="text" name="currentStatus" v-model="input.input11" class="ivu-input" :disabled="isReadOnly" required="required"><br>
<label class="ivu-form-item-label" style="width: 80px;">上传页面截图</label>
<input type="file" name="screenshot" v-show="fileshow" class="ivu-input" :disabled="isReadOnly" required="required" accept="image/gif,image/jpeg,image/jpg,image/png"><br>
<!-- <Button v-show="showbtn" @click="goBack()">返回上一页</Button> -->
<!-- <input type="file" name="screenshot" v-show="fileshow" class="ivu-input" :disabled="isReadOnly" required><br> -->
<input class="ivu-btn" v-show="showbtn" :disabled="disabled1" type="button" value="确认提交" @click="doUpload()" />
<input class="ivu-btn" v-show="showedit" :disabled="disabled2" type="button" value="确认修改并提交" @click="editUpload()" />
</form>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
提交的按钮用