Msgbox: add dangerouslyUseHTMLString

This commit is contained in:
Leopoldthecoder
2017-08-02 19:06:59 +08:00
committed by 杨奕
parent 5d097a0a4a
commit 7d69d11ead
5 changed files with 92 additions and 10 deletions

View File

@@ -50,6 +50,19 @@ describe('MessageBox', () => {
}, 300);
});
it('html string', done => {
MessageBox({
title: 'html string',
dangerouslyUseHTMLString: true,
message: '<strong>html string</strong>'
});
setTimeout(() => {
const message = document.querySelector('.el-message-box__message strong');
expect(message.textContent).to.equal('html string');
done();
}, 300);
});
it('alert', done => {
MessageBox.alert('这是一段内容', {
title: '标题名称',