本文整理汇总了TypeScript中@phosphor/widgets.Widget.setHidden方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Widget.setHidden方法的具体用法?TypeScript Widget.setHidden怎么用?TypeScript Widget.setHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@phosphor/widgets.Widget
的用法示例。
在下文中一共展示了Widget.setHidden方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: showInput
private showInput(shouldFocus: boolean): void {
this.updateInputNode();
if (this.filterWidget.isVisible) {
return;
}
this.filterWidget.setHidden(false);
if (shouldFocus) {
this.filterInput.focus();
}
}
示例2: addInputNode
private addInputNode(options: { x, y, width, height }): void {
this.filterWidget = new Widget();
this.filterNode = this.filterWidget.node;
this.filterNode.innerHTML = `<div class="input-clear">
<span class="fa filter-icon fa-filter"></span>
<input class="filter-input" type="text" title='${FILTER_INPUT_TOOLTIP}'>
<span class="fa fa-times clear-filter"></span>
</div>`;
this.filterNode.classList.add('input-clear-growing');
this.filterNode.style.width = `${options.width}px`;
this.filterNode.style.height = this.getInputHeight();
this.filterNode.style.left = `${options.x}px`;
this.filterNode.style.top = `${options.y}px`;
this.filterNode.style.position = 'absolute';
this.filterIcon = this.filterNode.querySelector('.filter-icon') || new HTMLSpanElement();
this.filterInput = this.filterNode.querySelector('input') || new HTMLInputElement();
this.clearIcon = this.filterNode.querySelector('.clear-filter') || new HTMLSpanElement();
this.filterInput.style.height = this.getInputHeight();
this.filterWidget.setHidden(true);
}
示例3: hideInput
hideInput() {
this.filterWidget.setHidden(true);
this.filterInput.value = '';
}