Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop

This commit is contained in:
wyx
2023-01-31 18:42:48 +08:00
5 changed files with 88 additions and 122 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,