fix: TODO 修改

pull/160/head
jason 2025-06-27 23:18:42 +08:00
parent 374335a3c1
commit c4930bc52c
2 changed files with 7 additions and 8 deletions

View File

@ -7,7 +7,6 @@ import { Page, useVbenModal } from '@vben/common-ui';
import { IconifyIcon } from '@vben/icons';
import { cloneDeep } from '@vben/utils';
import { refAutoReset } from '@vueuse/core';
import { useSortable } from '@vueuse/integrations/useSortable';
import { Button, Card, Dropdown, Input, Menu, message } from 'ant-design-vue';
@ -28,7 +27,7 @@ const [CategoryFormModal, categoryFormModalApi] = useVbenModal({
destroyOnClose: true,
});
//
const modelListSpinning = refAutoReset(false, 3000);
const modelListSpinning = ref(false);
//
const saveSortLoading = ref(false);
// category
@ -148,7 +147,6 @@ async function handleCategorySortSubmit() {
<template>
<Page auto-content-height>
<!-- TODO @jason体感整个页面的加载有点卡顿先看到分类大概 1-2 秒后上箭头变成下然后看到每个模型我本地大概 4 个分类每个分类下 20+ 模型 -->
<!-- 流程分类表单弹窗 -->
<CategoryFormModal @success="getList" />
<Card
@ -212,11 +210,12 @@ async function handleCategorySortSubmit() {
<!-- 按照分类展示其所属的模型列表 -->
<div class="px-3" ref="categoryGroupRef">
<CategoryDraggableModel
v-for="element in categoryGroup"
v-for="(element, index) in categoryGroup"
:class="isCategorySorting ? 'cursor-move' : ''"
:key="element.id"
:category-info="element"
:is-category-sorting="isCategorySorting"
:is-first="index === 0"
@success="getList"
/>
</div>

View File

@ -45,6 +45,7 @@ import { useGridColumns } from './data';
const props = defineProps<{
categoryInfo: ModelCategoryInfo;
isCategorySorting: boolean;
isFirst?: boolean; //
}>();
const emit = defineEmits(['success']);
@ -68,7 +69,8 @@ const userId = userStore.userInfo?.id;
const isModelSorting = ref(false);
const originalData = ref<BpmModelApi.Model[]>([]);
const modelList = ref<BpmModelApi.Model[]>([]);
const isExpand = ref(false);
// ,
const isExpand = ref(!!props.isFirst);
const [Grid, gridApi] = useVbenVxeGrid({
gridOptions: {
@ -376,9 +378,7 @@ const updateModelList = useDebounceFn(() => {
const newModelList = props.categoryInfo.modelList;
if (!isEqual(modelList.value, newModelList)) {
modelList.value = cloneDeep(newModelList);
if (newModelList?.length > 0) {
isExpand.value = true;
}
//
//
isModelSorting.value = false;
//