Utilizing bootstrap 4 and vuejs, the desktop version includes a container with a tab pane and map. However, on mobile devices, only the map is displayed without the tab pane.
The following code simplifies the issue at hand. The tab pane and map have high interactions on the desktop version, but on mobile, I want to minimize interactivity since the tab pane is hidden.
<div class="d-sm-none">
small
<div id="mapid" style="width: 100%; height:300px"></div>
</div>
<div class="d-none d-md-block">
large
<div id="mapid" style="width: 100%; height:300px"></div>
</div>
The element that appears first will be shown. In this case, the map will be displayed on mobile while hidden on the desktop. Rearranging the code will alter the visibility accordingly.
Below is the vue code snippet used to showcase the map, utilizing leaflet:
this.map = L.map('mapid', {
center: this.center,
zoom: this.zoom
});
How can I ensure that this setup functions correctly?