Browse Source

将列表tamplate-button用法改为config用法

antshop
linyaostalker 5 years ago
parent
commit
f576c0eec0
  1. 40
      backend/modules/shop/models/searchs/ExpressAreaSearch.php

40
backend/modules/shop/models/searchs/ExpressAreaSearch.php

@ -82,30 +82,24 @@ class ExpressAreaSearch extends ExpressArea
[
'class' => 'iron\grid\ActionColumn',
'align' => 'center',
'template' => '{express-area-view} {express-area-update}',
'buttons' => [
'express-area-update' => function ($url, $model, $key) {
$options = [
'title' => Yii::t('yii', '修改'),
'aria-label' => Yii::t('yii', '修改'),
'data-method' => 'post',
'class' => 'oi oi-pencil',
];
return Html::a('', $url . '&expressTemplateId=' . $model->express_template, $options);
},
'express-area-view' => function ($url, $model, $key) {
$options = [
'title' => Yii::t('yii', '查看'),
'aria-label' => Yii::t('yii', '查看'),
'data-method' => 'post',
'class' => 'oi oi-list',
];
return Html::a('', $url . '&expressTemplateId=' . $model->express_template, $options);
},
'config' => [
[
'name' => 'express-area-view',
'icon' => 'list',
'title' => '详情',
],
[
'name' => 'express-area-update',
'icon' => 'pencil',
'title' => '修改'
],
// [
// 'name' => 'delete',
// 'icon' => 'trash',
// 'title' => '删除',
// 'contents' => '确定删除?'
// ]
],
'config' => [],
],
];
}

Loading…
Cancel
Save