Skip to content
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

[Bug Report] Load MessageBox. confirm to report errors as needed #15016

Closed
H-Sven opened this issue Apr 9, 2019 · 4 comments
Closed

[Bug Report] Load MessageBox. confirm to report errors as needed #15016

H-Sven opened this issue Apr 9, 2019 · 4 comments
Assignees
Milestone

Comments

@H-Sven
Copy link

H-Sven commented Apr 9, 2019

Element UI version

2.7.2

OS/Browsers version

chrome73

Vue version

2.6.10

Reproduction Link

https://jsfiddle.net/mmx38qxw/

Steps to reproduce

根据文档http://element-cn.eleme.io/#/zh-CN/component/quickstart 按需载入
import { MessageBox } from 'element-ui';

Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;

this.$alert(123) //正常
this.$confirm(message, options) // Uncaught ReferenceError: _MessageBox is not defined

What is Expected?

正常使用this.$confirm(message, options)

What is actually happening?

this.$confirm(message, options) 控制台报错 Uncaught ReferenceError: _MessageBox is not defined

@element-bot element-bot changed the title [Bug Report] 按需载入MessageBox.confirm报错 [Bug Report] Load MessageBox. confirm to report errors as needed Apr 9, 2019
@element-bot
Copy link
Member

Translation of this issue:

Element UI version

2.7.2

OS/Browsers version

Chrome73

Vue version

2.6.10

Reproduction Link

https://jsfiddle.net/mmx38qxw/

Steps to reproduce

Load as needed according to the document http://element-cn.eleme.io/#/zh-CN/component/quickstart

Import {MessageBox} from'element-ui';
Vue. prototype. $alert = MessageBox. alert;

Vue. prototype. $confirm = MessageBox. confirm;
This. $alert (123)// Normal

This. $confirm (message, options) // Uncaught Reference Error: _MessageBox is not defined

What is Expected?

Use this. $confirm (message, options)

What is actually happening?

This. $confirm (message, options) console error Uncaught Reference Error: _MessageBox is not defined

@H-Sven
Copy link
Author

H-Sven commented Apr 10, 2019

按需引入MessageBox后,无法同时使用confirm message等方法

@ziyoung ziyoung added this to the 2.9.0 milestone May 7, 2019
@luckyCao
Copy link
Contributor

@Demohu 试了下没有重现,请提供一个可复现的 demo

@PanJiaChen
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants