diff --git a/package.json b/package.json index 4fe8f06..e54b0c6 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "module": "./dist/timi-web.mjs", "style": "./dist/timi-web.css", "private": false, - "version": "0.0.3", + "version": "0.0.4", "license": "MIT", "scripts": { "dev": "vite", diff --git a/src/api/CommonAPI.ts b/src/api/CommonAPI.ts index 59e30d2..30f7a8b 100644 --- a/src/api/CommonAPI.ts +++ b/src/api/CommonAPI.ts @@ -1,6 +1,7 @@ import { TemplateBizType } from "../types"; import Toolkit from "../utils/Toolkit"; import { axios } from "./BaseAPI"; +import TextFormat from "../utils/TextFormat"; const getCaptchaAPI = () => axios.defaults.baseURL + "/captcha"; @@ -11,7 +12,7 @@ async function getTemplate(bizType: TemplateBizType, code: string): Promise { - return axios.get(`/setting/${key}?${Toolkit.toURLArgs(args)}`); + return axios.get(`/setting/${key}?${TextFormat.urlArgs(args)}`); } async function listSetting(keyMap: Map): Promise> { diff --git a/src/utils/FormatText.ts b/src/utils/TextFormat.ts similarity index 97% rename from src/utils/FormatText.ts rename to src/utils/TextFormat.ts index 4817dbe..5fda045 100644 --- a/src/utils/FormatText.ts +++ b/src/utils/TextFormat.ts @@ -1,6 +1,6 @@ import IOSize from "./IOSize"; -export default class FormatText { +export default class TextFormat { public static keyValue(obj: object, assign: string, split: string): string { let result = ""; diff --git a/src/utils/index.ts b/src/utils/index.ts index 3a10498..bf34e40 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -7,7 +7,7 @@ export { default as Prismjs } from "./Prismjs"; export { default as Resizer } from "./Resizer"; export { default as Scroller } from "./Scroller"; export { default as Storage } from "./Storage"; -export { default as Format } from "./FormatText"; +export { default as Format } from "./TextFormat"; export { default as Time } from "./Time"; export { default as Toolkit } from "./Toolkit"; export { default as IconMapper } from "./IconMapper";