文档:
Dialog.alert({
message: '弹窗内容'
}).then(() => {
// on close
});
修改:
需要:content: this
Dialog.alert({
context: this,
title: '',
message: '弹窗内容'
}).then(() => {
// on close
});
本文详细介绍了如何在现有代码基础上优化弹窗组件的使用方式,通过增加context参数和title属性,使得弹窗更加灵活和易用。同时,文章提供了具体的代码示例,帮助读者理解和实现这一优化。
文档:
Dialog.alert({
message: '弹窗内容'
}).then(() => {
// on close
});
修改:
需要:content: this
Dialog.alert({
context: this,
title: '',
message: '弹窗内容'
}).then(() => {
// on close
});