As shown in the figure, the way to write custom check in the slot is as follows:
<template #prizeNum="text,record,index"> <a-form-model-item style="margin-bottom: 0px;" :label-col="{ span:0 }" :wrapper-col="{ span: 24} "is: prop =" record. TsPrizeInfo. InfoId + index + 4 "/ / keep the only can: rules =" {' required ': true,' the message: 'please enter the number of prizes! ','trigger': 'blur','validator':(rule, value, callback) => { numCheck(rule, value, The callback, record)}} "> < a - input placeholder =" please enter the number of prizes "v - model =" record. TsPrizeInfo. PrizeNum "style =" width: 100% "/ > < / a - form - model - item > < / template > / / calibration method = = = = = = = = = = = = = numCheck (rule, the value, the callback, record) {if (! record.tsPrizeInfo.prizeNum){ callback(new Error(rule.message)) }else { callback() } },Copy the code