我希望使用他们的电话号码,电子邮件和地址将联系人设为<q-list>
,而我试图使<q-item>
成为可点击的,以便当用户单击任意q项时,电话拨号器/ mail-client / naviation应用程序将启动。
[根据我的收集,<q-item>
仅支持@click,但除openURL
外,我无法想到其他方法来传递URL方案(例如,“ tel:55512345”)。但是文档advises against it。有什么好的方法呢?
<q-item clickable>
<q-item-section avatar>
<q-icon name="mail" />
</q-item-section>
<q-item-section>
<q-item-label>[email protected]</q-item-label>
<q-item-label caption>email</q-item-label>
</q-item-section>
</q-item>
由于文档建议为其使用a
(nchor)元素,为什么不通过对URL方案使用tag
属性和本机href
来使用它:
<q-item
tag="a"
href="tel:55512345"
clickable>
<q-item-section avatar>
<q-icon name="mail" />
</q-item-section>
<q-item-section>
<q-item-label>[email protected]</q-item-label>
<q-item-label caption>email</q-item-label>
</q-item-section>
</q-item>