@vuepress-denaro/vuepress-plugin-reward
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

vuepress-plugin-reward

🎉 A vuepress plugin for reward component.在你的站点添加一个打赏插件.

npm version GitHub stars GitHub issues
jsdelivr NPM

Usage

  • Install
# npm
npm install @vuepress-denaro/vuepress-plugin-reward

# yarn
yarn add @vuepress-denaro/vuepress-plugin-reward
  • Update plugins in .vuepress/config.js or .vuepress/config.ts

js

const { rewardPlugin } = require('@vuepress-denaro/vuepress-plugin-reward')
module.exports = {
  plugins: [
    rewardPlugin({
      btnText = '打赏',
      title = '给作者赏一杯咖啡吧',
      subTitle = '您的支持将是我继续更新下去的动力',
      rewardOption = [
        {
          text: '微信',
          url: '/WeChat.png', // ddd your picture to docs/.vuepress/public
        },
        {
          text: '支付宝',
          url: '/Alipay.png', // ddd your picture to docs/.vuepress/public
        },
      ],
    }),
  ],
}

ts

import { rewardPlugin } from '@vuepress-denaro/vuepress-plugin-reward'
import { defineUserConfig } from '@vuepress/cli'

export default defineUserConfig({
  plugins: [
    rewardPlugin({
      btnText = '打赏',
      title = '给作者赏一杯咖啡吧',
      subTitle = '您的支持将是我继续更新下去的动力',
      rewardOption = [
        {
          text: '微信',
          url: '/WeChat.png', // ddd your picture to docs/.vuepress/public
        },
        {
          text: '支付宝',
          url: '/Alipay.png', // ddd your picture to docs/.vuepress/public
        },
      ],
    })
  ]
})

Configurations

btnText

  • type: string
  • default: '打赏'

reward button text.

title

  • type: string
  • default: '给作者赏一杯咖啡吧'

First reward text.

subTitle

  • type: string
  • default: '您的支持将是我继续更新下去的动力'

Second reward text.

rewardOption

  • type: Array
  • default:
[
  {
    "text": "微信",
    "url": "/WeChat.png" // ddd your picture to docs/.vuepress/public
  },
  {
    "text": "支付宝",
    "url": "/Alipay.png" // ddd your picture to docs/.vuepress/public
  }
]

your QR code image.

elDom

  • type: string
  • default: undefined

reward element render dom.

Thanks

vuepress-plugin-reward

Package Sidebar

Install

npm i @vuepress-denaro/vuepress-plugin-reward

Weekly Downloads

5

Version

1.3.1

License

MIT

Unpacked Size

24.8 kB

Total Files

26

Last publish

Collaborators

  • vxhly