utils.js 162 B

123456789
  1. exports.notEmpty = (name) => {
  2. return (v) => {
  3. if (!v || v.trim === "") {
  4. return `${name}为必填项`;
  5. } else {
  6. return true;
  7. }
  8. };
  9. };