如何为Kendo Window添加遮罩禁用后台交互?modal属性设置无效
Kendo UI Window 模态化配置修正
你之前通过htmlAttributes设置modal属性的方式不对,Kendo UI Window的模态行为是通过组件自身的配置项直接开启的,不需要放到htmlAttributes里。
修正后的代码如下:
const windowRef = this.windowService.open({ title: compTitle, content: compName, cssClass: "menu-window", modal: true // 直接添加这个配置项 });
当设置modal: true后,窗口会自动生成遮罩层,禁用后方页面的点击事件,同时不影响你查看窗口后方的数据,完全符合你的需求。
内容的提问来源于stack exchange,提问作者Krishnan Kamalesh
相关产品推荐
相关产品推荐

