晚上 好 ,
我 有 一 个 简单 的 问题 , 如何 在 应用 程序 中 创建 一 个 链接 与 VueJs & Nativescript 为 iOS & Android .
我 有 一 个 网上 商店 , 我 希望 用户 能够 访问 这个 商店 , 只需 点击 链接/按钮 , 在 我 的 应用 程序 。 点击 将 启动 手机 上 的 浏览 器 。
假设 我 有 www.shop.com , 我 想要 一 个 这样 的 链接 :是 的 。
- 谢谢 - 谢谢
晚上 好 ,
我 有 一 个 简单 的 问题 , 如何 在 应用 程序 中 创建 一 个 链接 与 VueJs & Nativescript 为 iOS & Android .
我 有 一 个 网上 商店 , 我 希望 用户 能够 访问 这个 商店 , 只需 点击 链接/按钮 , 在 我 的 应用 程序 。 点击 将 启动 手机 上 的 浏览 器 。
假设 我 有 www.shop.com , 我 想要 一 个 这样 的 链接 :是 的 。
1条答案
按热度按时间baubqpgj1#
这里有一个StackBlitz example如何你可以做到这一点。
如果你只是想查看而不是运行它,那么这里就是最重要的部分。简而言之,使用
Label
和link
类将其样式化为链接,并使用openUrl
在浏览器中启动链接。如果你不想依赖内置的Utils.openUrl(),你可以直接调用原生API,例如在iOS上: