承接 consynki/yii2-image-input 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

consynki/yii2-image-input

最新稳定版本:1.0.0

Composer 安装命令:

composer require consynki/yii2-image-input

包简介

A Yii2input widget to allow a better drag drop image upload

README 文档

README

This extension provides a drag drop image field to inclusion within a standard Yii2 form. This extension dosn't provide any functionality for uploading the images, that can be done via the standard Yii form processing.

Installation

The preferred way to install this extension is through composer.

To install, either run

$ composer require consynki/yii2-image-input "*"

or add

"consynki/yii2-image-input": "*"

to the require section of your composer.json file.

Usage

Alert

You can use the image input in a standard Yii form.

<?php

    use consynki\yii\input\ImageInput;
    use yii\helpers\Html;
    use yii\widgets\ActiveForm;

?>

	<?php $form = ActiveForm::begin(); ?>

	<?= $form->field($model, 'image')->widget(ImageInput::className(), [
		'value' => '/img/current-image.png' //Optional current value
    ]); ?>

<?= Html::submitButton('Save', []) ?>

<?php ActiveForm::end(); ?>

You can pass in the optional value to display a default image as the current value of the field.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-05