本文整理匯總了TypeScript中dnd-tree-view.clear函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript clear函數的具體用法?TypeScript clear怎麽用?TypeScript clear使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了clear函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: disable
export function disable() {
widget.clear();
(document.querySelector(".entries-buttons .new-asset") as HTMLButtonElement).disabled = true;
(document.querySelector(".entries-buttons .new-folder") as HTMLButtonElement).disabled = true;
(document.querySelector(".entries-buttons .search") as HTMLButtonElement).disabled = true;
(document.querySelector(".entries-buttons .rename-entry") as HTMLButtonElement).disabled = true;
(document.querySelector(".entries-buttons .duplicate-entry") as HTMLButtonElement).disabled = true;
(document.querySelector(".entries-buttons .trash-entry") as HTMLButtonElement).disabled = true;
(document.querySelector(".entries-buttons .filter") as HTMLButtonElement).disabled = true;
(document.querySelector(".filter-buttons") as HTMLDivElement).hidden = true;
(document.querySelector(".entries-tree-view .tree-loading") as HTMLDivElement).hidden = false;
}
示例2: refreshRegistry
export function refreshRegistry() {
if (registryServerProcess != null) return;
registry = null;
treeView.clear();
registryServerProcess = forkServerProcess([ "registry" ]);
updateUI();
registryServerProcess.on("message", onRegistryReceived);
registryServerProcess.on("exit", () => {
registryServerProcess = null;
updateUI();
});
}
示例3: refreshRegistry
function refreshRegistry() {
if (serverProcess != null) return;
registry = null;
treeView.clear();
refreshButton.disabled = true;
installOrUninstallButton.disabled = true;
updateButton.disabled = true;
serverProcess = forkServerProcess([ "registry" ]);
serverProcess.on("message", onRegistryReceived);
serverProcess.on("exit", () => {
serverProcess = null;
refreshButton.disabled = false;
});
}