yandex-maps-unofficial / vue-yandex-map

Yandex Maps Component for VueJS
MIT License
358 stars 103 forks source link

Поддержка Vue 3 #275

Closed KornetWeb closed 2 years ago

KornetWeb commented 3 years ago

beforeDestroy` has been renamed to `beforeUnmount

PNKBizz commented 3 years ago

Спасибо! Подумаю как сохранить обратную совместимость

KornetWeb commented 3 years ago

Спасибо! Подумаю как сохранить обратную совместимость

Тут еще вот такая ошибка вышла. Возможно это связано как раз с расхождением в Vue3

image

<template lang="pug">
yandexMap(
   :settings="MapConfig.settings"
    :coords="MapConfig.coords"
    :zoom="MapConfig.zoom"
    :behaviors="MapConfig.behaviors"
    :controls="MapConfig.controls"
)
</template>

<script>
'use strict';

import {yandexMap, ymapMarker} from 'vue-yandex-maps';

export default {
    data() {
        return {
            MapConfig: {
                settings : {
                    apiKey    : 'типа ключик',
                    lang      : 'ru_RU',
                    coordorder: 'latlong',
                    version   : '2.1',
                },
                coords   : [
                    55.753960,
                    37.620393,
                ],
                zoom     : 10,
                behaviors: [
                    'scrollZoom',
                ],
                controls : [
                    'fullscreenControl',
                    'geolocationControl',
                    'routeEditor',
                    'rulerControl',
                    'typeSelector',
                    'zoomControl',
                    'routeButtonControl',
                    'routePanelControl',
                ],
            },
        };
    },
    components: {
        yandexMap,
        ymapMarker,
    },
};
</script>
KornetWeb commented 3 years ago

Если в PhpStorm реформатировать минифицированный файл, то ругается конкретно на строку 329 (e is not a function)

image

Хотелось бы попросить у Вас помощи, можно ли как-то не дожидаясь нового релиза исправить ошибку у себя?

dmitrymaslov99 commented 3 years ago

Most likely this solution will help you: https: //github.com/vuejs/vue/issues/11835. In version 3, a lot has been changed inside the core.

PNKBizz commented 2 years ago

Исправлено в версии 0.11