【问题标题】:Setting unknown property: yii\grid\GridView::export设置未知属性:yii\grid\GridView::export
【发布时间】: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


【解决方案1】:

使用 yii2 导出菜单小部件所需的小部件是=> 1.pdf 2 发电机 3 对话框 那么只有我们可以使用导出菜单小部件

【讨论】:

    猜你喜欢
    • 2017-07-13
    • 2018-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多