forked from vueComponent/ant-design-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiconfont.vue
38 lines (31 loc) · 870 Bytes
/
iconfont.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<docs>
---
order: 2
title:
zh-CN: 使用 iconfont.cn
en-US: Use iconfont.cn
---
## zh-CN
对于使用 [iconfont.cn](http://iconfont.cn/) 的用户,通过设置 `createFromIconfontCN` 方法参数对象中的 `scriptUrl` 字段, 即可轻松地使用已有项目中的图标。
## en-US
If you are using [iconfont.cn](http://iconfont.cn/), you can use the icons in your project gracefully.
</docs>
<template>
<a-space>
<icon-font type="icon-tuichu" />
<icon-font type="icon-facebook" />
<icon-font type="icon-twitter" />
</a-space>
</template>
<script lang="ts" setup>
import { createFromIconfontCN } from '@ant-design/icons-vue';
const IconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js',
});
</script>
<style scoped>
.icons-list :deep(.anticon) {
margin-right: 6px;
font-size: 24px;
}
</style>