--fix 添加归属权

This commit is contained in:
yuping
2023-01-31 17:27:58 +08:00
parent a4542cf798
commit 9e972b2ae4
6 changed files with 28 additions and 21 deletions

View File

@@ -121,11 +121,17 @@ export function usePage(_url, params, init = true) {
})
if (isRef(params)) {
watch(params, () => {
watch(params.value, () => {
fetch()
})
}
if (isRef(_url)) {
watchEffect(fetch)
} else {
init && fetch()
}
function reset(){
state.data = []
state.loading = false
@@ -142,12 +148,6 @@ export function usePage(_url, params, init = true) {
})
}
if (isRef(_url)) {
watchEffect(fetch)
} else {
init && fetch()
}
return {
...toRefs(state),
fetch,