feat(web): 升级至 v3.0 并重构组件与引导流程

- 提取应用引导逻辑至 useAppBootstrap 组合式函数
- 增强日期选择器组件,支持全类型与格式自动推导
- 修复资源泄漏:清理 RAF、定时器、事件与 mitt 监听
- 修复退出登录逻辑与异步导出流程
- 迁移 ::v-deep 至 Vue 3 标准 :deep 语法
- 移除调试日志并改进类型定义与注释文档
This commit is contained in:
zhangtao
2026-05-11 23:37:11 +08:00
parent 7e7a5c97cb
commit 9a231aa58c
120 changed files with 2282 additions and 1931 deletions
@@ -152,15 +152,14 @@ const queryFormData = reactive<DeptPageQuery>({
const loading = ref(true);
onBeforeMount(() => {
onBeforeMount(async () => {
loading.value = true;
DeptAPI.listDept(queryFormData)
.then((response) => {
deptOptions.value = formatTree(response.data.data);
})
.finally(() => {
loading.value = false;
});
try {
const response = await DeptAPI.listDept(queryFormData);
deptOptions.value = formatTree(response.data.data);
} finally {
loading.value = false;
}
});
</script>
@@ -54,7 +54,7 @@ const selectConfig: ISelectConfig = {
],
},
],
indexAction(params: UserPageQuery) {
async indexAction(params: UserPageQuery) {
// 映射查询参数到后端接口
const query: any = { ...params };
// 清理空字符串/空值,避免后端 422
@@ -70,12 +70,11 @@ const selectConfig: ISelectConfig = {
else if (query.status === "false") query.status = false;
}
// 请求用户分页列表并适配 TableSelect 需要的结构
return UserAPI.listUser(query).then((res: any) => {
return {
total: res.data.data.total,
list: res.data.data.items,
};
});
const res = await UserAPI.listUser(query);
return {
total: res.data.data.total,
list: res.data.data.items,
};
},
tableColumns: [
{ type: "selection", width: 50, align: "center" },