ANTVUE项目实战三
作者:互联网
多选和默认
<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 } }) }
标签:实战,loading,项目,ANTVUE,warhousecollection,resJson,GetDataListAll,Warehouse,message 来源: https://www.cnblogs.com/wangchuang/p/12813940.html