diff --git a/ui/console-src/modules/contents/posts/categories/CategoryList.vue b/ui/console-src/modules/contents/posts/categories/CategoryList.vue index 4ae231b63..c32c283d1 100644 --- a/ui/console-src/modules/contents/posts/categories/CategoryList.vue +++ b/ui/console-src/modules/contents/posts/categories/CategoryList.vue @@ -24,7 +24,6 @@ const { categories, categoriesTree, isLoading, handleFetchCategories } = usePostCategory(); const batchUpdating = ref(false); -const isDragging = ref(false); async function handleUpdateInBatch() { const categoriesTreeToUpdate = resetCategoriesTreePriority( @@ -56,7 +55,6 @@ async function handleUpdateInBatch() { } finally { await handleFetchCategories(); batchUpdating.value = false; - isDragging.value = false; } } @@ -130,16 +128,15 @@ async function handleUpdateInBatch() { :class="{ 'cursor-progress opacity-60': batchUpdating, }" + :disable-drag="batchUpdating" trigger-class="drag-element" :indent="40" @after-drop="handleUpdateInBatch" - @before-drag-start="isDragging = true" > diff --git a/ui/console-src/modules/contents/posts/categories/components/CategoryListItem.vue b/ui/console-src/modules/contents/posts/categories/components/CategoryListItem.vue index 03d053fb5..d282c171c 100644 --- a/ui/console-src/modules/contents/posts/categories/components/CategoryListItem.vue +++ b/ui/console-src/modules/contents/posts/categories/components/CategoryListItem.vue @@ -27,12 +27,10 @@ const queryClient = useQueryClient(); const props = withDefaults( defineProps<{ isChildLevel?: boolean; - isDragging?: boolean; categoryTreeNode: CategoryTreeNode; }>(), { isChildLevel: false, - isDragging: false, } ); @@ -92,9 +90,6 @@ const handleOpenCreateByParentModal = () => { diff --git a/ui/console-src/modules/interface/menus/Menus.vue b/ui/console-src/modules/interface/menus/Menus.vue index f95173717..ec5cf2a49 100644 --- a/ui/console-src/modules/interface/menus/Menus.vue +++ b/ui/console-src/modules/interface/menus/Menus.vue @@ -45,7 +45,6 @@ const selectedMenu = ref(); const selectedMenuItem = ref(); const selectedParentMenuItem = ref(); const menuItemEditingModal = ref(); -const isDragging = ref(false); const { data: menuItems, @@ -162,7 +161,6 @@ async function handleUpdateInBatch() { await queryClient.invalidateQueries({ queryKey: ["menus"] }); await refetch(); batchUpdating.value = false; - isDragging.value = false; } } @@ -312,10 +310,10 @@ function getMenuItemRefDisplayName(menuItem: MenuTreeItem) { :class="{ 'cursor-progress opacity-60': batchUpdating, }" + :disable-drag="batchUpdating" trigger-class="drag-element" :indent="40" @after-drop="handleUpdateInBatch" - @before-drag-start="isDragging = true" >