• <menu id="w2i4a"></menu>
  • logo telerik中文文檔

    事件


    立即下載Kendo UI for jQuery

    Kendo UI ActionSheet為自定義功能提供了簡單的配置或擴展點。

    open

    打開ActionSheet時觸發(fā)open事件。

    下面的例子演示了如何訂閱組件的open事件:


    <div id="actionsheet"></div>
    <button id="openActionSheetBttn">OPEN ACTION SHEET</button>
    <script>
    var actionsheet = $('#actionsheet').kendoActionSheet({
    title:'Select item',
    items:[
    {
    text: 'Edit Item',
    iconClass: 'k-icon k-i-edit',
    description: "Select to enter edit mode.",
    click: onClick
    },
    {
    text: 'Add to Favorites',
    iconClass: 'k-icon k-i-heart',
    click: onClick
    },
    {
    text: 'Cancel',
    iconClass: 'k-icon k-i-cancel',
    group: 'bottom',
    click: onClick
    },
    ],
    open: onOpen
    }).data('kendoActionSheet');
    
    function onClick(e) {
    e.preventDefault();
    actionsheet.close();
    }
    
    function onOpen() {
    console.log("Open fired!")
    // your custom logic here
    }
    
    $("#openActionSheetBttn").kendoButton({
    click: function (e) {
    actionsheet.open()
    }
    });
    </script


    Close

    close事件在ActionSheet關(guān)閉時觸發(fā)。

    下面的例子演示了如何訂閱組件的open事件:


    <div id="actionsheet"></div>
    <button id="openActionSheetBttn">OPEN ACTION SHEET</button>
    <script>
    var actionsheet = $('#actionsheet').kendoActionSheet({
    title:'Select item',
    items:[
    {
    text: 'Edit Item',
    iconClass: 'k-icon k-i-edit',
    description: "Select to enter edit mode.",
    click: onClick
    },
    {
    text: 'Add to Favorites',
    iconClass: 'k-icon k-i-heart',
    click: onClick
    },
    {
    text: 'Cancel',
    iconClass: 'k-icon k-i-cancel',
    group: 'bottom',
    click: onClick
    },
    ],
    close: onClose
    }).data('kendoActionSheet');
    
    function onClick(e) {
    e.preventDefault();
    actionsheet.close();
    }
    
    function onClose() {
    console.log("Close fired!")
    // your custom logic here
    }
    
    $("#openActionSheetBttn").kendoButton({
    click: function (e) {
    actionsheet.open()
    }
    });
    </script


    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();