npm 一键安装: npm i vue-hooks-plus 提供多种引入方式,支持全量引入、按需引入: // 全量引入 import { useRequest } from 'vue-hooks-plus' // 按需引入 import useRequest from 'vue-hooks-plus/es/useRequest' 并且支持使用 unplugin-auto-import 插件自动引入: npm i -D @vue-hooks-plus/resolvers import AutoImport from 'unplugin-auto-import/vite' import { VueHooksPlusResolver } from '@vue-hooks-plus/resolvers' export const AutoImportDeps = () => AutoImport({ imports: ['vue', 'vue-router'], include: [/\.[tj]sx?$/, /\.vue$/, /\.vue\?vue/, /\.md$/], dts: 'src/auto-imports.d.ts', resolvers: [VueHooksPlusResolver()], }) 常用插件 useRequest()