ellyliang / vue-duoshuo

Vue.js(v2.x+) component wrap for DuoShuo.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue-duoshuo

Vue.js(v2.x+) component wrap for DuoShuo.js

Installation

$ npm install --save vue-duoshuo

Usage

<template>
  <div class="duo-shuo">
    <duo-shuo
      domain="test"
      thread="50b344447f32d30066000147"
    ></duo-shuo>
  </div>
</template>

<script type="text/babel">
  import DuoShuo from 'vue-duoshuo';

  export default {
    name: 'view',
    components: {
      DuoShuo
    },
    data() {
      return {
      };
    },
    methods: {
    }
  };
</script>

<style scoped>
  .duo-shuo {
  }
</style>

Properties

  • domain [String]

    Required; DuoShuo short_name 多说二级域名

  • thread [String]

    Required; 文章 ID

  • url [String]

    Optional; window.location.href by defualt.

  • title [String]

    Optional; window.document.title by defualt.

  • author [String]

    Optional; 作者用户 ID

See more DuoShuo

Development

$ git clone https://github.com/xlsdg/vue-duoshuo.git vue-duoshuo
$ cd vue-duoshuo && npm i && npm run dev

Then open http://localhost:8080/ to see the demo.

License

MIT

About

Vue.js(v2.x+) component wrap for DuoShuo.js

License:MIT License


Languages

Language:JavaScript 61.1%Language:Vue 34.8%Language:HTML 4.1%