Vite plugin - automatically generate Vue component documentation website. 在线体验
English | 中文
Demo
View onlinevant-ui
git clone https://github.com/meetqy/vite-plugin-vue-docs.git
yarn
yarn setup
yarn dev
yarn add vite-plugin-vue-docs -D
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueDocs from "vite-plugin-vue-docs";
export default defineConfig({
plugins: [vue(), vueDocs()],
resolve: {
alias: {
// This line must be added, otherwise it cannot be used
vue: "vue/dist/vue.esm-bundler.js",
},
},
});
import { createRouter } from "vue-router";
// Introducing virtual package
import { routes, initVueDocsDemo } from "virtual:vite-plugin-vue-docs";
const router = createRouter({
// ...
routes,
});
// Import demo components
app.use(initVueDocsDemo);
// vite-env.d.ts
/// <reference types="vite-plugin-vue-docs/client" />
For detailed usage, please refer to @vue-docs/example
Parameter | Description | Default |
---|---|---|
base | Document routing address | /docs |
componentDir | Component path relative to src
|
/components |
vueRoute | Router instance name | router |
showUse | Static website display guide | true |
header | Header config | - |
Parameter | Description | Default |
---|---|---|
title | Website header title | Project name |
🚀 Indicates the functions that have been implemented
👷 Indicates a function in progress
⏳ Represents the function in the plan
Function | Status |
---|---|
Configurable document website | ⏳ Planning |
Compatible with < script setup >
|
⏳ Planning |
Compatible with 'composition API' | ⏳ Planning |
You can view the source code | 👷 Progress |
Package into static web pages | 🚀 Completed |
The page jumps to history mode |&# 124; Hash mode | 🚀 Completed |
View instances Online | 🚀 Completed |
The modified file is directly hot updated without F5 refresh | 🚀 Completed |
Support parsing ` slot ' | 🚀 Completed |
Support parsing ` ref ' | 🚀 Completed |
Multiple types of 'type' are supported | 🚀 Completed |
Automatic route generation | 🚀 Completed |
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Комментарии ( 0 )