You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailchat/client/shared/manager/service.ts

9 lines
295 B
TypeScript

import { buildRegFnWithEvent } from './buildReg';
/**
* 获取服务器地址相关逻辑
* @default window.location.origin (前后端一体)
*/
export const [getServiceUrl, setServiceUrl, onServiceUrlChange] =
buildRegFnWithEvent<() => string>('serverUrl', () => window.location.origin);