File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
ui/src/components/dynamics-form/constructor/items Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 22 <el-form-item label =" 是否带输入框" required prop =" showInput" >
33 <el-switch v-model =" formValue.showInput" />
44 </el-form-item >
5- <el-form-item label =" 取值范围" required prop = " min " >
5+ <el-form-item label =" 取值范围" required >
66 <el-col :span =" 11" style =" padding-left : 0 " >
77 <el-form-item
88 :rules =" [
3939 /></el-form-item >
4040 </el-col >
4141 </el-form-item >
42- <el-form-item label =" 步长值" required prop =" step" :rules =" step_rules" >
43- <el-input-number v-model =" formValue.step" :min =" 0" controls-position =" right" />
44- </el-form-item >
42+ <el-col :span =" 11" style =" padding-left : 0 " >
43+ <el-form-item label =" 步长值" required prop =" step" :rules =" step_rules" >
44+ <el-input-number
45+ style =" width : 100% "
46+ v-model =" formValue.step"
47+ :min =" 0"
48+ controls-position =" right"
49+ />
50+ </el-form-item >
51+ </el-col >
4552
4653 <el-form-item
4754 label =" 默认值"
@@ -111,6 +118,10 @@ const step_rules = [
111118 {
112119 required: true ,
113120 validator : (rule : any , value : any , callback : any ) => {
121+ if (! value ) {
122+ callback (new Error (' 步长值必填' ))
123+ return false
124+ }
114125 if (value === 0 ) {
115126 callback (new Error (' 步长不能为0' ))
116127 return false
You can’t perform that action at this time.
0 commit comments