Kendo ui 如何隐藏剑道模式窗口上的关闭按钮
我的angular应用程序中有一个剑道模式窗口。有时我会在一秒钟后自动关上窗户。在这些时候,我想隐藏关闭[x]按钮,但在其他时候,我不想。能在窗户打开前完成吗Kendo ui 如何隐藏剑道模式窗口上的关闭按钮,kendo-ui,kendo-window,Kendo Ui,Kendo Window,我的angular应用程序中有一个剑道模式窗口。有时我会在一秒钟后自动关上窗户。在这些时候,我想隐藏关闭[x]按钮,但在其他时候,我不想。能在窗户打开前完成吗 if (autoCloseDelay) { // hide the close [x] button here ?? $timeout( function() { $scope.modalWindow.close(); }, autoClose
if (autoCloseDelay) {
// hide the close [x] button here ??
$timeout( function() {
$scope.modalWindow.close();
}, autoCloseDelay, $scope);
}
$scope.modalWindow.open();
我相信你可以这样做:
// hide the close [x] button
$scope.modalWindow.parent().find(".k-window-action").css("visibility", "hidden");
下面是一个示例如果您不想使用CSS,可以使用
setOptions
以编程方式设置操作
删除关闭
按钮的示例:
// Get current actions
var actions = $scope.modalWindow.options.actions;
// Remove "Close" button
actions.splice(actions.indexOf("Close"), 1);
// Set the new options
$scope.modalWindow.setOptions({ actions : actions });
谢谢我可能可以采用这种方法,但它与角度剑道指令并不完全相同。因为这种方法“按原样”工作,所以它得到了绿色复选标记。谢谢