Weex 常用 iconfont 的封装
weex-ui >= 0.3.10
<template> <wxc-icon name="success"></wxc-icon> </template> <script> import { WxcIcon } from 'weex-ui' export default { components: { WxcIcon } } </script>
更详细代码可以参考 这里
同时你可以从 demo 进行复制 name
Prop | Type | Required | Default | Description |
---|---|---|---|---|
name | string | Y | - | icon 的名称 (注1) |
size | String | N | small | icon的尺寸 xs /small /medium /big |
icon-style | Object | N | {} | 样式覆盖 (注2) |
注1:icon的名称详细如下:['less', 'more_unfold', 'back', 'more', 'add', 'subtract', 'close', 'cry', 'search', 'delete', 'help', 'refresh', 'success', 'warning', 'wrong', 'clock', 'scanning', 'filter', 'map', 'play']
注2:当 size 不能满足时候,或者需要自定义样式类型可以传入style
覆盖,例如:
style={color:red,fontSize:'60px'}
// `@wxcIconClicked="iconClicked"` 将会返回 name