|
|
@@ -219,6 +219,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
initData(json) {
|
|
|
+ // 防止switchPage将当前的空list保存到新加载的configList中
|
|
|
+ this.currentPageStep = ''
|
|
|
try {
|
|
|
const data = JSON.parse(json)
|
|
|
// 支持新格式
|
|
|
@@ -502,6 +504,23 @@ export default {
|
|
|
event.dataTransfer.dropEffect = 'copy'
|
|
|
// 添加视觉反馈
|
|
|
this.$el.querySelector('.view-body').classList.add('drag-over')
|
|
|
+
|
|
|
+ // 自动滚动逻辑
|
|
|
+ const container = this.$el.querySelector('.parent-container')
|
|
|
+ if (container) {
|
|
|
+ const rect = container.getBoundingClientRect()
|
|
|
+ const threshold = 60 // 边缘阈值
|
|
|
+ const scrollSpeed = 15 // 滚动速度
|
|
|
+
|
|
|
+ // 向下滚动
|
|
|
+ if (event.clientY > rect.bottom - threshold) {
|
|
|
+ container.scrollTop += scrollSpeed
|
|
|
+ }
|
|
|
+ // 向上滚动
|
|
|
+ else if (event.clientY < rect.top + threshold) {
|
|
|
+ container.scrollTop -= scrollSpeed
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
/** 处理拖拽离开预览区域 */
|
|
|
handleDragLeave(event) {
|
|
|
@@ -912,7 +931,7 @@ export default {
|
|
|
background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
|
|
|
overflow-y: auto;
|
|
|
border: none;
|
|
|
- padding: 24px 12px;
|
|
|
+ padding: 24px 12px 120px 12px;
|
|
|
border-radius: 0 0 4px 0;
|
|
|
display: flex;
|
|
|
justify-content: center;
|