mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-23 17:50:25 +08:00
由于watchEffect,onMounted会立即执行,所以导致重复请求。 并且 watch函数和watchEffect监听的依赖重复了,故删去
This commit is contained in:
parent
89d7a19f3f
commit
607a24632a
@ -60,10 +60,6 @@
|
||||
emit('change', ...args);
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
props.immediate && fetch();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.params,
|
||||
() => {
|
||||
@ -85,7 +81,7 @@
|
||||
|
||||
async function fetch() {
|
||||
const { api } = props;
|
||||
if (!api || !isFunction(api)) return;
|
||||
if (!api || !isFunction(api) || loading.value) return;
|
||||
loading.value = true;
|
||||
treeData.value = [];
|
||||
let result;
|
||||
|
Loading…
Reference in New Issue
Block a user