已經(jīng)解決。將主入口文件導(dǎo)出install方法的同時。分別對應(yīng)導(dǎo)出對應(yīng)的組件。簡單代碼如下:import type { App, DefineComponent } from 'vue';import XhPagination from './xhPagination';import XhTable from './xhTable';const wrapComponents:Array<DefineComponent | any> = [XhPagination, XhTable]export const install = function (app: App) { wrapComponents.forEach(cpm => { if (cpm.install) { app.use(cpm); } }) return app;};export default { install, XhPagination, XhTable};export { XhPagination, XhTable}