做网站一定要实名认证吗,制作做动画的网站,怎么出售友情链接,百度非企渠道开户需求#xff1a;验证表格同一行的最低限价不能超过销售定价
思路#xff1a;先获取当前行table的index#xff0c;然后在做大小比较
1.局部html
el-table-column label销售定价(元) min-width200pxtemplate slotheader验证表格同一行的最低限价不能超过销售定价
思路先获取当前行table的index然后在做大小比较
1.局部html
el-table-column label销售定价(元) min-width200pxtemplate slotheaderspan classstar*/spanspan classstar-name销售定价(元)/span/templatetemplate slot-scopescopeel-form-item:propskuList. scope.$index .price:rulestableRules.priceel-inputsizesmallv-model.trimscope.row.priceinputuserInputplaceholder请输入销售定价//el-form-item/template
/el-table-columnel-table-column label最低限价(元) min-width200pxtemplate slotheaderspan classstar*/spanspan classstar-name最低限价(元)/span/templatetemplate slot-scopescopeel-form-item:propskuList. scope.$index .floorPrice:rulestableRules.floorPriceel-inputsizesmallv-model.trimscope.row.floorPriceinputuserInputplaceholder请输入最低限价//el-form-item/template
/el-table-column
2.验证规则
const checkFloorPrice (rule, value, callback) {let index rule.field.split(.)[1];//获取当前行角标if (!value) {callback(new Error(请输入最低限价));} else if (value Infinity || value Math.pow(2, 31) - 1) {callback(new Error(您填写的数字过长));} else if (!/^\d(\.\d{1,2})?$/.test(value)) {callback(new Error(请输入小数不超过两位的自然数));} else if (value this.tableForm.skuList[index].price) {//重点看这里callback(new Error(最低限价不能超过销售定价));} else {callback();}
};