refactor:基于 lint 处理排版

This commit is contained in:
YunaiV
2025-04-22 22:10:33 +08:00
parent 3fe36fd823
commit fb785894b6
322 changed files with 4781 additions and 2093 deletions

View File

@@ -20,7 +20,7 @@ import { useAssignDataPermissionFormSchema } from '../data';
const emit = defineEmits(['success']);
const deptTree = ref<SystemDeptApi.SystemDept[]>([]); // 部门树
const deptTree = ref<SystemDeptApi.Dept[]>([]); // 部门树
const deptLoading = ref(false); // 加载部门列表
const isAllSelected = ref(false); // 全选状态
const isExpanded = ref(false); // 展开状态
@@ -64,7 +64,7 @@ const [Modal, modalApi] = useVbenModal({
if (!isOpen) {
return;
}
const data = modalApi.getData<SystemRoleApi.SystemRole>();
const data = modalApi.getData<SystemRoleApi.Role>();
if (!data || !data.id) {
return;
}
@@ -86,7 +86,7 @@ async function loadDeptTree() {
deptLoading.value = true;
try {
const data = await getDeptList();
deptTree.value = handleTree(data) as SystemDeptApi.SystemDept[];
deptTree.value = handleTree(data) as SystemDeptApi.Dept[];
} finally {
deptLoading.value = false;
}

View File

@@ -18,7 +18,7 @@ import { useAssignMenuFormSchema } from '../data';
const emit = defineEmits(['success']);
const menuTree = ref<SystemDeptApi.SystemDept[]>([]); // 菜单树
const menuTree = ref<SystemDeptApi.Dept[]>([]); // 菜单树
const menuLoading = ref(false); // 加载菜单列表
const isAllSelected = ref(false); // 全选状态
const isExpanded = ref(false); // 展开状态
@@ -59,7 +59,7 @@ const [Modal, modalApi] = useVbenModal({
if (!isOpen) {
return;
}
const data = modalApi.getData<SystemRoleApi.SystemRole>();
const data = modalApi.getData<SystemRoleApi.Role>();
if (!data || !data.id) {
return;
}
@@ -83,7 +83,7 @@ async function loadMenuTree() {
menuLoading.value = true;
try {
const data = await getMenuList();
menuTree.value = handleTree(data) as SystemDeptApi.SystemDept[];
menuTree.value = handleTree(data) as SystemDeptApi.Dept[];
} finally {
menuLoading.value = false;
}

View File

@@ -14,7 +14,7 @@ import { $t } from '#/locales';
import { useFormSchema } from '../data';
const emit = defineEmits(['success']);
const formData = ref<SystemRoleApi.SystemRole>();
const formData = ref<SystemRoleApi.Role>();
const getTitle = computed(() => {
return formData.value?.id
? $t('ui.actionTitle.edit', ['角色'])
@@ -35,7 +35,7 @@ const [Modal, modalApi] = useVbenModal({
}
modalApi.lock();
// 提交表单
const data = (await formApi.getValues()) as SystemRoleApi.SystemRole;
const data = (await formApi.getValues()) as SystemRoleApi.Role;
try {
await (formData.value?.id ? updateRole(data) : createRole(data));
// 关闭并提示
@@ -54,7 +54,7 @@ const [Modal, modalApi] = useVbenModal({
return;
}
// 加载数据
const data = modalApi.getData<SystemRoleApi.SystemRole>();
const data = modalApi.getData<SystemRoleApi.Role>();
if (!data || !data.id) {
return;
}