Browse Source

fix: useWave unref (#7108)

* fix: useWave unref

* fix: wave init value

* fix: wave value

* Update useConfigInject.ts

---------

Co-authored-by: pangzebang <pangzebang@dm-ai.com>
Co-authored-by: tangjinzhou <415800467@qq.com>
feat-4.1
puppetkkk 11 months ago committed by GitHub
parent
commit
d140523c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/_util/wave/useWave.ts
  2. 2
      components/config-provider/hooks/useConfigInject.ts

4
components/_util/wave/useWave.ts

@ -5,12 +5,12 @@ import showWaveEffect from './WaveEffect';
export default function useWave(
instance: ComponentInternalInstance | null,
className: Ref<string>,
wave: ComputedRef<{ disabled?: boolean }>,
wave?: ComputedRef<{ disabled?: boolean }>,
): VoidFunction {
function showWave() {
const node = findDOMNode(instance);
if (wave.value?.disabled || !node) {
if (wave?.value?.disabled || !node) {
return;
}

2
components/config-provider/hooks/useConfigInject.ts

@ -44,7 +44,7 @@ export default (name: string, props: Record<any, any>) => {
const csp = computed(() => props.csp ?? configProvider.csp);
const wave = computed<{
disabled?: boolean;
}>(() => props.wave ?? configProvider.wave.value);
}>(() => props.wave ?? configProvider.wave?.value);
return {
configProvider,

Loading…
Cancel
Save