Blame view

src/views/demo/feat/icon/index.vue 2.85 KB
陈文彬 authored
1
<template>
2
  <PageWrapper title="Icon组件示例">
陈文彬 authored
3
4
5
6
7
8
9
10
11
12
13
14
    <CollapseContainer title="Antv Icon使用 (直接按需引入相应组件即可)">
      <div class="flex justify-around">
        <GithubFilled :style="{ fontSize: '30px' }" />
        <QqCircleFilled :style="{ fontSize: '30px' }" />
        <WechatFilled :style="{ fontSize: '30px' }" />
        <AlipayCircleFilled :style="{ fontSize: '30px' }" />
        <IeCircleFilled :style="{ fontSize: '30px' }" />
        <TaobaoCircleFilled :style="{ fontSize: '30px' }" />
        <CodepenCircleFilled :style="{ fontSize: '30px' }" />
      </div>
    </CollapseContainer>
15
    <CollapseContainer title="IconIfy 组件使用" class="my-5">
陈文彬 authored
16
      <div class="flex justify-around flex-wrap">
17
18
19
20
21
22
23
        <Icon icon="ion:layers-outline" :size="30" />
        <Icon icon="ion:bar-chart-outline" :size="30" />
        <Icon icon="ion:tv-outline" :size="30" />
        <Icon icon="ion:settings-outline" :size="30" />
      </div>
    </CollapseContainer>
24
    <CollapseContainer title="svg 雪碧图" class="my-5">
Vben authored
25
26
27
28
29
      <div class="flex justify-around flex-wrap">
        <SvgIcon name="test" size="32" />
      </div>
    </CollapseContainer>
30
    <CollapseContainer title="图标选择器(Iconify)" class="my-5">
31
32
      <div class="flex justify-around flex-wrap">
        <IconPicker />
陈文彬 authored
33
34
35
      </div>
    </CollapseContainer>
36
37
38
39
40
41
    <CollapseContainer title="图标选择器(Svg)" class="my-5">
      <div class="flex justify-around flex-wrap">
        <IconPicker mode="svg" />
      </div>
    </CollapseContainer>
陈文彬 authored
42
43
44
    <Alert
      show-icon
      message="推荐使用Iconify组件"
45
      description="Icon组件基本包含所有的图标,在下面网址内你可以查询到你想要的任何图标。并且打包只会打包所用到的图标。"
陈文彬 authored
46
    />
47
    <a-button type="link" @click="toIconify"> Iconify 图标大全 </a-button>
48
  </PageWrapper>
陈文彬 authored
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</template>
<script lang="ts">
  import { defineComponent } from 'vue';
  import { CollapseContainer } from '/@/components/Container/index';
  import { Alert } from 'ant-design-vue';
  import {
    QqCircleFilled,
    GithubFilled,
    WechatFilled,
    AlipayCircleFilled,
    IeCircleFilled,
    TaobaoCircleFilled,
    CodepenCircleFilled,
  } from '@ant-design/icons-vue';
Vben authored
64
  import { Icon, IconPicker, SvgIcon } from '/@/components/Icon/index';
陈文彬 authored
65
vben authored
66
  import { openWindow } from '/@/utils';
67
  import { PageWrapper } from '/@/components/Page';
vben authored
68
陈文彬 authored
69
70
  export default defineComponent({
    components: {
71
      PageWrapper,
陈文彬 authored
72
73
74
75
76
77
78
79
80
81
      CollapseContainer,
      GithubFilled,
      QqCircleFilled,
      WechatFilled,
      AlipayCircleFilled,
      IeCircleFilled,
      TaobaoCircleFilled,
      CodepenCircleFilled,
      Icon,
      Alert,
82
      IconPicker,
Vben authored
83
      SvgIcon,
陈文彬 authored
84
85
86
87
    },
    setup() {
      return {
        toIconify: () => {
vben authored
88
          openWindow('https://iconify.design/');
陈文彬 authored
89
90
91
92
93
        },
      };
    },
  });
</script>