在vue项目的index.html中添加如下代码:
<meta name="format-detection" content="telephone=yes" />
在需要调起手机拨号功能的页面,写如下函数:
// 调用拨号功能
callPhone (phoneNumber) {
window.location.href = 'tel://' + phoneNumber
}
vue调用 手机拨号
最新推荐文章于 2024-06-22 11:57:18 发布