Skip to content

【Button】click 事件触发wave组件showWave()方法报错 #7106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
puppet-666 opened this issue Nov 13, 2023 · 16 comments · Fixed by #7108
Closed
1 task done

【Button】click 事件触发wave组件showWave()方法报错 #7106

puppet-666 opened this issue Nov 13, 2023 · 16 comments · Fixed by #7108
Labels

Comments

@puppet-666
Copy link
Contributor

puppet-666 commented Nov 13, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.0.7

Environment

System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Memory: 2.81 GB / 15.86 GB

Browsers:
Edge: Spartan (44.19041.1266.0)
Chromium (119.0.2151.58)
Internet Explorer: 11.0.19041.1566

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  • 使用 button 组件
  • 点击 button

What is expected?

What is actually happening?

  • 点击button报错
@puppet-666
Copy link
Contributor Author

另外,这个新的 pr 在 ConfigProvider 中也没有更新文档

@ramwin
Copy link

ramwin commented Nov 13, 2023

一样的问题。 这里有个小demo可以复现

https://github.com/ramwin/testvue/

访问: http://localhost:15173/testplugin 页面

@ramwin
Copy link

ramwin commented Nov 13, 2023

image

@zihao-code
Copy link

image

朋友,你解决了吗?我也遇到了相同的问题,点击button后控制台报错

@puppet-666
Copy link
Contributor Author

image

朋友,你解决了吗?我也遇到了相同的问题,点击button后控制台报错

先降级一下,把版本锁定在4.0.6吧,上面的修复pr还没有合并

@zyxeeker
Copy link

4.0.6依然存在此问题

@puppet-666
Copy link
Contributor Author

4.0.6依然存在此问题

可以看下node_modules里面真正安装的版本,4.0.6并没有加上wave配置,应该是不会有这个报错的

@zyxeeker
Copy link

4.0.6依然存在此问题

可以看下node_modules里面真正安装的版本,4.0.6并没有加上wave配置,应该是不会有这个报错的

我检查了下 现在已经可以了 谢谢

@tetap
Copy link

tetap commented Nov 24, 2023

同样发现了。

@H-hejin
Copy link

H-hejin commented Nov 24, 2023

这个问题是由什么导致的呢

@kovsu kovsu mentioned this issue Nov 24, 2023
1 task
@5A
Copy link

5A commented Dec 3, 2023

遇到了同样的问题,还以为是我引 plotly 库的时候动作太粗暴把 configProvider 干坏了。
降级到没有水波纹特效的 4.0.6 之后一切正常,只能暂时锁 4.0.6 版本了。
感谢维护者的辛苦付出,希望尽快 merge。

@kovsu kovsu mentioned this issue Dec 6, 2023
1 task
@godtang
Copy link

godtang commented Dec 6, 2023

+1
4.0.7发现这个问题
刚开始学习前端,自我怀疑了好久好久

@xiaoyaobishizhe
Copy link

xiaoyaobishizhe commented Dec 11, 2023

+1 4.0.7发现这个问题 刚开始学习前端,自我怀疑了好久好久

哥们我也是,我的版本是也是这个

@heshine0
Copy link

+1 4.0.7发现这个问题 刚开始学习前端,自我怀疑了好久好久

哥们我也是,我的版本是也是这个

我也遇到同样的问题

@luocong2016
Copy link

🐛 Bug 描述 Bug description

我在测试案例中发现,由于没有使用 ConfigProvider 包裹,是会报错的。
因为 config-provider/context.ts 中的 defaultConfigProvider 并没有覆盖到,
config-provider/hooks/useConfigInject.ts 中的 configProviderexport default 数据,所以
image

本测试案例的报错原因, configProvider.wave 是 undefined

 const wave = computed<{
    disabled?: boolean;
  }>(() => props.wave ?? configProvider.wave.value); // 这里 configProvider.wave 是 undefined

出错案例

<template>
  <Button @click="handleClick">Demo</Button>
</template>

<script setup>
const handleClick = () => {}
</script>

🏞 期望结果 Desired result

<!-- <ConfigProvider> -->
<div class="container">
  <Button @click="changeData">change data</Button>
</div>
<!-- </ConfigProvider> -->

不使用 ConfigProvider 作为全局包裹,组件也能正常使用。目前包装后就可以使用

🚑 其他信息 Other information

 "vue": "^3.3.8",
 "ant-design-vue": "4.x",

image

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet