yxk_h5_master/components/uni-icons/readme.md

35 lines
807 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### Icon 图标
用于展示 icon组件名``uni-icon``,代码块: uIcon。
**使用方式:**
在 ``script`` 中引用组件
```javascript
import uniIcon from "@/components/uni-icon/uni-icon.vue"
export default {
components: {uniIcon}
}
```
在 ``template`` 中使用组件
```html
<uni-icon type="contact" size="30"></uni-icon>
```
实际效果参考:[https://github.com/dcloudio/uni-ui](https://github.com/dcloudio/uni-ui)
**Icon 属性说明:**
|属性名 |类型|默认值 |说明|
|---|----|---|---|
|type |String |-|图标图案,参考下表|
|color |String |-|图标颜色 |
|size |Number |24|图标大小|
|@click |EventHandle|-|点击 Icon 触发事件|
**type 类型:**
![icon](https://img-cdn-qiniu.dcloud.net.cn/img/icon.png)