我想为confirmbutton和cancelbutton添加id。id对于ui自动化测试非常有用。有人知道如何设置sweetalert对话框中按钮的id吗?
Sweetalert2({
type: 'warning',
title: 'Are you sure to revise this data ? ',
showCancelButton: true,
confirmButtonColor: '#4dbd74',
cancelButtonColor: '#f86c6b',
confirmButtonText: 'Yes',
cancelButtonText: 'No'
}).then(
(input) => {
if(input.value == true){
debugger;
var result = {
remarks : this.data.remarks
};
this.Modal.close(result);
}
})
暂无答案!
目前还没有任何答案,快来回答吧!