You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.2 KiB

<style lang="scss" scoped>
.container{
background:#F6F6F6;
padding:28rpx 0;
}
</style>
<template>
<view class="container">
<u-form class="card inline" :model="formData" ref="form" :rules="rules" labelWidth="auto">
<d-form v-for="(v,k) in fields" :key="k" v-bind="v" :required="!!rules[k]" :field="k" @input="formData[k]=$event" @select="fields[k].value=$event"/>
</u-form>
<button class="cu-btn round bg-green shadow submit" @click="">确认提交</button>
</view>
</template>
<script>
export default{
data(){
return{
fields:{
name:{label:"仓库名称"},
adder:{label:"仓库位置"},
size:{label:"仓库容量(㎡)",placeholder:"请输入仓库容量"},
type:{label:"仓库类型",type:"select",columns:[[{label:"标签1",id:1},{label:"标签2",id:2}]],keyName:"label",value:null},
manager:{label:"基地管理员"},
tel:{label:"管理员联系方式"},
imgs:{label:"仓库图片",type:"upImg"},
},
formData:{
name:"",
},
rules:{
name:{required:true, message:"仓库名称必填!", trigger:["blur","change"]},
adder:{required:true, message:"仓库位置必填!", trigger:["blur","change"]},
},
}
},
methods:{
},
}
</script>