定制 amilna/yii2-elevatezoom 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

amilna/yii2-elevatezoom

Composer 安装命令:

composer require amilna/yii2-elevatezoom

包简介

Elevatezoom widget for Yii2

README 文档

README

An elevate zoom widget for Yii2 based on Elevate Zoom.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require "amilna/yii2-elevatezoom" "*"

or add

"amilna/yii2-elevatezoom" : "*"

to the require section of your application's composer.json file.

Usage

in View

	use amilna\elevatezoom\ElevateZoom;
 	
	$images = ['an url of zoom image 1','an url of zoom image n'];

	echo ElevateZoom::widget([
 		'images'=>$images,
		'baseUrl'=>Yii::$app->urlManager->baseUrl.'/upload',
		'smallPrefix'=>'/.thumbs',
		'mediumPrefix'=>'',
	]);

	/* //or another example set 'images' with 3 dimension array:
	$images'= [
		[	
			'image'=>'an url of zoom image 1',
			'small'=>'an url of gallery display image 1',
			'medium'=>'an url of basic display image 1'
		],
		[	
			'image'=>'an url of zoom image n',
			'small'=>'an url of gallery display image n',
			'medium'=>'an url of basic display image n'
		],
	];

	echo ElevateZoom::widget([
 		'images'=>$images,		
	]);
	*/


'images' is array of images (1 or 3 dimensions, if 1 dimensions then you should set baseUrl, smallPrefix and mediumPrefix) or activeDataProvider (if activeDataProvider you should set imageKey, smallKey and mediumKey)

available options:

  1. images
  2. css (custom css)
  3. baseUrl (string basic replacer of image url)
  4. smallPrefix (string replacer to get small size image url)
  5. mediumPrefix (string replacer to get medium size image url)
  6. imageKey (model atribute that store zoom size image)
  7. smallKey (model atribute that store small size image)
  8. mediumKey (model atribute that store medium size image)
  9. targetId (custom container id)
  10. options (please see examples)

统计信息

  • 总下载量: 12.34k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 9
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固