yandex-maps-unofficial / vue-yandex-maps

Yandex Maps 3.0 components library for VueJS.
https://yandex-maps-unofficial.github.io/vue-yandex-maps/
MIT License
73 stars 9 forks source link

Помогите я не могу подключить её, #11

Closed Kovriga closed 2 years ago

Kovriga commented 2 years ago

image

Kovriga commented 2 years ago

Можно более подробную инструкцию по использованию?) Я просто тупой

Kovriga commented 2 years ago

Напишите пожалуйста что и куда добавлять, к примеру, этот код в main.ts этот в App.vue

PNKBizz commented 2 years ago

Ну вы хоть примеры компонентов прикрепите что-ли

Kovriga commented 2 years ago

`import {Options, Vue} from "vue-class-component"; import axios, {AxiosResponse} from "axios"; import {YandexMap} from "vue-yandex-maps";

@Options({ components: {YandexMap} })

export default class MainComponent extends Vue {

mapVisible: number|null = null; allPost = [];

created(): void { axios.get('http://localhost:3000/posts').then((response: AxiosResponse) => {

  this.allPost = response.data;
})

}`

Kovriga commented 2 years ago

image

Kovriga commented 2 years ago

Попытался просто в тупую пример применить

Kovriga commented 2 years ago

image

Kovriga commented 2 years ago

`

`
PNKBizz commented 2 years ago

vue-class-component не надо использовать. Пишите на третьем вью