vue调用 手机拨号

在vue项目的index.html中添加如下代码:
<meta name="format-detection" content="telephone=yes" />

在需要调起手机拨号功能的页面,写如下函数:
// 调用拨号功能
callPhone (phoneNumber) {
    window.location.href = 'tel://' + phoneNumber
}
发布了76 篇原创文章 · 获赞 8 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_43453916/article/details/104678574