透過集合功能整理內容
你可以依據偏好儲存及分類內容。
blockly > Events > Abstract
Events.Abstract 類別
事件的抽象類別。
Signature:
export declare abstract class Abstract
建構函式
屬性
屬性 |
修飾符 |
類型 |
說明 |
群組 |
|
字串 |
這個區塊所關聯的事件群組 ID。 群組會定義從使用者角度來看應視為單一動作的事件,並應一併取消。 |
isBlank |
abstract |
布林值 |
事件是否在未提供必要參數的情況下建構 (由 fromJson 填入)。 |
isUiEvent |
|
布林值 |
事件是否為 UI 事件。 |
recordUndo |
|
布林值 |
這個事件是否可復原。 |
type |
|
字串 |
這個事件的類型。 |
workspaceId? |
|
字串 |
(選用) 這個事件的工作區 ID。 |
方法
除非另有註明,否則本頁面中的內容是採用創用 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 `Events.Abstract` class serves as a base for event handling. Key properties include a `group` ID for related events, `isBlank` indicating incomplete construction, `isUiEvent` denoting UI-related events, and `recordUndo` determining if the event is undoable. Each event has a `type` and optionally a `workspaceId`. Core methods include `isNull()` to check for state change, `run()` to execute the event, and `toJson()` for JSON encoding.\n"]]