<script src="https://maps.googleapis.com/maps/api/js?key=[MY_API_KEY]"></script>
<template>
<div id="map"></div>
</template>
<script>
import GoogleMapsLoader from 'google-maps'
export default {
name: "Map",
mounted: function () {
GoogleMapsLoader.KEY = 'AIzaSyCreM63W1kHeozDLz0WohGhVAC2-PE8vv8';
GoogleMapsLoader.load(function(google) {
let map = new google.maps.Map(document.getElementById('map'), {
zoom: 14,
center: new google.maps.LatLng(59.93, 30.32)
})
})
}
}
</script>
<style scoped>
#map {
height:300px;
width: 100%;
}
</style>
new Vue({
el: "#app",
router,
store,
beforeCreate() {
this.$http
.jsonp(getURL(method, { offset: 1, album_id: 0, extended: 1 }))
.then(response => {
return response.json();
})
.then(data => {
return data.response.items.map(items => {
///
return items;
});
})
.then(data => {
this.$store.dispatch("getData", data);
});
{
const createClient = XMPP.createClient({
jid: "u1@example.com",
password: "1",
transport: "websocket",
wsURL: "ws://example.com/xmpp-websocket"
});
Vue.prototype.$createClient = createClient;
export default {
name: "App",
created: function() {
console.log(this.$createClient)
}
};
</script>
const API_ID = 68 // код свой;
export function injectVKOpenApi() {
return new Promise((resolve, reject) => {
try {
const fjs = document.getElementsByTagName("script")[0];
if (document.getElementById("vk_openapi_js")) {
resolve();
return;
}
const js = document.createElement("script");
js.id = "vk_openapi_js";
js.src = "//vk.com/js/api/openapi.js?160";
js.onload = resolve;
js.onerror = reject;
fjs.parentNode.insertBefore(js, fjs);
} catch (err) {
reject(err);
}
});
}
/**
* This initializes the VK api
* @param {boolean} onlyWidgets
*/
export const initVK = (onlyWidgets = false) => () =>
VK.init({ apiId: API_ID, onlyWidgets });
export const initCallVK = () =>
new Promise((resolve, reject) => {
try {
window.name = "fXD";
VK.init(resolve);
} catch (err) {
reject(err);
}
});
<template>
<div><div id="vk_comments"></div></div>
</template>
<script>
import { injectVKOpenApi, initVK } from "./vknt.js";
export default {
name: "vk-comments",
props: {},
mounted() {
injectVKOpenApi()
.then(initVK(true))
.then(() => {
VK.Widgets.Comments("vk_comments", { limit: 5, attach: "*" });
});
}
};
</script>
vendor: [
'firebase'
],
import * as firebase from 'firebase/app'
import 'firebase/auth'
import 'firebase/database'
var config = {
apiKey: "",
authDomain: "",
databaseURL: "",
projectId: "",
storageBucket: "",
messagingSenderId: "233455844395"
};
!firebase.apps.length ? firebase.initializeApp(config) : ''
export const GoogleProvider = new firebase.auth.GoogleAuthProvider();
export const auth = firebase.auth();
export const DB = firebase.database();
export default firebase