feat: add vite-plugin-components

This commit is contained in:
Anthony Fu committed 2020-08-20 16:04:00 +08:00
1 parent 3a66a4744e
commit 5022d6252f
8 files changed
+40 -29

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
## Components
Components in this dir will auto registered as global components by [`vite-plugin-components`](https://github.com/antfu/vite-plugin-components).
### `Icon.vue`
You can uses Icons with the following syntax
```html
<Icon icon='mdi:account'/>
```
The icon id follows the rules in [Iconify](https://iconify.design/) which you can use any icons from the supported icon sets. It will only bundles the icons you use, check out [PurgeIcons](https://github.com/antfu/purge-icons) for more details.
-12
View File
@@ -1,12 +0,0 @@
import { Plugin } from 'vue'
import Modal from './Modal.vue'
import Icon from './Icon.vue'
import Footer from './Footer.vue'
export const registerComponents: Plugin = {
install(app) {
app.component('Modal', Modal)
app.component('Icon', Icon)
app.component('Footer', Footer)
},
}