refactor: save

This commit is contained in:
zyronon 2024-04-16 23:26:14 +08:00
parent 5439b0f43b
commit 6ce731447a
2 changed files with 6 additions and 5 deletions

View File

@ -35,7 +35,8 @@ const state = reactive({
next: false,
start: { x: 0, y: 0, time: 0 },
move: { x: 0, y: 0 },
wrapper: { width: 0, height: 0, childrenLength: 0 }
wrapper: { width: 0, height: 0, childrenLength: 0 },
isDown: false
})
watch(
@ -85,9 +86,9 @@ function canNext(isNext) {
<div
class="slide-list flex-direction-column"
ref="wrapperEl"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
@pointerdown="touchStart"
@pointermove="touchMove"
@pointerup="touchEnd"
>
<slot></slot>
</div>

View File

@ -6,7 +6,7 @@ export function useNav() {
const router = useRouter()
const store = useBaseStore()
return (path, query = {}, data) => {
return (path, query = {}, data?: any) => {
if (data) {
store.routeData = cloneDeep(data)
}