No Description

CmdMsg.ts 318B

1234567891011121314151617
  1. import { MsgBase, MsgType } from './MsgBase';
  2. export class CmdMsg extends MsgBase {
  3. msgType: MsgType = 'cmd';
  4. // 消息内容
  5. msg: string;
  6. // 命令
  7. action: string;
  8. static createMsg(baseMsg: Partial<CmdMsg>): CmdMsg {
  9. const msg = new CmdMsg();
  10. Object.assign(msg, baseMsg);
  11. return msg;
  12. }
  13. }