话不多说了先看效果
其实这个实现很简单
第一步,先到index.html中加上这个
<meta name="format-detection" content="telephone=yes"/>
然后去我们的组件页面
<a :href="tel">点击</a>
data:{
store_info:{
phone:0
}
}
computed:{
tel(){
return 'tel:'+Number(this.store_info.phone)
}
}
完事