diff --git a/build/plugins/unplugin.ts b/build/plugins/unplugin.ts index 8ad80ee..652f400 100644 --- a/build/plugins/unplugin.ts +++ b/build/plugins/unplugin.ts @@ -31,7 +31,11 @@ export function setupUnplugin(viteEnv: Env.ImportMeta) { dts: 'src/typings/components.d.ts', types: [{ from: 'vue-router', names: ['RouterLink', 'RouterView'] }], resolvers: [ - ElementPlusResolver(), // auto import Element Plus components。 full import to see /src/plugins/ui.ts + // auto import Element Plus components。 full import to see /src/plugins/ui.ts + ElementPlusResolver({ + // no to import style, full import to see /src/plugins/assets.ts + importStyle: false + }), IconsResolver({ customCollections: [collectionName], componentPrefix: VITE_ICON_PREFIX }) ] }), diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index 9b09017..84fc18d 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -47,12 +47,15 @@ declare module 'vue' { ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSpace: typeof import('element-plus/es')['ElSpace'] + ElStatistic: typeof import('element-plus/es')['ElStatistic'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTree: typeof import('element-plus/es')['ElTree'] ElWatermark: typeof import('element-plus/es')['ElWatermark']