Skip to content

Commit

Permalink
feat: add resolver for veui (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justineo authored Aug 31, 2021
1 parent 64f175d commit 7fed56a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Supported Resolvers:
- [Naive UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/naive-ui.ts)
- [Prime Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/prime-vue.ts)
- [Vant](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vant.ts)
- [VEUI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/veui.ts)
- [Varlet UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/varlet-ui.ts)
- [View UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/resolvers/view-ui.ts)
- [Vuetify](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vuetify.ts)
Expand Down
1 change: 1 addition & 0 deletions src/core/resolvers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export * from './naive-ui'
export * from './prime-vue'
export * from './vant'
export * from './varlet-ui'
export * from './veui'
export * from './view-ui'
export * from './vuetify'
export * from './vueuse'
13 changes: 13 additions & 0 deletions src/core/resolvers/veui.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ComponentResolver } from '../../types'

/**
* Resolver for VEUI
*
* @link https://github.com/ecomfe/veui
*/
export function VeuiResolver(): ComponentResolver {
return (name: string) => {
if (name.match(/^Veui[A-Z]/))
return { importName: name.slice(4), path: 'veui' }
}
}

0 comments on commit 7fed56a

Please sign in to comment.