导出一个
import xx from "xx"
let validAmountReg= (rule, value, callback) => {
if (!value) {
return callback(new Error("金额不能为空!"));
} else {
let reg = validAmounts.validAmount;
if (reg.test(value)) {
callback();
} else {
return callback(new Error(validAmounts.validAmountMessage));
}
}
};
export default validAmountReg
直接调用 validAmountReg
导出多个
export var validNames =
export var validNames = (rule, value, callback) => {}
export var validNames = (rule, value, callback) => {}
引入
import * as addChannelReg from '../validate/addChannelReg';
addChannelReg .validNames
...
网友评论