vue中整合腾讯地图组件_Vue组件可将Disqus评论整合到您的应用程序中

本文介绍了如何在Vue应用中集成腾讯地图组件以及使用Vue-disqus组件来添加Disqus评论功能。通过NPM安装相关包,然后在Vue文件中引入并使用组件,支持SPA和Vue 2.*。
摘要由CSDN通过智能技术生成

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中整合腾讯地图组件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值