diff --git a/src/pages/classification/components/Content.vue b/src/pages/classification/components/Content.vue
index a6ec13c..399c700 100644
--- a/src/pages/classification/components/Content.vue
+++ b/src/pages/classification/components/Content.vue
@@ -130,20 +130,20 @@
-
- -
-
- {{ getClassificationName(childClassification) }}
-
-
-
-
+
+ {{ getClassificationName(childClassification) }}
+
+
+
+
+
@@ -299,10 +307,17 @@ watch(
() => {
// +1
count.value = count.value + 1;
+ classificationChildShowHiddenMap.value = new Map();
// 刷新DOM完毕执行
nextTick(() => {
+ // 滚动条
+ createSimpleBar();
// 设置分类宽度
setClassificationWidth();
+ // 创建父级分类拖拽对象;
+ createClassificationParentSortable();
+ // 创建子级分类拖拽对象
+ createClassificationChildSortable();
});
}
);
@@ -787,6 +802,8 @@ function createClassificationParentSortable() {
setClassificationWidth();
// 页面高度 - 34(标题栏固定高度)
height.value = document.documentElement.clientHeight - 34;
+ // 创建子级分类拖拽对象
+ createClassificationChildSortable();
});
}
},
@@ -815,7 +832,7 @@ function createClassificationChildSortable() {
classificationChildSortable.push(
Sortable.create(element, {
animation: 0,
- forceFallback: true,
+ forceFallback: false,
fallbackTolerance: 4,
disabled: lockClassification,
onStart() {
diff --git a/src/pages/item/components/Content.vue b/src/pages/item/components/Content.vue
index c851ab4..8c37d21 100644
--- a/src/pages/item/components/Content.vue
+++ b/src/pages/item/components/Content.vue
@@ -154,6 +154,12 @@ watch(
nextTick(() => {
// 监听页面大小
resize();
+ // 设置项目宽度
+ setItemWidth();
+ // 创建项目拖拽对象
+ createItemSortable();
+ // 清除批量操作
+ clearBatchOperation();
// 滚动到顶部
scrollToTop(itemContentSimpleBar);
});