Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 4e54f09

Browse files
authored
feat: add icons demo (#323)
1 parent a9b2ca1 commit 4e54f09

File tree

15 files changed

+1122
-54
lines changed

15 files changed

+1122
-54
lines changed

apps/admin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@vben/types": "workspace:*",
6363
"@vue/compiler-sfc": "3.3.6",
6464
"@vue/test-utils": "^2.4.1",
65-
"naive-ui": "^2.35.0",
65+
"naive-ui": "^2.36.0",
6666
"typescript": "^5.2.2",
6767
"vite": "5.0.10",
6868
"vue-tsc": "^1.8.20"
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<script lang="ts" setup>
2+
import {
3+
QqCircleFilled,
4+
GithubFilled,
5+
WechatFilled,
6+
AlipayCircleFilled,
7+
IeCircleFilled,
8+
TaobaoCircleFilled,
9+
CodepenCircleFilled,
10+
} from '@ant-design/icons-vue'
11+
import { openWindow } from '@vben/utils'
12+
import { Icon, SvgIcon, IconPicker } from '@vben/components/index'
13+
</script>
14+
15+
<template>
16+
<VbenCard title="Icon组件示例">
17+
<VbenCard title="Antv Icon使用 (直接按需引入相应组件即可)">
18+
<div class="flex justify-around">
19+
<GithubFilled :style="{ fontSize: '30px' }" />
20+
<QqCircleFilled :style="{ fontSize: '30px' }" />
21+
<WechatFilled :style="{ fontSize: '30px' }" />
22+
<AlipayCircleFilled :style="{ fontSize: '30px' }" />
23+
<IeCircleFilled :style="{ fontSize: '30px' }" />
24+
<TaobaoCircleFilled :style="{ fontSize: '30px' }" />
25+
<CodepenCircleFilled :style="{ fontSize: '30px' }" />
26+
</div>
27+
</VbenCard>
28+
29+
<VbenCard title="IconIfy 组件使用" class="my-5">
30+
<div class="flex justify-around flex-wrap">
31+
<Icon icon="ion:layers-outline" :size="30" />
32+
<Icon icon="ion:bar-chart-outline" :size="30" />
33+
<Icon icon="ion:tv-outline" :size="30" />
34+
<Icon icon="ion:settings-outline" :size="30" />
35+
</div>
36+
</VbenCard>
37+
38+
<VbenCard title="svg 雪碧图" class="my-5">
39+
<div class="flex justify-around flex-wrap">
40+
<SvgIcon icon="total-sales" size="32" />
41+
<template v-for="item in 6" :key="item">
42+
<SvgIcon :icon="`dynamic-avatar-${item}`" size="32" />
43+
</template>
44+
</div>
45+
</VbenCard>
46+
47+
<VbenCard title="图标选择器(Iconify)" class="my-5">
48+
<div class="flex justify-around flex-wrap">
49+
<IconPicker />
50+
</div>
51+
</VbenCard>
52+
53+
<VbenCard title="图标选择器(Svg)" class="my-5">
54+
<div class="flex justify-around flex-wrap">
55+
<IconPicker mode="svg" />
56+
</div>
57+
</VbenCard>
58+
59+
<VbenAlert title="推荐使用Iconify组件" type="info">
60+
Icon组件基本包含所有的图标,在下面网址内你可以查询到你想要的任何图标。并且打包只会打包所用到的图标。
61+
</VbenAlert>
62+
<VbenButton
63+
quaternary
64+
type="info"
65+
@click="openWindow('https://iconify.design/')"
66+
>
67+
Iconify 图标大全
68+
</VbenButton>
69+
</VbenCard>
70+
</template>

apps/gf-vben/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@vben/types": "workspace:*",
6363
"@vue/compiler-sfc": "3.3.6",
6464
"@vue/test-utils": "^2.4.1",
65-
"naive-ui": "^2.35.0",
65+
"naive-ui": "^2.36.0",
6666
"typescript": "^5.2.2",
6767
"vite": "5.0.10",
6868
"vue-tsc": "^1.8.20"

packages/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export { default as CountDownButton } from './src/countdown-input/countdown-butt
99
export { default as CountDownInput } from './src/countdown-input/index.vue'
1010
export { default as StrengthMeter } from './src/strength-meter/index.vue'
1111
export { default as ClickOutside } from './src/click-outside/index.vue'
12+
export { default as IconPicker } from './src/icon-picker/index.vue'
1213

1314
export { default as CollapseTransition } from './src/transition/collapse-transition.vue'
1415
export { default as CustomTransition } from './src/transition/index'

0 commit comments

Comments
 (0)