重构项目文件夹目录

This commit is contained in:
2026-06-15 15:53:55 +08:00
parent 8093e07190
commit 7cbe5b3de5
1098 changed files with 34 additions and 4441 deletions
+58
View File
@@ -0,0 +1,58 @@
import zhCN from 'ant-design-vue/es/locale/zh_CN'
/**
* Purpose: baseCalendar supports antdv-locale.ts by holding or executing the base calendar page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const baseCalendar = (zhCN.Calendar || { lang: {} }) as any
/**
* Purpose: baseDatePicker supports antdv-locale.ts by holding or executing the base date picker page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const baseDatePicker = (zhCN.DatePicker || { lang: {}, timePickerLocale: {} }) as any
/**
* Purpose: baseTimePicker supports antdv-locale.ts by holding or executing the base time picker page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const baseTimePicker = (zhCN.TimePicker || {}) as any
const antdLocale: any = {
...zhCN,
Modal: {
...zhCN.Modal,
okText: '确认',
cancelText: zhCN.Modal?.cancelText || '取消',
justOkText: zhCN.Modal?.justOkText || '知道了'
},
Popconfirm: {
...zhCN.Popconfirm,
okText: '确认',
cancelText: zhCN.Popconfirm?.cancelText || '取消'
},
Calendar: {
...baseCalendar,
lang: {
...baseCalendar.lang,
ok: '确认',
now: '现在时间'
}
},
DatePicker: {
...baseDatePicker,
lang: {
...baseDatePicker.lang,
ok: '确认',
now: '现在时间'
},
timePickerLocale: {
...baseDatePicker.timePickerLocale,
now: '现在时间'
}
},
TimePicker: {
...baseTimePicker,
now: '现在时间'
}
}
export default antdLocale
+40
View File
@@ -0,0 +1,40 @@
/**
* Purpose: normalizeBaseUrl supports api.ts by holding or executing the normalize base url page or API role.
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
*/
function normalizeBaseUrl(value: string | undefined, fallbackValue: string) {
const target = String(value || fallbackValue).trim()
return target.replace(/\/+$/, '')
}
/**
* Purpose: DEFAULT_API_BASE_URL supports api.ts by holding or executing the default api base url page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const DEFAULT_API_BASE_URL = import.meta.env.DEV ? '/api' : 'https://yunail.art/api'
/**
* Purpose: DEFAULT_ADMIN_API_BASE_URL supports api.ts by holding or executing the default admin api base url page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
const DEFAULT_ADMIN_API_BASE_URL = import.meta.env.DEV ? '/admin/api' : 'https://yunail.art/admin/api'
/**
* Purpose: API_CONFIG supports api.ts by holding or executing the api config page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const API_CONFIG = {
mode: import.meta.env.MODE,
apiBaseUrl: normalizeBaseUrl(import.meta.env.VITE_API_BASE_URL, DEFAULT_API_BASE_URL),
adminApiBaseUrl: normalizeBaseUrl(import.meta.env.VITE_ADMIN_API_BASE_URL, DEFAULT_ADMIN_API_BASE_URL)
}
/**
* Purpose: API_BASE_URL supports api.ts by holding or executing the api base url page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const API_BASE_URL = API_CONFIG.apiBaseUrl
/**
* Purpose: ADMIN_API_BASE_URL supports api.ts by holding or executing the admin api base url page or API role.
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
*/
export const ADMIN_API_BASE_URL = API_CONFIG.adminApiBaseUrl