现在public下的index.html中加入这行代码

<meta name="format-detection" content="telephone=yes" />

然后写一个方法

function call(phone) { // phone是要拨打的号码
    window.location.href='tel://' + phone
}

效果图

js唤起拨号功能(vue同理)

文章目录