template代码:script部分:data(){letthat=this;letvalidateVlan=(rule,value,callback)=>{if(that.form.vlan_id[index].value.trim()!=null&&that.form.vlan_id[index].value.trim()!=""){......}}return{value:true,valueSelect:'Trunk',form:{vlan_id:[],},rules:{vlan_id:[{required:true,message:'不能为空',trigger:['blur','change']},{validator:validateVlan,trigger:['blur','change']}]}}},methods:{//新增idaddItem(){this.form.vlan_id.push({value:''})},//减少idminusItem(item){varindex=this.form.vlan_id.indexOf(item)if(index!==-1){this.form.vlan_id.splice(index,1)}},},
添加回答
举报
0/150
提交
取消