Skip to content

Commit 7fed56a

Browse files
authored
feat: add resolver for veui (#126)
1 parent 64f175d commit 7fed56a

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Supported Resolvers:
172172
- [Naive UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/naive-ui.ts)
173173
- [Prime Vue](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/prime-vue.ts)
174174
- [Vant](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vant.ts)
175+
- [VEUI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/veui.ts)
175176
- [Varlet UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/varlet-ui.ts)
176177
- [View UI](https://github.com/antfu/unplugin-vue-components/blob/main/src/resolvers/view-ui.ts)
177178
- [Vuetify](https://github.com/antfu/unplugin-vue-components/blob/main/src/core/resolvers/vuetify.ts)

src/core/resolvers/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export * from './naive-ui'
77
export * from './prime-vue'
88
export * from './vant'
99
export * from './varlet-ui'
10+
export * from './veui'
1011
export * from './view-ui'
1112
export * from './vuetify'
1213
export * from './vueuse'

src/core/resolvers/veui.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { ComponentResolver } from '../../types'
2+
3+
/**
4+
* Resolver for VEUI
5+
*
6+
* @link https://github.com/ecomfe/veui
7+
*/
8+
export function VeuiResolver(): ComponentResolver {
9+
return (name: string) => {
10+
if (name.match(/^Veui[A-Z]/))
11+
return { importName: name.slice(4), path: 'veui' }
12+
}
13+
}

0 commit comments

Comments
 (0)