(identifier: Identifier)
| 98 | } |
| 99 | |
| 100 | getAction(identifier: Identifier): ActionView { |
| 101 | if (!this.actions.has(identifier)) { |
| 102 | logger.toast(`动作 ${identifier} 不存在`); |
| 103 | return { id: identifier, type: "normal" } as ActionView; |
| 104 | } |
| 105 | const action = this.actions.get(identifier) as ActionView; |
| 106 | if (action && action.subMenuGenerator) { |
| 107 | action.submenu = action.subMenuGenerator(action.id); |
| 108 | } |
| 109 | return action; |
| 110 | } |
| 111 | |
| 112 | append(action: ActionInitOpt) { |
| 113 | if (!action.actionType) { |