This commit is contained in:
2025-04-30 16:43:52 +08:00
parent b1bb0e63f5
commit 1a7886450d
14 changed files with 276 additions and 53 deletions

View File

@@ -1,7 +1,10 @@
import router from "../router/index.js";
export const toPath = (path) => {
router.push(path).then();
export const toPath = (path, query = {}) => {
router.push({
path: path,
query: query
}).then();
}
export const VITE_TINYMCE_KEY = () => {
@@ -13,3 +16,8 @@ export const deleteObjectFields = (obj) => {
delete obj[key];
});
}
export const baseImage = (url) => {
if (!url) url = '';
return url.startsWith('http') ? url : import.meta.env.VITE_API_URL + url;
}