代码之家  ›  专栏  ›  技术社区  ›  Rashik

Kendo网格列可筛选道具上的Kendo Vue包装错误

  •  0
  • Rashik  · 技术社区  · 6 年前

    我试着用剑道网格上的下拉过滤器。但我发现了错误,

    Invalid prop: type check failed for prop "filterable". Expected Boolean, got Object 是的。

    <kendo-grid-column :filterable="{
            ui: statusFilter,
            operators: {
                string:{
                    eq : 'Is equal to'
                }
            }
        }" field="status" title="Client Status" width="10%"></kendo-grid-column>
    

    状态筛选方法

    statusFilter(element) {
      this.$http.get("list/getclientstatus").then(({ data }) => {
        element.kendoDropDownList({
          dataSource: data,
          dataTextField: "text",
          dataValueField: "value",
          optionLabel: "--Select Value--"
        });
      });
    

    我在用剑道 vue-templates 在网格上的动作方法,只能作为道具使用。

    https://www.telerik.com/kendo-vue-ui/components/framework/vue-templates/

    我使用的剑道格网版本:2018.2.516,

    所以,我不能用这个过滤器:

    columns: [
        {
          field: "status",
          title: "Client Status",
          filterable: {
            ui: this.statusFilter,
            operators: {
              string: {
                eq: "Is equal to"
              }
            }
          }
        }
    

    这种方法对我很有效。但可过滤的道具作为物体对我的案子不起作用。

    解决这个问题的办法是什么?

    请帮忙!

    1 回复  |  直到 6 年前
        1
  •  1
  •   Rashik    6 年前

    我更新了我的kendo vue ui包装器版本,它按预期工作。

    "@progress/kendo-grid-vue-wrapper": "^2018.2.620",
    
    推荐文章