完成验证的学习

main
RogerWork 1 year ago
parent e996a1bae6
commit 471fa01ff1
  1. 8
      src/views/Form_Demo3.vue

@ -1,7 +1,7 @@
<template> <template>
<el-form :model="form" size="small" label-width="120" label-position="left" :rules="rules" ref="form"> <el-form :model="form" size="small" label-width="120" label-position="left" :rules="rules" ref="form">
<el-form-item label="活动名称" prop='name' style="width: 400px"> <el-form-item label="活动名称" prop='name' style="width: 400px">
<el-input v-model="form.name" maxlength="10" show-word-limit placeholder="请输入活动名称"></el-input> <el-input v-model.trim="form.name" maxlength="10" show-word-limit placeholder="请输入活动名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动地点" prop="region"> <el-form-item label="活动地点" prop="region">
<el-select v-model="form.region" filterable placeholder="请选择活动区域"> <el-select v-model="form.region" filterable placeholder="请选择活动区域">
@ -9,7 +9,7 @@
<el-option label="上海" value="shanghai"></el-option> <el-option label="上海" value="shanghai"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="活动时间"> <el-form-item label="活动时间" required>
<el-row style="width: 400px"> <el-row style="width: 400px">
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="date1"> <el-form-item prop="date1">
@ -26,7 +26,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item label="是否直播" prop="delivery"> <el-form-item label="是否直播" prop="delivery" required>
<el-switch v-model="form.delivery"></el-switch> <el-switch v-model="form.delivery"></el-switch>
</el-form-item> </el-form-item>
<el-form-item label="活动类型" prop="type"> <el-form-item label="活动类型" prop="type">
@ -45,7 +45,7 @@
</el-form-item> </el-form-item>
<el-form-item label="参与人数" prop="number"> <el-form-item label="参与人数" prop="number">
<!-- <el-input-number v-model="form.number" min="0" max="10"></el-input-number>--> <!-- <el-input-number v-model="form.number" min="0" max="10"></el-input-number>-->
<el-input v-model="form.number" type="number" min="0" max="10" placeholder="请输入参与人数" <el-input v-model.number="form.number" type="number" min="0" max="10" placeholder="请输入参与人数"
style="width: 120px;"></el-input> style="width: 120px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="desc"> <el-form-item label="备注" prop="desc">

Loading…
Cancel
Save