-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Console error message "xx.confirm is not a function" and not show dialog. #5763
Comments
Hello @wengx-unx. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch, fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! 你好 @wengx-unx,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支,务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 |
Has this problem been fixed? |
Not yet |
After verification, under the premise of the same environment, the pop-up window after construction can work normally. You can take a look at this example: https://github.com/techbirds/my-vue-app
So please check whether your environment is normal and whether the writing method is correct. |
same problem, after builded the project with vite. |
you can try to use |
it worked |
the same |
i have the same problem |
the same |
have any result |
so use this, can't open in development |
you can try to use // modal.ts
import { Modal } from 'ant-design-vue'
export const { info, success, error, warning, confirm } = Modal <!-- demo.vue -->
<template>
<button @click="handleClick">click me</button>
</template>
<script lang="ts">
import {confirm} from './modal'
export default {
setup() {
return {
handleClick() {
confirm({
title: "title",
onOk() {
console.log("hi...")
}
})
}
}
}
}
</script> I think this question should be in vite... |
Tried the above solution, still does not work. Can confirm this question occurred in vite. However, importing from |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
same problem |
- My solution is: // important |
|
Thanks! I have successed in his way (eisir ) |
|
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. |
Version
3.2.5
Environment
Vite^2.9.9、Vue^3.2.36、pnpm
Reproduction link
Steps to reproduce
pnpm run build
and click button.What is expected?
Show a confirmation modal dialog.
What is actually happening?
Console error message "xx.confirm is not a function" and not show dialog.
In the build environment.
The text was updated successfully, but these errors were encountered: