mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
feat(Dialog): add allow-html prop (#6568)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`allow-html prop 1`] = `<div class="van-dialog__message"><span>text</span></div>`;
|
||||
|
||||
exports[`button color 1`] = `
|
||||
<div role="dialog" class="van-dialog" name="van-dialog-bounce">
|
||||
<div class="van-hairline--top van-dialog__footer van-dialog__footer--buttons"><button class="van-button van-button--default van-button--large van-dialog__cancel" style="color: white;">
|
||||
|
@@ -127,6 +127,17 @@ test('title slot', () => {
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('allow-html prop', () => {
|
||||
const wrapper = mount(DialogComponent, {
|
||||
propsData: {
|
||||
value: true,
|
||||
message: '<span>text</span>',
|
||||
allowHtml: false,
|
||||
},
|
||||
});
|
||||
expect(wrapper.find('.van-dialog__message')).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('open & close event', () => {
|
||||
const wrapper = mount(DialogComponent);
|
||||
wrapper.vm.value = true;
|
||||
|
Reference in New Issue
Block a user