2018-08-10 14:54:39 +08:00
..
2018-08-06 11:21:09 +08:00
2018-08-10 14:54:39 +08:00
2018-08-06 11:21:09 +08:00
2018-07-31 14:34:17 +08:00

Icon 图标

使用指南

在 index.json 中引入组件

"usingComponents": {
  "van-icon": "path/to/vant-weapp/dist/icon/index"
}

代码演示

基础用法

设置name属性为对应的图标名称即可,所有可用的图标名称见右侧列表

<van-icon name="success" />

API

参数 说明 类型 默认值
name 图标名称 String -
info 图标右上角文字提示 `String Number`
color 图标颜色 String inherit
size 图标大小 String inherit

Event

事件名 说明 参数
tap 点击图标时触发 -

外部样式类

类名 说明
custom-class 根节点样式类