-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
/** 在此处统一导出插件,保持入口文件简介 */ | ||
import { createApp } from 'vue' | ||
|
||
/** | ||
* @description 加载所有 Plugins | ||
* @param {ReturnType<typeofcreateApp>} app 整个应用的实例 | ||
*/ | ||
export function loadAllPlugins(app: ReturnType<typeof createApp>) { | ||
const files = require.context('.', true, /\.ts$/) | ||
files.keys().forEach((key) => { | ||
if (key !== './index.ts') files(key).default(app) | ||
}) | ||
} |