You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
349 B
JavaScript

3 months ago
/* 非空验证 */
const vefEmpty = (key,msg) => {
if (key === '' || key === undefined || key === null) {
uni.showToast({
title: msg,
duration: 2000,
icon: 'none'
});
return false
} else {
return true
}
}
const addZero = (num) => {
if (num < 10) {
num = `0${num}`;
}
return num;
};
export default {
vefEmpty,
addZero
}