Coder Social home page Coder Social logo

Comments (6)

mrserzhan avatar mrserzhan commented on August 18, 2024 9

@jedisct1 In my case workaround was showing map after mounting.
HTML
<yandex-map v-if="showMap"></yandex-map>
JS
data() { return { showMap: false } }, mounted() { this.showMap = true },

from vue-yandex-map.

Elgorm avatar Elgorm commented on August 18, 2024 8

заключите код карты в <no-ssr>

from vue-yandex-map.

ElioLooiz avatar ElioLooiz commented on August 18, 2024 5

Может быть кому-то сохраню время.
При использовании с Nuxt 3 ([email protected]) компонент карты не может примаунтиться при перезагрузке страницы (особенно в случе перехода с одного маршрута на другой и обратно).
С соотв. ошибкой в консоль Cannot read properties of null (reading 'offsetWidth')

В моем случае помогл отключение базовой анимации перехода между страницами в nuxt 3
definePageMeta({ pageTransition: false })
После отключения, при переходах между страницами, в хуке mounted возвращаются корректные размеры для корневого элемента.

from vue-yandex-map.

PNKBizz avatar PNKBizz commented on August 18, 2024

Спасибо! Как только разверну Nuxt и освою SSR - сразу же разберусь в этой проблеме. Это будет быстрее, чем кажется из построения предложения =)

from vue-yandex-map.

jedisct1 avatar jedisct1 commented on August 18, 2024

Hi!

Looks like I'm facing the same issue with Nuxt. Is there a workaround for this?

from vue-yandex-map.

PNKBizz avatar PNKBizz commented on August 18, 2024

https://github.com/PNKBizz/vue-yandex-map#nuxt-module

from vue-yandex-map.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.