feat(MineTask): 添加问卷列表拖动功能
- 在 Index.vue 中添加拖动开始和结束的事件处理函数 - 在 QuestionList.vue 中根据拖动状态显示/隐藏分页器和导航按钮 - 新增 useDragEvent 钩子用于管理拖动状态
This commit is contained in:
11
src/views/Home/components/MineTask/hooks/useDragEvent.ts
Normal file
11
src/views/Home/components/MineTask/hooks/useDragEvent.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { watch,ref } from "vue";
|
||||
|
||||
/**
|
||||
* 这个是用于判断是否正在拖动,来决定是否显示左右轮播图的按钮
|
||||
*/
|
||||
const isDrag = ref(false);
|
||||
|
||||
watch(isDrag, (val) => {
|
||||
// console.log('isDrag', val);
|
||||
})
|
||||
export {isDrag}
|
||||
Reference in New Issue
Block a user