在查询前 加一个
this.$refs['form'].validate((valid) => {
if (valid) {}
})
使用element带的一些必输项格式校验等,比自己的写的可好用多了,记得用哈
在做 修改 删除 新增 功能时,增加一个
this.$confirm('确认删除该收款信息?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {})
提升用户体验
el-form 上面有个label-width,很好用,不用在每个el-form-item上面写,看着很烦
在做下拉选时,后台返回的数据,需要拼接的label和value, 在el-select上边写change事件没有在el-option写@click.native好使,在el-option上可以将整个item传过去,但是写在el-select上面就要写一层循环才能将需要的值取出来,见下方代码