This commit is contained in:
xuziqiang
2024-05-15 17:29:42 +08:00
commit d0155dbe3c
7296 changed files with 1832517 additions and 0 deletions

9
lib/util/install.ts Normal file
View File

@@ -0,0 +1,9 @@
import type { App, Plugin } from 'vue';
export const withInstall = <T>(comp: T) => {
const c = comp as any;
c.install = function (app: App) {
app.component(c.displayName || c.name, comp);
};
return comp as T & Plugin;
};