透過集合功能整理內容
你可以依據偏好儲存及分類內容。
封鎖 >DeleteArea
DeleteArea 類別
元件的抽象類別,可刪除區塊或置於它上方的泡泡。
Signature:
export declare class DeleteArea extends DragTarget implements IDeleteArea
擴充: DragTarget
實作: IDeleteArea
建構函式
建構函式 |
修飾符 |
說明 |
(建構函式)() |
|
DeleteArea 的建構函式。不應直接呼叫,只能由子類別呼叫。 |
屬性
屬性 |
修飾符 |
類型 |
說明 |
id |
|
字串 |
這個元件的專屬 ID,用來向 ComponentManager 註冊。 |
wouldDelete_ |
protected |
布林值 |
如果拖到這個刪除區域,系統會刪除最後一個區塊或對話框。刪除區塊或泡泡刪除後,這個屬性不會更新。 |
方法
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[],["The `DeleteArea` class, extending `DragTarget` and implementing `IDeleteArea`, manages the deletion of blocks or bubbles. It features a constructor and properties like `id` and `wouldDelete_`, the later tracking whether a dragged element would be deleted if dropped. Key methods include `updateWouldDelete_`, which manages the `wouldDelete_` state, and `wouldDelete`, determining if a dragged element is deletable. This class does not allow being directly instantiated, only used through subclasses.\n"]]