dvixi / yii2-icon-select
基于iconselect.js的yii2图像图标选择小部件
1.0.0
2016-05-18 12:02 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-18 19:56:48 UTC
README
基于iconselect.js的Yii2图像\图标选择器。
##安装
composer require dvixi/yii2-icon-select
##使用
$items = [
"icon1.png",
"icon2.png",
];
echo \dvixi\IconSelectWidget::widget([
'model' => $model,
'attribute' => 'attributeName',
'items' => $items,
'options' => [
//Html::activeInput() options
],
'pluginOptions' => [
// iconselect.js options
],
]);
或者
echo $form->field($model, 'attribute')->widget(\dvixi\IconSelectWidget::className(), [
'items' => $items,
'pluginOptions' => [...],
]);