keygenqt / yii2-image-ajax
在网站上实现Ajax加载图像的简单方法
1.0.1
2022-06-17 10:32 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-24 01:41:06 UTC
README
这是Image Ajax小部件的Yii 2增强包装,用于Dropzone库。在网站上实现Ajax加载图像的简单方法。
安装
安装此扩展的首选方式是通过composer。
"require": {
"keygenqt/yii2-image-ajax": "*"
}
使用方法
<?= $form->field($model, 'image')->widget(ImageAjax::class, [ 'label' => false, 'btnSelect' => 'Choose', 'btnDelete' => 'Delete', 'url' => ['ajax/upload-image', 'type' => 'test'], 'subtitle' => 'This video will change its size to 360х360, so keep that in mind.', 'afterUpdate' => 'function() { console.log("call afterUpdate") }' ]) ?>
许可证
Copyright 2016-2024 Vitaliy Zarubin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://apache.ac.cn/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.