Skip to content

Commit a30198a

Browse files
committed
Add feather icons
1 parent 9363c18 commit a30198a

File tree

4 files changed

+58
-9
lines changed

4 files changed

+58
-9
lines changed

package-lock.json

Lines changed: 45 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@tailwindcss/postcss7-compat": "^2.0.2",
1212
"autoprefixer": "^9",
1313
"core-js": "^3.6.5",
14+
"feather-icons": "^4.28.0",
1415
"postcss": "^7",
1516
"postcss-flexbugs-fixes": "^5.0.2",
1617
"postcss-import": "^14.0.2",

src/components/Home.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
<template>
22
<div class="hello">
33
<h1>{{ msg }}</h1>
4-
4+
<i data-feather="home"></i>
55
</div>
66
</template>
77

88
<script>
9+
import feather from 'feather-icons'
10+
911
export default {
1012
name: 'Home',
1113
props: {
1214
msg: String
15+
},
16+
mounted() {
17+
feather.replace();
18+
},
19+
updated() {
20+
feather.replace();
1321
}
1422
}
1523
</script>

src/main.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ import { createApp } from 'vue'
22
import App from './App.vue'
33
import './assets/css/tailwind.css'
44

5+
const feather = require('feather-icons')
6+
feather.replace()
7+
58
createApp(App).mount('#app')

0 commit comments

Comments
 (0)