mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-26 21:51:40 +00:00
由于watchEffect,onMounted会立即执行,所以导致重复请求。 并且 watch函数和watchEffect监听的依赖重复了,故删去
This commit is contained in:
@@ -60,10 +60,6 @@
|
|||||||
emit('change', ...args);
|
emit('change', ...args);
|
||||||
}
|
}
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
props.immediate && fetch();
|
|
||||||
});
|
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.params,
|
() => props.params,
|
||||||
() => {
|
() => {
|
||||||
@@ -85,7 +81,7 @@
|
|||||||
|
|
||||||
async function fetch() {
|
async function fetch() {
|
||||||
const { api } = props;
|
const { api } = props;
|
||||||
if (!api || !isFunction(api)) return;
|
if (!api || !isFunction(api) || loading.value) return;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
treeData.value = [];
|
treeData.value = [];
|
||||||
let result;
|
let result;
|
||||||
|
Reference in New Issue
Block a user