将 web-admin 从子模块改为仓库内普通目录,便于单仓克隆与维护。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-05-12 16:41:08 +08:00
1 parent 2e9d020d50
commit c87732fcd5
515 files changed
+74372 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { ElLoading } from 'element-plus'
const defaultOptions = {
lock: true,
background: 'rgba(0, 0, 0, 0.35)'
} as const
/** 全屏蒙层 + 异步任务;无论成功/失败都会在 finally 关闭 */
export async function withFullscreenLoading<T>(
task: () => Promise<T>,
text = '请稍候…'
): Promise<T> {
const inst = ElLoading.service({ ...defaultOptions, text })
try {
return await task()
} finally {
inst.close()
}
}
export const fullscreenLoadingText = {
save: '正在保存,请稍候…',
delete: '正在删除,请稍候…',
batchDelete: '正在批量删除,请稍候…'
} as const