4528226f
“wangming”
feat: 管理端暗黑焕肤与阿里云...
|
11
12
13
14
15
16
17
18
19
|
if (m.length < 7) return '****'
return `${m.slice(0, 3)}****${m.slice(-4)}`
}
export function formatMobileDisplay(mobile, enabled) {
const raw = mobile == null ? '' : String(mobile).trim()
if (!raw) return ''
return Number(enabled) === 1 ? maskMobileValue(raw) : raw
}
|
e1dcb3a0
“wangming”
1
|
20
21
22
23
24
25
26
27
28
29
30
|
export function displayMobile(mobile, enabled, emptyText = '') {
const v = formatMobileDisplay(mobile, enabled)
return v || emptyText
}
export default {
maskMobileValue,
formatMobileDisplay,
displayMobile
}
|