vuepress-copycode
v1.0.1
Published
一键复制
Downloads
11
Readme
vuepress-copycode
A vuepress plugin for clipboard-copy
Install
# install dependencies
npm i vuepress-copycode -D
# or use yarn
yarn add vuepress-copycode -D
Usage
Write vuepress config
module.exports = {
plugins: ['vuepress-copycode']
}
Options
This plugin supports the following configurations.
module.exports = {
plugins: ['vuepress-copycode, {
copySelector: ['div[class*="language-"] pre', 'div[class*="aside-code"] aside'], // String or Array
copyMessage: '复制成功', // default is 'Copy successfully and then paste it for use.'
duration: 300, // prompt message display time.
showInMobile: false // whether to display on the mobile side, default: false.
}]
}