vue中整合腾讯地图组件
视点 (vue-disqus)
Vue component to integrate Disqus comments in your application Vue.js, with support for SPA and Vue 2.*
Vue组件可将Disqus评论集成到您的应用程序Vue.js中,并支持SPA和Vue 2. *
安装 (Installation)
1.)通过NPM安装软件包 (1.) Install package via NPM)
$ npm install vue-disqus
For Vue 1.* use v1.0.2 -
npm install --save [email protected]
对于Vue 1. *,请使用v1.0.2 -
npm install --save [email protected]
在.vue
文件中使用 (Using in .vue
files)
2.)添加组件vue-disqus
(2.) Add the component vue-disqus
)
<template>
// omited (identifier and url are optional)
<div class="comments">
<disqus shortname="your_shortname_disqus" :identifier="page_id" url="http://example.com/path"></disqus>
</div>
</template>
<script>
import VueDisqus from 'vue-disqus/VueDisqus.vue'
export default {
// ...
components: {
VueDisqus
}
}
// ...
在AMD或CommonJS模块中使用 (Using in AMD or CommonJS modules)
3.)需要组件vue-disqus
(3.) require the component vue-disqus
)
var VueDisqus = require('vue-disqus')
var VueDisqus = require('vue-disqus')
与HTML文件一起使用 (Using with HTML files)
4.)将组件添加到基本实例Vue (4.) Add the component to the base instance Vue)
<!-- Required Javascript -->
<script src="vue.js"></script>
<script src="node_modules/vue-disqus/vue-disqus.js"></script>
<!-- Assuming your view app is APP. -->
<body id="app">
<div class="comments">
<vue-disqus shortname="your_shortname_disqus"></vue-disqus>
</div>
</body>
翻译自: https://vuejsexamples.com/vue-component-to-integrate-disqus-comments-in-your-application/
vue中整合腾讯地图组件