Browse Source

增加参数deleteScript注释

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
b2c185c918
  1. 22
      vendor/iron/widgets/Upload.php

22
vendor/iron/widgets/Upload.php

@ -104,6 +104,28 @@ class Upload extends InputWidget
/** /**
* @var * @var
* 删除图片触发方法 * 删除图片触发方法
* $.ajax({
* url: 'img-id-del',
* data: {data: data, imgid: $('#goods-image').val()},
* success: function(data)
* {
* $('#goods-image').val(data);
* },
* });
*
* 路由方法
* public function actionImgIdDel()
* {
* $alias = Yii::$app->request->get('data')['alias'];
* $imgid = Yii::$app->request->get('imgid');
* $imgidarr = explode(',', $imgid);
* $temfile = TemFile::findOne(['alias' => $alias]);
* if ($temfile) {
* $imgidarr = array_diff($imgidarr, [$temfile->id]);
* }
* $imgidstr = implode(',', $imgidarr);
* return $imgidstr;
* }
*/ */
public $deleteScript; public $deleteScript;

Loading…
Cancel
Save