修复无界eventBus类型错误的问题

This commit is contained in:
fangxiang 2023-01-11 16:26:12 +08:00
parent e4faef2694
commit a81b7bbbc4
1 changed files with 13 additions and 4 deletions

View File

@ -39,9 +39,19 @@ export class CustomDefines {
function_mirroring_output = false; function_mirroring_output = false;
} }
export interface WuJieInterface { export interface IWuJieEventBis {
$on(event: string, fn: Function): IWuJieEventBis;
/** 任何$emit都会导致监听函数触发第一个参数为事件名后续的参数为$emit的参数 */
$onAll(fn: (event: string, ...args: Array<any>) => any): IWuJieEventBis;
$once(event: string, fn: Function): void;
$off(event: string, fn: Function): IWuJieEventBis;
$offAll(fn: Function): IWuJieEventBis;
$emit(event: string, ...args: Array<any>): IWuJieEventBis;
$clear(): IWuJieEventBis;
}
export interface IWuJieInterface {
props: any; props: any;
bus: EventEmitter; bus: IWuJieEventBis;
} }
export interface StateInterface { export interface StateInterface {
@ -86,7 +96,7 @@ export interface StateInterface {
isLedPlayer: () => boolean; isLedPlayer: () => boolean;
isSpecialVideo: () => boolean; isSpecialVideo: () => boolean;
$wujie: WuJieInterface | null; $wujie: IWuJieInterface | null;
// //
selected_projector: string; selected_projector: string;
EnableBlending: boolean; EnableBlending: boolean;
@ -306,7 +316,6 @@ export const storeKey: InjectionKey<VuexStore<StateInterface>> =
import window_color_list from "./window_color_list.js"; import window_color_list from "./window_color_list.js";
import { EProductNames } from "src/entities/ProductNames"; import { EProductNames } from "src/entities/ProductNames";
import EventEmitter from "events";
export const NullSignalSource = export const NullSignalSource =
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"; "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";