我正在尝试创建具有多个messagege-box__content的messageBox,例如此图像。 我该怎么办?
答案 0 :(得分:0)
我不确定我是否理解正确-我的意思是在某些情况下您可能想要这样做-但我有一种感觉,在这种情况下使用Dialog可能会更好。不同于messageBox,这使您有更多的自由来编辑html。
messageBox看起来像sweetalert2。
从文档中引用:
MessageBox通过设计可对系统的警报,确认和提示进行模拟,因此其内容应简单。有关更复杂的内容,请使用Dialog。
messageBox用法的示例:
<ColumnDefinitionCollection x:Key="ColumnDefinition">
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</ColumnDefinitionCollection>
对话框用法的示例:
this.$confirm('This will permanently delete the file. Continue?', 'Warning', {
confirmButtonText: 'OK',
cancelButtonText: 'Cancel',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: 'Delete completed'
});
}).catch(() => {
this.$message({
type: 'info',
message: 'Delete canceled'
});
});