Skip to content

Commit d140523

Browse files
puppet-666pangzebangtangjinzhou
authored
fix: useWave unref (#7108)
* fix: useWave unref * fix: wave init value * fix: wave value * Update useConfigInject.ts --------- Co-authored-by: pangzebang <[email protected]> Co-authored-by: tangjinzhou <[email protected]>
1 parent 91fe1b0 commit d140523

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/_util/wave/useWave.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import showWaveEffect from './WaveEffect';
55
export default function useWave(
66
instance: ComponentInternalInstance | null,
77
className: Ref<string>,
8-
wave: ComputedRef<{ disabled?: boolean }>,
8+
wave?: ComputedRef<{ disabled?: boolean }>,
99
): VoidFunction {
1010
function showWave() {
1111
const node = findDOMNode(instance);
1212

13-
if (wave.value?.disabled || !node) {
13+
if (wave?.value?.disabled || !node) {
1414
return;
1515
}
1616

components/config-provider/hooks/useConfigInject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default (name: string, props: Record<any, any>) => {
4444
const csp = computed(() => props.csp ?? configProvider.csp);
4545
const wave = computed<{
4646
disabled?: boolean;
47-
}>(() => props.wave ?? configProvider.wave.value);
47+
}>(() => props.wave ?? configProvider.wave?.value);
4848

4949
return {
5050
configProvider,

0 commit comments

Comments
 (0)