2017 © Pedro Peláez
 

yii2-extension yii2avatar

基于cropper的一款头像上传yii2组件(带裁剪功能)

image

huanguang/yii2avatar

基于cropper的一款头像上传yii2组件(带裁剪功能)

  • Wednesday, April 12, 2017
  • by huanguang
  • Repository
  • 0 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 33 % Grown

The README.md

头像上传

基于cropper的一款头像上传yii2组件,, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist huanguang/yii2-avatar "dev-master"

or add, (*4)

"huanguang/yii2avatar": "dev-master"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)


//在当前控制器的actions中添加如下配置 public function actions() { return [ 'crop'=>[ 'class' => 'huanguang\avatar\CropAction', 'config'=>[ 'bigImageWidth' => '200', //大图默认宽度 'bigImageHeight' => '200', //大图默认高度 'middleImageWidth'=> '100', //中图默认宽度 'middleImageHeight'=> '100', //中图图默认高度 'smallImageWidth' => '50', //小图默认宽度 'smallImageHeight' => '50', //小图默认高度 //头像上传目录(注:目录前不能加"/") 'uploadPath' => 'uploads/avatar', ], 'baseUrl' => '@web/upload/avatar',//访问目录 'basePath' => '@webroot/upload/avatar',//磁盘目录 ] ]; } //调用方式,imageUrl为默认图地址 234 = \huanguang\yii2avatar\AvatarWidget::widget(['imageUrl'=>'/statics/images/avatar/avatar_1.jpg']); ?>

The Versions

12/04 2017

dev-master

9999999-dev

基于cropper的一款头像上传yii2组件(带裁剪功能)

  Sources   Download

BSD-4-Clause

The Requires

 

by Avatar huanguang

extension yii2

12/04 2017

1.1.2

1.1.2.0

基于cropper的一款头像上传yii2组件(带裁剪功能)

  Sources   Download

BSD-4-Clause

The Requires

 

by Avatar huanguang

extension yii2

11/04 2017

1.1.1

1.1.1.0

基于cropper的一款头像上传yii2组件(带裁剪功能)

  Sources   Download

BSD-4-Clause

The Requires

 

by Avatar huanguang

extension yii2

11/04 2017

1.1.0

1.1.0.0

基于cropper的一款头像上传yii2组件(带裁剪功能)

  Sources   Download

BSD-4-Clause

The Requires

 

by Avatar huanguang

extension yii2

11/04 2017

1.0.1

1.0.1.0

基于cropper的一款头像上传yii2组件(带裁剪功能)

  Sources   Download

BSD-4-Clause

The Requires

 

by Avatar huanguang

extension yii2

11/04 2017

1.0.0

1.0.0.0 https://github.com/huanguang/yii2avatar

Yii2 huanguang yii2avatar

  Sources   Download

MIT

The Requires

 

by yii2avatar water

yii2 yii2avatar