【发布时间】:2017-09-08 10:40:09
【问题描述】:
我是 yii2 的新手,正在学习它。我在我的项目中安装了 yii2 导出菜单,然后它给出错误 = Class 'kartik\dialog\Dialog' not found 然后我也安装了 yii2 dialod 小部件,现在它给出了错误
Setting unknown property: yii\grid\GridView::export
谁能帮忙解决一下?
错误是
Unknown Property – yii\base\UnknownPropertyException
Setting unknown property: yii\grid\GridView::export
in C:\xampp\htdocs\yii2-my-app\vendor\yiisoft\yii2\base\Component.php at line 201
192193194195196197198199200201202203204205206207208209210 $behavior->$name = $value;
return;
}
}
if (method_exists($this, 'get' . $name)) {
throw new InvalidCallException('Setting read-only property: ' . get_class($this) . '::' . $name);
}
throw new UnknownPropertyException('Setting unknown property: ' . get_class($this) . '::' . $name);
}
/**
* Checks if a property is set, i.e. defined and not null.
* This method will check in the following order and act accordingly:
*
* - a property defined by a setter: return whether the property is set
* - a property of a behavior: return whether the property is set
* - return `false` for non existing properties
2. in C:\xampp\htdocs\yii2-my-app\vendor\yiisoft\yii2\BaseYii.php at line 529 – yii\base\Component::__set('export', ['fontAwesome' => true])
【问题讨论】:
-
您应该显示更多代码,而不仅仅是错误。如您所见,它唯一说的是您正在运行的
GridView没有export属性。可能您已经安装了不同的 GridView 小部件,但您仍在调用原始 Yii2 GridView 而不是调用具有此export参数的新部件。 -
是的,你是对的 .. 我通过安装 yii2 dynagrid 小部件来修复它
标签: yii