1.0.2 • Published 5 years ago

vuepress-demo-plugin v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

vuepress-demo-plugin

安装

npm i vuepress-demo-plugin

基础用法

// config.js
const demoPlugin = require('vuepress-demo-plugin')
..
module.exports = {
//   ...
  plugins: [
    [demoPlugin, {
        demoCodeMark = 'demo',
        jsExtraStr = '',
        htmlExtraStr = '',
        pkg: {
            dependencies: {
            "vue": "2.5.17"
            }
        }
    }]
    // ...
  ],
}
// *.md
::: demo collapse descriptiion
<<< @/docs/.vuepress/components/collapse.vue
:::

效果

::: demo collapse descriptiion <<< @/docs/.vuepress/components/collapse.vue :::

API

参数说明类型可选值默认值
demoCodeMark自定义demo容器字段string'demo'
jsExtraStr添加在codesanbox中main.js 的字符串string-
htmlExtraStr添加在codesanbox中index.html 的字符串string-
pkg添加在codesanbox中依赖包string-

reference

demo


collapse-index 和@/docs/.vuepress/demoComponents/collapse/index.vue的格式保存一致

description 与下图的效果中的 description 一致,可以使用md的语法

效果 example

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago