You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/icon/demo/iconfont.vue

44 lines
909 B

<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>
import { createFromIconfontCN } from '@ant-design/icons-vue';
const IconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js',
});
export default {
components: {
IconFont,
},
};
</script>
<style scoped>
.icons-list :deep(.anticon) {
margin-right: 6px;
font-size: 24px;
}
</style>