限时 5折! 详情
DualListbox双列表控件,已选列表和未选列表位置调换问题
2 138 2017-09-02

该控件的github地址,https://github.com/softark/yii2-dual-listbox

下面是我的代码

echo DualListbox::widget([ 'model' => $model, 'attribute' => 'attrs_ids', 'items' => \yii\helpers\ArrayHelper::map($model->getAllAttr(), 'id', 'name'), // 'options' => [], 'clientOptions' => [ 'moveOnSelect' => true, 'selectedListLabel' => Yii::t('app.c2', 'Selected Items'), 'nonSelectedListLabel' => Yii::t('app.c2', 'Available Items'), ], ]);

  • 2 个回答
  • echo DualListbox::widget([
                'model' => $model,
                'attribute' => 'attrs_ids',
                'items' => \yii\helpers\ArrayHelper::map($model->getAllAttr(), 'id', 'name'),
    //            'options' => [],
                'clientOptions' => [
                    'moveOnSelect' => true,
                    'selectedListLabel' => Yii::t('app.c2', 'Selected Items'),
                    'nonSelectedListLabel' => Yii::t('app.c2', 'Available Items'),
                ],
            ]);

  • 额,这种个人组件还是建议给原作者直接发issue。

登录 去赚佣金