Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiichina/yii2-icons
Yii2 中使用 Font Awesome 字体图标
https://github.com/yiichina/yii2-icons
php yii yii2 yii2-extension yii2-icons
Last synced: 4 months ago
JSON representation
Yii2 中使用 Font Awesome 字体图标
- Host: GitHub
- URL: https://github.com/yiichina/yii2-icons
- Owner: yiichina
- Created: 2014-11-04T05:38:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-02-04T08:05:27.000Z (almost 5 years ago)
- Last Synced: 2024-09-29T23:02:20.690Z (4 months ago)
- Topics: php, yii, yii2, yii2-extension, yii2-icons
- Language: PHP
- Homepage: http://extension.yiichina.com/icons
- Size: 23.4 KB
- Stars: 7
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii2 Icons
==========[![Latest Stable Version](https://poser.pugx.org/yiichina/yii2-icons/v/stable.png)](https://packagist.org/packages/yiichina/yii2-icons)
[![Total Downloads](https://poser.pugx.org/yiichina/yii2-icons/downloads.png)](https://packagist.org/packages/yiichina/yii2-icons)
[![License](https://poser.pugx.org/yiichina/yii2-icons/license)](https://packagist.org/packages/yiichina/yii2-icons)
[![Build Status](https://img.shields.io/travis/yiichina/yii2-icons.svg)](http://travis-ci.org/yiichina/yii2-icons)
[![Yii2](https://img.shields.io/badge/Powered_by-Yii_Framework-green.svg?style=flat)](http://www.yiiframework.com/)用于yii2的所有字体图标的集合类
安装
----安装这个扩展的首选方法是通过 [composer](http://getcomposer.org/download/)。
可以运行
```
composer require --prefer-dist yiichina/yii2-icons "*"
```也可以添加
```
"yiichina/yii2-icons": "*"
```到你的 `composer.json` 文件的包含部分。
使用
-----一旦扩展安装完成,你可以简单的使用它如以下代码:
```php
use yiichina\icons\Icon;= Icon::show('user', [
'type' => 'fas', // 图标分类
'tagName' => 'i', // 标签名,默认是 i
'start' => null, // 开始字符
'end' => ' ', // 结束字符
'class' => '' // 追加的 class
]) ?> //渲染内容为
```