@vtj/utils
Version:
VTJ 是一款基于 Vue3 + Typescript 的低代码页面可视化设计器。内置低代码引擎、渲染器和代码生成器,面向前端开发者,开箱即用。 无缝嵌入本地开发工程,不改变前端开发流程和编码习惯。
21 lines (20 loc) • 617 B
TypeScript
/**
* 获取当前页面的 host
*/
export declare function getCurrentHost(includePath: boolean): string | null;
/**
* 获取指定url的host
*/
export declare function getHost(url?: string): string;
/**
* 键值对转换成查询字符串
*/
export declare function stringify(query: Record<string, any>): string;
/**
* 参数字符串转换成对象形式,如:a=1&b=2 转换成 {a:1, b:2}
*/
export declare function parse(str: string, sep?: string, eq?: string): Record<string, any>;
/**
* 在url追加参数
*/
export declare function append(url: string, query: string | Record<string, any>): string;