项目作者: dansmaculotte

项目描述 :
Vue.js plugin for Crisp Chat
高级语言: JavaScript
项目地址: git://github.com/dansmaculotte/vue-crisp-chat.git
创建时间: 2020-09-05T16:32:46Z
项目社区:https://github.com/dansmaculotte/vue-crisp-chat

开源协议:MIT License

下载


vue-crisp-chat

@dansmaculotte/vue-crisp-chat"">Latest Version on NPM
Software License
Build Status

Vue.js plugin for Crisp Chat

Crisp Chat Javascrip SDK Documentation

Installation

You can install the package via yarn:

  1. yarn add @dansmaculotte/vue-crisp-chat

or npm:

  1. npm install @dansmaculotte/vue-crisp-chat --save

Setup

  1. import Vue from 'vue'
  2. import CrispChat from '@dansmaculotte/vue-crisp-chat'
  3. Vue.use(CrispChat, {
  4. websiteId: 'YOUR_CRISP_CHAT_WEBSITE_ID',
  5. disabled: true,
  6. hideOnLoad: true
  7. })

Options

disabled

disabled option allows you to prevent automatic script loading, to comply with GDPR.

You can manually load it by calling this.$crisp.load(YOUR_CRISP_CHAT_WEBSITE_ID).

hideOnLoad

When Crisp Chat is loaded it automatically shows the widget, to prevent this you can set to true this option so you can manually show it after.

Usage

You can use any method coming from the official documentation.
Every methods are accessible from $crisp object.

For example:

  1. Vue.$crisp.do('chat:open')
  2. // In a vue instance
  3. this.$crisp.do('chat:open')

You can also listen to loaded event emitted on script load.

For example:

  1. this.$crisp.$on('loaded', (event) => {
  2. console.log('crisp chat loaded')
  3. })

Testing

  1. yarn test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please contact Gaël Reyrol instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

#

Credits