Files
CompanyProject/芳林公司项目/stest/src/core/hooks/BroadcastChannel.hooks.ts
2024-09-27 01:32:49 +08:00

19 lines
524 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { computed,toRefs, Ref, ref, reactive } from '@vue/composition-api';
import { UnwrapRef } from '@vue/composition-api/dist/reactivity';
/**
* 注意广播只能在androidChromeEdgeFirefoxOpera中使用
* 不支持IESafari 等浏览器,请注意兼容性
* @constructor
*/
export function HelpingPopupBroadcastChannel() {
const state: UnwrapRef<{
HelpingSuccess: BroadcastChannel
}> = {
HelpingSuccess: new BroadcastChannel('HelpingSuccess')
};
return {
...toRefs(state)
}
}