# dd-share

> 基于share.js封装的一键分享插件

Latest version **1.0.1** (published 2019-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install dd-share
pnpm add dd-share
yarn add dd-share
bun add dd-share
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-11-15 |
| First published | 2019-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 330.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | imcoder |
| Maintainers | imcoder |

## Links

- npm: https://www.npmjs.com/package/dd-share
- npm.io page: https://npm.io/package/dd-share

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.5.11
- [url-loader](https://npm.io/package/url-loader.md) ^2.2.0
- [social-share.js](https://npm.io/package/social-share.js.md) ^1.0.16

## Recent versions

- 1.0.1 (latest) — 2019-11-15
- 1.0.0 — 2019-11-15

## README

# dd-share

> 基于share.js封装的一键分享插件

## Build Setup

``` bash
# install modules
npm install dd-share

# in main.js
import DdShare from 'dd-share'
Vue.use(DdShare)

# use
<template>
  <div class="share-demo">
    <dd-share class="social-share" :share-config="config"></dd-share>
  </div>
</template>

<script>
export default {
  data() {
    return {
      config: {
        url: "", // 网址，默认使用 window.location.href
        source: "", // 来源（QQ空间会用到）, 默认读取head标签：<meta name="site" content="https://github.com/dongdong-cloud/dd-share" />
        title: "", // 标题，默认读取 document.title 或者 <meta name="title" content="vue一键分享组件" />
        description: "", // 描述, 默认读取head标签：<meta name="description" content="基于share.js封装的vue组件，一键分享到微博、QQ空间、QQ好友、微信、腾讯微博、豆瓣、Facebook、Twitter、Linkedin、Google+、点点等社交网站。" />
        image: "", // 图片, 默认取网页中第一个img标签
        sites: ["qzone", "qq", "weibo", "wechat", "douban"], // 启用的站点
        disabled: ["google", "facebook", "twitter"], // 禁用的站点
        wechatQrcodeTitle: "微信扫一扫：分享", // 微信二维码提示文字
        wechatQrcodeHelper:
          "<p>微信里点“发现”，扫一扫</p><p>二维码便可将本文分享至朋友圈。</p>"
      }
    };
  }
};
</script>

<style lang="scss" scoped>
.share-demo {
  margin-top: 200px;
  text-align: center;
}
</style>
```

---
_Source: https://npm.io/package/dd-share · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
