WebIndex/plugins/fontawsome.ts
2025-01-13 23:12:06 +08:00

34 lines
1006 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { config, library } from '@fortawesome/fontawesome-svg-core'
import {
faBars,
faBlog,
faBrush,
faChessRook,
faChevronDown,
faChevronRight,
faCloud,
faCode,
faCodeBranch,
faCodeCommit,
faGauge,
faHouse,
faLink,
faPen,
faXmark,
} from '@fortawesome/free-solid-svg-icons'
import { faClock, faFolder } from '@fortawesome/free-regular-svg-icons'
import { faGithubAlt, faQq, faSteamSymbol, faWeibo } from '@fortawesome/free-brands-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
// 因为默认添加了 nuxt会造成一些错误所以不自动添加样式
config.autoAddCss = false
export default defineNuxtPlugin((nuxtApp) => {
library.add(
faClock, faXmark, faBlog, faGauge, faCodeBranch, faCloud, faWeibo, faQq, faGithubAlt, faSteamSymbol, faChevronRight,
faCodeCommit, faCode, faHouse, faPen, faBrush, faChessRook, faBars, faChevronDown, faFolder, faLink,
)
nuxtApp.vueApp.component('font-awesome-icon', FontAwesomeIcon)
})