feat: get menus from server & add iframe view

This commit is contained in:
wwlleo0730
2019-02-14 12:24:49 +08:00
parent 0fed69f367
commit a6d56d7dd0
15 changed files with 826 additions and 26 deletions

View File

@@ -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
}