<div v-for="p in persons">
    <p>
        name: {{ p.name }}
    </p>
    <p>
        //正确做法,拼接字符串
        tel: <a :href="'tel:' + p.phone">call me</a>
    </p>
</div>


persons: [
    {
        name: 'arron',
        phone: 13811112222
    },{
        name: 'jack',
        phone: 13900088822
    },{
        name: 'steven',
        phone: 13711119909
    }
]
//遍历persons,实现tel功能

 

Logo

前往低代码交流专区

更多推荐