mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-09 10:56:46 +08:00
--fix 添加归属权
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user