reactor:【system 系统管理】tenantPackage 进一步统一代码风格

This commit is contained in:
YunaiV
2025-09-06 20:54:48 +08:00
parent 942c4ef389
commit 4cbbad4d40
6 changed files with 98 additions and 113 deletions

View File

@@ -102,7 +102,7 @@ async function loadMenuTree() {
}
/** 全选/全不选 */
function toggleSelectAll() {
function handleSelectAll() {
isAllSelected.value = !isAllSelected.value;
if (isAllSelected.value) {
const allIds = getAllNodeIds(menuTree.value);
@@ -113,7 +113,7 @@ function toggleSelectAll() {
}
/** 展开/折叠所有节点 */
function toggleExpandAll() {
function handleExpandAll() {
isExpanded.value = !isExpanded.value;
expandedKeys.value = isExpanded.value ? getAllNodeIds(menuTree.value) : [];
}
@@ -149,10 +149,10 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
</Form>
<template #prepend-footer>
<div class="flex flex-auto items-center">
<Checkbox :checked="isAllSelected" @change="toggleSelectAll">
<Checkbox :checked="isAllSelected" @change="handleSelectAll">
全选
</Checkbox>
<Checkbox :checked="isExpanded" @change="toggleExpandAll">
<Checkbox :checked="isExpanded" @change="handleExpandAll">
全部展开
</Checkbox>
</div>