import 'vant/es/toast/style/index' import 'vant/es/notify/style/index' import 'vant/es/dialog/style/index' // 自定义svg 图标组件 import DocIcon from '@/components/docIcon/index' // 设置ant日期选择框为中文样式 import dayjs from 'dayjs' import 'dayjs/locale/zh-cn' dayjs.locale('cn') export function registe(app) { // 自定义组件 app.use(DocIcon) app.config.globalProperties.$idCardHide = idCardHide app.config.globalProperties.$phoneHide = phoneHide } // idCard 脱敏 function idCardHide(idCard) { if (!idCard || idCard.length < 18) { return idCard } return idCard.substring(0, 6) + '******' + idCard.substring(14) } // phone 脱敏 function phoneHide(phone) { if (!phone || phone.length < 11) { return phone } return phone.substring(0, 3) + '******' + phone.substring(9) }