* perf: qps limit * perf: http response data * perf: json path check * fix: ts * loop support reference parent variable
10 lines
347 B
TypeScript
10 lines
347 B
TypeScript
import { useSystemStore } from './useSystemStore';
|
|
export const getDocPath = (path: string) => {
|
|
const feConfigs = useSystemStore.getState().feConfigs;
|
|
|
|
if (!feConfigs?.docUrl) return '';
|
|
if (!path.startsWith('/')) return path;
|
|
if (feConfigs.docUrl.endsWith('/')) return feConfigs.docUrl.slice(0, -1);
|
|
return feConfigs.docUrl + path;
|
|
};
|