Skip to content
On this page

Icon 组件

使用图标

kits-ui 预置的 icon 图标与组件包进行了分离,以便方便用户使用第三方 icon,因此需要单独进行安装 icon 包

使用方式

bash
#npm
npm install @kits-ui/icons

#yarn
yarn add @kits-ui/icons
#npm
npm install @kits-ui/icons

#yarn
yarn add @kits-ui/icons

全局注册

js
// main.ts
import * as kitsIcon from '@kits-ui/icons';

// 注册icon
const app = createApp(App);
for (const [key, component] of Object.entries(kitsIcon)) {
  app.component(key, component);
}
// main.ts
import * as kitsIcon from '@kits-ui/icons';

// 注册icon
const app = createApp(App);
for (const [key, component] of Object.entries(kitsIcon)) {
  app.component(key, component);
}

直接使用

使用 k-icon

使用 k-icon 可以通过 sizecolor 为 icon 设置大小与颜色

内置 Icon(持续补充中...)

copy
liebiao
delete
earth
sync
undo
redo
eye
linechart
barchart
like
unlike
folder
folder-open
heart
edit
fullscreen
fullscreen-exit
indent
outdent
close
clear
compress
expend
search
about
add
arrowleft
addressbook
bag
arrowdown
back
alarm
arrowup
circle
camera
card
arrowright
cart
clock
circle-selected
calendar
close
edit
check
bottom
explain
deletekey
histogram
friendadd
home
enlarge
gps
feedback
exchange
link
like
mail
manage
narrow
listview
more
message
order
people
pie
picture
partake
notice
plus
pwd
setup
share
screen
star
top
skin
sweep
shut
voice
success
error
warning
info