fix(projects): 🐛 fix element-plus style conflicts (#49)

This commit is contained in:
一寸灰
2025-01-08 18:09:13 +08:00
committed by GitHub
parent 571f14de9e
commit b8b7f4d742
2 changed files with 8 additions and 1 deletions

View File

@@ -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 })
]
}),

View File

@@ -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']