feat: get menus from server & add iframe view
This commit is contained in:
@@ -40,3 +40,18 @@ export function validateEmail(email) {
|
||||
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
||||
return re.test(email)
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为空判断
|
||||
*/
|
||||
export function validatenull(val) {
|
||||
if (val instanceof Array) {
|
||||
if (val.length === 0) return true
|
||||
} else if (val instanceof Object) {
|
||||
if (JSON.stringify(val) === '{}') return true
|
||||
} else {
|
||||
if (val === 'null' || val === null || val === 'undefined' || val === undefined || val === '') return true
|
||||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user