You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
510 B
21 lines
510 B
2 years ago
|
/*
|
||
|
* @Author: weisheng
|
||
|
* @Date: 2023-03-21 19:57:00
|
||
|
* @LastEditTime: 2023-03-22 12:50:35
|
||
|
* @LastEditors: weisheng
|
||
|
* @Description:
|
||
|
* @FilePath: \fant-mini-plus\src\uni_modules\fant-mini\components\hd-swipe-action\index.ts
|
||
|
* 记得注释
|
||
|
*/
|
||
|
|
||
|
import { ref } from 'vue'
|
||
|
import { SwipeAction } from './types'
|
||
|
|
||
|
export function useSwipeAction(): SwipeAction {
|
||
|
const moveIndex = ref<number>(-1)
|
||
|
const updateIndex = (index: number) => {
|
||
|
moveIndex.value = index
|
||
|
}
|
||
|
return { moveIndex, updateIndex }
|
||
|
}
|