refactor: save
This commit is contained in:
parent
5439b0f43b
commit
6ce731447a
@ -35,7 +35,8 @@ const state = reactive({
|
|||||||
next: false,
|
next: false,
|
||||||
start: { x: 0, y: 0, time: 0 },
|
start: { x: 0, y: 0, time: 0 },
|
||||||
move: { x: 0, y: 0 },
|
move: { x: 0, y: 0 },
|
||||||
wrapper: { width: 0, height: 0, childrenLength: 0 }
|
wrapper: { width: 0, height: 0, childrenLength: 0 },
|
||||||
|
isDown: false
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
@ -85,9 +86,9 @@ function canNext(isNext) {
|
|||||||
<div
|
<div
|
||||||
class="slide-list flex-direction-column"
|
class="slide-list flex-direction-column"
|
||||||
ref="wrapperEl"
|
ref="wrapperEl"
|
||||||
@touchstart="touchStart"
|
@pointerdown="touchStart"
|
||||||
@touchmove="touchMove"
|
@pointermove="touchMove"
|
||||||
@touchend="touchEnd"
|
@pointerup="touchEnd"
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -6,7 +6,7 @@ export function useNav() {
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const store = useBaseStore()
|
const store = useBaseStore()
|
||||||
|
|
||||||
return (path, query = {}, data) => {
|
return (path, query = {}, data?: any) => {
|
||||||
if (data) {
|
if (data) {
|
||||||
store.routeData = cloneDeep(data)
|
store.routeData = cloneDeep(data)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user