ANTVUE项目实战三

五迷三道 提交于 2020-05-02 11:43:14
多选和默认
<a-form-item label="选择仓库" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-select v-decorator="['WarehouseId', { rules: [{ required: true ,message:'请选择'}],initialValue: warhousecollection[0].Id }]"> <a-select-option v-for="d in warhousecollection" :key="d.Id" :value="d.Id">{{d.Warehouse}}</a-select-option> </a-select> </a-form-item> mounted() { this.loading = true this.$http.get('/BaseWarehouse/T_Warehouse/GetDataListAll').then(resJson => { this.loading = false if (resJson.Success) { //this.$message.success('操作成功!') this.warhousecollection=resJson.Data // this.form.setFieldsValue({ // "WarehouseId": this.warhousecollection[0], // }) } else { this.$message.error(resJson.Msg) this.warhousecollection = null } }) }

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!