Kendo Toolbar获取按钮状态并重置为加载状态

时间:2016-08-29 15:59:17

标签: kendo-ui

我有两个问题,我找不到答案;

基于以下内容:

            $("#toolbar").kendoToolBar({

                            items: [

                                {
                                    type: "buttonGroup",
                                    

        id: "FilterControls",
                                buttons: [
                                    { id: "const", text: "Construction", spriteCssClass: "k-icon k-i-funnel", togglable: true, group: "filter", toggle: filterToggleHandler},
                                    

    { id: "lease", text: "Leasing", spriteCssClass: "k-icon k-i-funnel", togglable: true, group: "filter", toggle: filterToggleHandler },
                                { id: "legal", text: "Legal", spriteCssClass: "k-icon k-i-funnel", togglable: true, group: "filter", toggle: filterToggleHandler },
                                { id: "propt", text: "Property Management", spriteCssClass: "k-icon k-i-funnel", togglable: true, group: "filter", toggle: filterToggleHandler }
                            ]
                        

},
                     
                    { id: "mygreens", type: "button", text: "My Greens", spriteCssClass: "k-icon k-i-funnel", togglable: true, toggle: myToggleHandler },
                    { id: "clear", type: "button", text: "Clear", icon: "funnel-clear", click: filtClearall, togglable: false },
                    { is: "close", type: "button", text: "Close", spriteCssClass: "k-icon k-i-close", click: retOzone, togglable: false },
                ],
            });  
  

首先,如何从过滤器组的切换事件中告诉mygreens toogle按钮的状态

其次,如何在没有选择按钮的情况下将工具栏重置回初始状态,基于按钮清除单击 干杯

1 个答案:

答案 0 :(得分:0)

第一个问题:

filtClearall = function(){
          $('#FilterControls>a.k-state-active').removeClass('k-state-active');
            //remove filters from data source logic
           datasource.filter([]);    
          };

第二个问题:

<div id="indexVue">
  <child-vue :some-data="someData"></child-vue>
</div>