如何使用传统的剑道

时间:2016-02-18 16:07:54

标签: kendo-ui reactjs

我使用的是Kendo.UI v2013.3.1119。我在Chrome控制台中运行了window.kendo.ui,它返回了各种对象,包括" Alert"我在current API.中没有看到。在同一个列表中,我看到" ButtonGroup",而不是" Button"。

我在遗留代码中工作,我怀疑他们已经搞乱了KendoUI代码。没有错误,但这可能是因为遗留代码集成。

我试图在反应中执行此代码并且它无效。

window.kendo.ui控制台输出

    Object {roles: Object, validator: Object}
ActionDropdown: (t,i)
Alert: (n,i)
AutoComplete: (t,u)
ButtonGroup: (n,i)
Calendar: (t,u)
ColumnMenu: (r,f)
ComboBox: (u,f)
ConfigurableInput: (n,t)
DatePicker: ()DateTimePicker: (n,t)Draggable: (n,t)DropDownList: ()DropTarget: (n,t)DropTargetArea: (n,t)Editable: (t,i)EmployeeSearchTextBox: (n,i)FilterMenu: (u,f)FormattedTextBox: (n,t)Grid: (r,u)Groupable: (h,c)GroupedDropDownList: (i,r)List: (t,i)ListView: (r,u)Menu: (t,f)Movable: (t)MultiSelect: (i,r)Pager: (t,o)Pane: (n)PaneDimensions: (n)PanelBar: ()Phone: (n,t)Popup: ()ProgressBar: (n,i)RangeSlider: (i,r)Reorderable: (e,o)Repeater: (i,r)Resizable: (n,t)SearchTextBox: (n,i)Select: (n,t)Selectable: (t,r)Slider: (t,i)Sortable: ()Splitter: (n,t)SubWindow: (n,t)TimePicker: (n,t)Tooltip: ()TreeView: (n,t)Upload: (t,i)UserSearchTextBox: (n,i)Validator: (n,i)VirtualScrollable: (n,t)Widget: (n,t)Window: ()plugin: (t,u,e)progress: (i,r,u)roles: Objectvalidator: Object__proto__: Object

我试过的代码:

  runjQuery: function() {
    console.log('successfully called jquery function');

    //$("#editor").kendoEditor();
    $("p").text("DAA DAA DAA DUU DA DUMM DUU DA DUMM");
    console.log('made it to middle of func');//makes it here
    $("#testButton").kendoButton();//fail
    console.log('made it to end of func');
  },

  render: function() {    
    return (
      <div className="jumbotron">
        <h1>Absence Management</h1>
        <p>Time Off, Accruals and all the things</p>
        <input type="text" id="phone_number" />
        <button id="testButton">Vader</button>
        <label id="editor" />
        {this.runjQuery()}
      </div>
    );
  }
});

旧的API文档是否可用?

2 个答案:

答案 0 :(得分:1)

从我的回忆中,2013版的Kendo UI中没有按钮小部件。您必须手动添加Kendo CSS类(即k-button)和点击功能。

答案 1 :(得分:1)

查看https://github.com/wingspan/wingspan-forms

它是一个用于包装剑道ui的反应的表单库。