33 lines
995 B
TypeScript
33 lines
995 B
TypeScript
import {library, config} from '@fortawesome/fontawesome-svg-core'
|
||
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'
|
||
import {faClock, faFolder} from '@fortawesome/free-regular-svg-icons'
|
||
import {
|
||
faXmark,
|
||
faBlog,
|
||
faGauge,
|
||
faCodeBranch,
|
||
faCloud,
|
||
faChevronRight,
|
||
faCodeCommit,
|
||
faCode,
|
||
faHouse,
|
||
faPen,
|
||
faBrush,
|
||
faChessRook,
|
||
faBars,
|
||
faChevronDown,
|
||
faLink
|
||
} from '@fortawesome/free-solid-svg-icons'
|
||
import {faWeibo, faQq, faGithubAlt, faSteamSymbol} from '@fortawesome/free-brands-svg-icons'
|
||
|
||
// 因为默认添加了 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)
|
||
}) |