.vue
<van-tabbar-item @click="dialPhoneNumber(Telephone)">
<span>打电话</span>
</van-tabbar-item>
.ts
private dialPhoneNumber(phoneNumber) {
if (!phoneNumber) {
this.$toast({
message: "此用户未配置电话信息,请联系管理员",
position: "bottom",
duration: 2000
});
return;
}
window.location.href = "tel:" + phoneNumber;
}