check.js 361 Bytes
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
export default{
	data(){
		return{
			rules:{
				"tdb2111.tdbVo.actiondesc": [{
					validator: (rule, value, callback) => {
						let opertype = this.model.tdb2111.tdbVo.opertype;
						if (opertype == '2' || opertype == '3') {
							if (!value) {
								return callback(new Error('必输项'))
							}
						}
						callback()
					}
				}],
			}
		}
	}
}