mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
fix(ApiSelect): 修复监听不到params的变动
This commit is contained in:
parent
fdde6f06b2
commit
ccf4027533
@ -26,7 +26,7 @@
|
|||||||
import type { SelectValue } from 'ant-design-vue/es/select';
|
import type { SelectValue } from 'ant-design-vue/es/select';
|
||||||
import { isFunction } from '@/utils/is';
|
import { isFunction } from '@/utils/is';
|
||||||
import { useRuleFormItem } from '@/hooks/component/useFormItem';
|
import { useRuleFormItem } from '@/hooks/component/useFormItem';
|
||||||
import { get, omit } from 'lodash-es';
|
import { get, omit, isEqual } from 'lodash-es';
|
||||||
import { LoadingOutlined } from '@ant-design/icons-vue';
|
import { LoadingOutlined } from '@ant-design/icons-vue';
|
||||||
import { useI18n } from '@/hooks/web/useI18n';
|
import { useI18n } from '@/hooks/web/useI18n';
|
||||||
import { propTypes } from '@/utils/propTypes';
|
import { propTypes } from '@/utils/propTypes';
|
||||||
@ -95,8 +95,9 @@
|
|||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.params,
|
() => props.params,
|
||||||
() => {
|
(value, oldValue) => {
|
||||||
!unref(isFirstLoaded) && fetch();
|
if (isEqual(value, oldValue)) return;
|
||||||
|
fetch();
|
||||||
},
|
},
|
||||||
{ deep: true, immediate: props.immediate },
|
{ deep: true, immediate: props.immediate },
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user