Yii echmultiselect 在控制台上显示错误且无法正常工作
Yii echmultiselect showing error on console and not working
我按照 选项 3 此处 https://www.yiiframework.com/extension/echmultiselect#3-use-as-a-filter-in-cgridview 在我的 Yii 项目中添加 multiselect 下拉菜单。但它正在显示,
jquery.js:6920 Uncaught TypeError: jQuery.easing[this.easing] is not a
function
at init.run (jquery.js:6920)
在我的 cgridview 上,这是必须有多个 select 复选框的列,
array (
'name'=>'brand_id',
'filter'=> $this->widget('ext.EchMultiSelect.EchMultiSelect', array(
'model' => $model,
'dropDownAttribute' => 'brand_id',
'data' => CHtml::listData(Brands::model()->findAll(array("order" => "sortOrder")), 'id', 'name'),
'options' => array('buttonWidth' => 80, 'ajaxRefresh' => true,'filter'=>true),
),
true // capture output; needed so the widget displays inside the grid
),
),
在我的布局上,
我已经包含了 jquery,
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
下拉页面:
因为 jQuery.easing[this.easing] 不是函数错误,因此 multi-select 功能无法正常工作,按照此处的建议: I我也添加了 jquery UI,但即使它破坏了现有的下拉列表也不起作用。
控制台错误:
问题出在jquery.multiselect.js
(EchMultiSelect-v1.3) as the effect method arguments are inverted(至少对于当前的jQuery版本):
第 566、573、600 行的 .show( effect, speed )
和 .hide( effect, speed )
应替换为正确的顺序 .show( speed, effect )
和 .hide( speed, effect )
.
我按照 选项 3 此处 https://www.yiiframework.com/extension/echmultiselect#3-use-as-a-filter-in-cgridview 在我的 Yii 项目中添加 multiselect 下拉菜单。但它正在显示,
jquery.js:6920 Uncaught TypeError: jQuery.easing[this.easing] is not a function at init.run (jquery.js:6920)
在我的 cgridview 上,这是必须有多个 select 复选框的列,
array (
'name'=>'brand_id',
'filter'=> $this->widget('ext.EchMultiSelect.EchMultiSelect', array(
'model' => $model,
'dropDownAttribute' => 'brand_id',
'data' => CHtml::listData(Brands::model()->findAll(array("order" => "sortOrder")), 'id', 'name'),
'options' => array('buttonWidth' => 80, 'ajaxRefresh' => true,'filter'=>true),
),
true // capture output; needed so the widget displays inside the grid
),
),
在我的布局上,
我已经包含了 jquery,
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
下拉页面:
因为 jQuery.easing[this.easing] 不是函数错误,因此 multi-select 功能无法正常工作,按照此处的建议: I我也添加了 jquery UI,但即使它破坏了现有的下拉列表也不起作用。
控制台错误:
问题出在jquery.multiselect.js
(EchMultiSelect-v1.3) as the effect method arguments are inverted(至少对于当前的jQuery版本):
.show( effect, speed )
和 .hide( effect, speed )
应替换为正确的顺序 .show( speed, effect )
和 .hide( speed, effect )
.