Yandex.SweetAlert2中的地图



如何在sweetalert2中显示我的Yandex.Map?我想这样做:

swal.fire({
titleText: 'Text',
html: '<script type="text/javascript" charset="utf-8" async src="https://api-maps.yandex.ru/services/constructor/1.0/js/?um=constructor%3Ab46193b40b0e8c2a1d2b496978e42079dc8d5fa0f412936aa8e36b51163b57bd&amp;width=600&amp;height=500&amp;lang=ru_RU&amp;scroll=true"></script>'
})

或替代解决方案。我还是一个网络开发的初学者。

附言:此网站litlestuart.github.io/迪拜

Swal.fire({
html: `<iframe src="https://api-maps.yandex.ru/frame/v1/-/CVh7YBYg?lang=en_RU" width="100%" height="200" frameborder="0"></iframe>`
})
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

最新更新