根据telerik文档,Kendo窗口还原应调用resize事件。当窗口最大化时,它就像记录的那样工作。然后恢复。但是,当窗口最小化时,它不会调用resize事件。然后恢复。当窗口最小化时,我想添加一些逻辑。然后恢复。任何想法我怎么能实现这一点。这是一个示例剑道窗口
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.common.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.rtl.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.silver.min.css"/>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.mobile.all.min.css"/>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.1.412/js/kendo.all.min.js"> </script>
</head>
<body>
<div id="dialog"></div>
<script>
$("#dialog").kendoWindow({
width: "90%",
height: "90%",
title: "Lease Log",
position: { top: "5%", left: "5%" },
actions: [
"Pin",
"Minimize",
"Maximize",
"Close"
],
resize: function(){
alert("resized")
},
restore: function(){
alert("restored")
},
maximize: function(){
alert("maximized")
},
minWidth: 500,
minHeight: 300
});
</script>
</body>
</html>
答案 0 :(得分:1)
Per Telerik的documentation他们没有恢复事件。我唯一能想到的就是从窗口的最小化和最大化事件中添加一个鼠标按下事件到恢复图标:
$('.k-i-restore').on("mousedown", function (e) {
console.log('restored');
});