vue-vben-admin/packages/effects/plugins
Netfan b785bc5704
Some checks are pending
CI / Test (ubuntu-latest) (push) Waiting to run
CI / Test (windows-latest) (push) Waiting to run
CI / Lint (ubuntu-latest) (push) Waiting to run
CI / Lint (windows-latest) (push) Waiting to run
CI / Check (ubuntu-latest) (push) Waiting to run
CI / Check (windows-latest) (push) Waiting to run
CI / CI OK (push) Blocked by required conditions
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Deploy Website on push / Deploy Push Playground Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Docs Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Antd Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Element Ftp (push) Waiting to run
Deploy Website on push / Deploy Push Naive Ftp (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
fix: useEcharts return invalid instance (#5360)
2025-01-12 09:54:37 +08:00
..
src fix: useEcharts return invalid instance (#5360) 2025-01-12 09:54:37 +08:00
package.json chore: release 5.5.2 2024-12-28 22:15:00 +08:00
README.md refactor: package chart-ui integrated into plugins (#4238) 2024-08-26 21:42:56 +08:00
tsconfig.json refactor: package chart-ui integrated into plugins (#4238) 2024-08-26 21:42:56 +08:00

@vben/plugins

该目录用于存放项目中集成的第三方库及其相关插件。每个插件都包含了可重用的逻辑、配置和组件,方便在项目中进行统一管理和调用。

注意

所有的第三方插件都必须以 subpath 形式引入,例:

echarts 为例,引入方式如下:

packages.json

"exports": {
    "./echarts": {
      "types": "./src/echarts/index.ts",
      "default": "./src/echarts/index.ts"
    }
  }

使用方式

import { useEcharts } from '@vben/plugins/echarts';

这样做的好处是,应用可以自行选择是否使用插件,而不会因为插件的引入及副作用而导致打包体积增大,只引入需要的插件即可。